mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 18:46:55 -05:00
Fix HA possible abilities not being validated w/HA
This commit is contained in:
@@ -66,14 +66,17 @@ private CheckResult VerifyAbility(LegalityAnalysis data)
|
||||
}
|
||||
|
||||
var enc = data.EncounterMatch;
|
||||
if (pk.AbilityNumber == 4 && enc.Ability.CanBeHidden())
|
||||
return VALID;
|
||||
|
||||
if (format >= 8) // Ability Patch
|
||||
{
|
||||
if (pk.AbilityNumber == 4 && !(enc is IFixedAbilityNumber f && f.Ability.CanBeHidden()))
|
||||
if (pk.AbilityNumber == 4)
|
||||
{
|
||||
if (AbilityChangeRules.IsAbilityPatchPossible(data.Info.EvoChainsAllGens))
|
||||
return GetValid(LAbilityPatchUsed);
|
||||
}
|
||||
else if (enc is IFixedAbilityNumber { Ability: AbilityPermission.OnlyHidden })
|
||||
else if (enc.Ability == AbilityPermission.OnlyHidden)
|
||||
{
|
||||
if (AbilityChangeRules.IsAbilityPatchRevertPossible(data.Info.EvoChainsAllGens, pk.AbilityNumber))
|
||||
return GetValid(LAbilityPatchRevertUsed);
|
||||
|
||||
Reference in New Issue
Block a user