mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-06 22:44:25 -05:00
Add WC6/WC7 ability checks
Ability type not possible to generate ability -> flag it. Thanks Sonic Blader!
This commit is contained in:
parent
c1ab0699d3
commit
a4e04fc2fe
|
|
@ -916,6 +916,15 @@ private void verifyAbility()
|
|||
}
|
||||
if (pkm.GenNumber == 6)
|
||||
{
|
||||
if (EncounterIsMysteryGift)
|
||||
{
|
||||
var wc = EncounterMatch as WC6;
|
||||
var type = wc?.AbilityType;
|
||||
if (type < 3 && pkm.AbilityNumber != 1 << type) // set number
|
||||
AddLine(Severity.Invalid, "Ability does not match Mystery Gift.", CheckIdentifier.Ability);
|
||||
else if (type == 3 && pkm.AbilityNumber == 4) // 1/2 only
|
||||
AddLine(Severity.Invalid, "Ability does not match Mystery Gift.", CheckIdentifier.Ability);
|
||||
}
|
||||
if (EncounterType == typeof(EncounterSlot[]) && pkm.AbilityNumber == 4)
|
||||
{
|
||||
var slots = (EncounterSlot[])EncounterMatch;
|
||||
|
|
@ -932,6 +941,15 @@ private void verifyAbility()
|
|||
}
|
||||
if (pkm.GenNumber == 7)
|
||||
{
|
||||
if (EncounterIsMysteryGift)
|
||||
{
|
||||
var wc = EncounterMatch as WC7;
|
||||
var type = wc?.AbilityType;
|
||||
if (type < 3 && pkm.AbilityNumber != 1 << type) // set number
|
||||
AddLine(Severity.Invalid, "Ability does not match Mystery Gift.", CheckIdentifier.Ability);
|
||||
else if (type == 3 && pkm.AbilityNumber == 4) // 1/2 only
|
||||
AddLine(Severity.Invalid, "Ability does not match Mystery Gift.", CheckIdentifier.Ability);
|
||||
}
|
||||
if (EncounterType == typeof(EncounterSlot[]) && pkm.AbilityNumber == 4)
|
||||
{
|
||||
var slots = (EncounterSlot[])EncounterMatch;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user