Add Hidden Grotto Ability checking

This commit is contained in:
wwwwwwzx 2017-03-22 16:47:14 -07:00
parent d5323ccb22
commit d12f76388f
5 changed files with 13 additions and 3 deletions

View File

@ -241,6 +241,7 @@ public static string[] getLocalization(string[] existingLines = null)
public static string V110 {get; set;} = "Ability does not match Mystery Gift.";
public static string V111 {get; set;} = "Hidden Ability on non-SOS wild encounter.";
public static string V112 {get; set;} = "Hidden Ability not available.";
public static string V217 {get; set;} = "Hidden Grotto captures should have Hidden Ability.";
public static string V115 {get; set;} = "Ability matches ability number."; // Valid
public static string V113 {get; set;} = "Ability does not match PID.";

View File

@ -985,6 +985,17 @@ private void verifyAbility()
return;
}
}
if (pkm.GenNumber == 5)
{
if (EncounterType == typeof(EncounterSlot[]) && !((EncounterSlot[])EncounterMatch).Any(slot => slot.Type != SlotType.HiddenGrotto)) //encounter only at HiddenGrotto
{
if (pkm.AbilityNumber != 4)
{
AddLine(Severity.Invalid, V217, CheckIdentifier.Ability);
return;
}
}
}
if (pkm.GenNumber == 6)
{
if (EncounterIsMysteryGift)

View File

@ -247,10 +247,7 @@ private static void MarkB2W2SwarmSlots(ref EncounterArea[] Areas)
private static void MarkG5HiddenGrottoSlots(ref EncounterArea[] Areas)
{
foreach (EncounterSlot s in Areas[0].Slots) //Only 1 area
{
s.Type = SlotType.HiddenGrotto;
//todo: Ability marking and checking
}
}
private static void MarkG5Slots(ref EncounterArea[] Areas)
{

View File

@ -143,6 +143,7 @@ V109 = 特性被特性胶囊改变。
V110 = 特性与神秘礼物不一致。
V111 = 非帮手宝可梦拥有隐藏特性。
V112 = 隐藏特性不可获得。
v217 = 隐藏洞穴捕获的宝可梦必定为隐藏特性。
V115 = 特性与特性值一致。
V113 = 特性与PID不一致。
V114 = 特性与特性值不一致。