Flag encounter slots that cannot obtain HA or use ability patch

Ex: old chateau Gastly in bdsp cannot have HA as it is not different from base abilities
This commit is contained in:
Kurt 2021-12-08 23:43:32 -08:00
parent aa78152856
commit 90956f3b05

View file

@ -76,6 +76,8 @@ namespace PKHeX.Core
var e = data.EncounterOriginal;
if (e.Species != pkm.Species && CanAbilityPatch(format, PKX.Personal.GetFormEntry(e.Species, e.Form).Abilities, e.Species))
return GetValid(LAbilityPatchUsed);
// Verify later, it may be encountered with its hidden ability without using an ability patch.
}
}
@ -480,6 +482,7 @@ namespace PKHeX.Core
private static int GetEncounterFixedAbilityNumber(IEncounterTemplate enc) => enc switch
{
IFixedAbilityNumber s => s.Ability,
EncounterSlot w => w.Ability,
_ => -1,
};
}