mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
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:
parent
aa78152856
commit
90956f3b05
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue