mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-07-15 21:10:54 -05:00
Update AbilityVerifier.cs
This commit is contained in:
parent
8eb582c997
commit
016ebb86ad
|
|
@ -49,6 +49,16 @@ private CheckResult VerifyAbility(LegalityAnalysis data)
|
|||
int an = num >> 1;
|
||||
if (an >= abilities.Count || abilities[an] != ability)
|
||||
return GetInvalid(LAbilityMismatchFlag);
|
||||
|
||||
// Check AbilityNumber for transfers without unique abilities
|
||||
int gen = data.Info.Generation;
|
||||
if (3 <= gen && gen <= 5 && num != 4)
|
||||
{
|
||||
// To determine AbilityNumber [PK5->PK6], check if the first ability in Personal matches the ability.
|
||||
// It is not possible to flip it to the other index as capsule requires unique abilities.
|
||||
if (abilities[0] == abilities[1] && num != 1)
|
||||
return GetInvalid(LAbilityMismatchFlag);
|
||||
}
|
||||
}
|
||||
|
||||
if (format >= 8) // Ability Patch
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user