diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic.cs index 5263cf94e..60fd9795d 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic.cs @@ -425,5 +425,14 @@ protected virtual bool IsMatchLevel(PKM pkm, int lvl) return true; } + + public virtual bool IsMatchDeferred(PKM pkm) + { + if (pkm.FatefulEncounter != Fateful) + return true; + if (Ability == 4 && pkm.AbilityNumber != 4) // BW/2 Jellicent collision with wild surf slot, resolved by duplicating the encounter with any abil + return true; + return false; + } } } diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic8N.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic8N.cs index 0a7d6efb9..2be23dd79 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic8N.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic8N.cs @@ -70,5 +70,15 @@ public override bool IsMatch(PKM pkm, int lvl) return base.IsMatch(pkm, lvl); } + + public override bool IsMatchDeferred(PKM pkm) + { + if (base.IsMatchDeferred(pkm)) + return true; + if (pkm is IGigantamax g && g.CanGigantamax != CanGigantamax) + return true; + + return false; + } } } \ No newline at end of file diff --git a/PKHeX.Core/Legality/Encounters/Generator/EncounterStaticGenerator.cs b/PKHeX.Core/Legality/Encounters/Generator/EncounterStaticGenerator.cs index b858dd89a..bfea769cd 100644 --- a/PKHeX.Core/Legality/Encounters/Generator/EncounterStaticGenerator.cs +++ b/PKHeX.Core/Legality/Encounters/Generator/EncounterStaticGenerator.cs @@ -66,7 +66,7 @@ private static IEnumerable GetMatchingStaticEncounters(PKM pkm, if (!GetIsMatchStatic(pkm, e, lvl)) continue; - if (GetIsMatchDeferred(pkm, e)) + if (e.IsMatchDeferred(pkm)) deferred.Add(e); else yield return e; @@ -75,15 +75,6 @@ private static IEnumerable GetMatchingStaticEncounters(PKM pkm, yield return e; } - private static bool GetIsMatchDeferred(PKM pkm, EncounterStatic e) - { - if (pkm.FatefulEncounter != e.Fateful) - return true; - if (e.Ability == 4 && pkm.AbilityNumber != 4) // BW/2 Jellicent collision with wild surf slot, resolved by duplicating the encounter with any abil - return true; - return false; - } - private static bool GetIsMatchStatic(PKM pkm, EncounterStatic e, int lvl) { if (!e.IsMatch(pkm, lvl))