diff --git a/PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs b/PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs index 71f6e4ac2..c823be7cf 100644 --- a/PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs @@ -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