mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-11 02:26:45 -05:00
Require strict match for hidden ability encounters
Metagross collision with wild beldum deferral API is kinda crude, hence these janky workarounds. Was originally intended to hold onto close matches when there's no more possible matches to check. I think a priority-deferral while only retaining a single encounter bad (instead of a list of retries) may work better than the current setup, but that would require more abstraction
This commit is contained in:
@@ -36,6 +36,10 @@ public override bool IsMatch(PKM pkm, DexLevel evo)
|
||||
if (pkm is IDynamaxLevel d && d.DynamaxLevel < DynamaxLevel)
|
||||
return false;
|
||||
|
||||
// Required Ability
|
||||
if (Ability == 4 && pkm.AbilityNumber != 4)
|
||||
return false; // H
|
||||
|
||||
if (Version != GameVersion.SWSH && pkm.Version != (int)Version && pkm.Met_Location != SharedNest)
|
||||
return false;
|
||||
|
||||
@@ -58,14 +62,13 @@ public sealed override bool IsMatchDeferred(PKM pkm)
|
||||
|
||||
if (Ability != -1) // Any
|
||||
{
|
||||
// HA-Only is a strict match. Ability Capsule and Patch can potentially change these.
|
||||
if (Ability == 0 && pkm.AbilityNumber == 4)
|
||||
return true; // 0/1
|
||||
if (Ability == 1 && pkm.AbilityNumber != 1)
|
||||
return true; // 0
|
||||
if (Ability == 2 && pkm.AbilityNumber != 2)
|
||||
return true; // 1
|
||||
if (Ability == 4 && pkm.AbilityNumber != 4)
|
||||
return true; // H
|
||||
}
|
||||
|
||||
if (Shiny != Shiny.Random)
|
||||
|
||||
Reference in New Issue
Block a user