Add gen7 SOS check

To be added shortly, false flags will happen until then.
Split binaries for regular & SOS encounters
This commit is contained in:
Kurt
2016-11-22 17:04:53 -08:00
parent 0a6228ff0b
commit abf7cda272
2 changed files with 15 additions and 0 deletions

View File

@@ -699,6 +699,20 @@ private void verifyAbility()
}
}
}
if (pkm.GenNumber == 7)
{
if (EncounterType == typeof(EncounterSlot[]) && pkm.AbilityNumber == 4)
{
var slots = (EncounterSlot[])EncounterMatch;
bool valid = slots.Any(slot => slot.Type == SlotType.SOS);
if (!valid)
{
AddLine(Severity.Invalid, "Hidden Ability on non-SOS wild encounter.", CheckIdentifier.Ability);
return;
}
}
}
}
if (pkm.GenNumber >= 6 && abilities[pkm.AbilityNumber >> 1] != pkm.Ability)

View File

@@ -16,5 +16,6 @@ public enum SlotType
Horde,
FriendSafari,
Special,
SOS,
}
}