mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-14 16:27:21 +00:00
Add bw/2 jellicent deferral case
https://projectpokemon.org/home/forums/topic/46143-bug-in-last-update/?tab=comments#comment-233860 Thanks paf!
This commit is contained in:
parent
9f2712cf4d
commit
83e61923f7
2 changed files with 12 additions and 1 deletions
|
@ -602,6 +602,7 @@ namespace PKHeX.Core
|
|||
new EncounterStatic { Species = 591, Level = 56, Location = 128, }, // Amoonguss @ Route 23
|
||||
new EncounterStatic { Species = 593, Level = 40, Location = 71, Ability = 4, Version = GameVersion.B2, Gender = 0,}, // HA Jellicent @ Undella Bay Mon Only
|
||||
new EncounterStatic { Species = 593, Level = 40, Location = 71, Ability = 4, Version = GameVersion.W2, Gender = 1,}, // HA Jellicent @ Undella Bay Thurs Only
|
||||
new EncounterStatic { Species = 593, Level = 40, Location = 71 }, // HA Jellicent @ Undella Bay EncounterSlot collision
|
||||
new EncounterStatic { Species = 628, Level = 25, Location = 17, Ability = 4, Version = GameVersion.W2, Gender = 0,}, // HA Braviary @ Route 4 Mon Only
|
||||
new EncounterStatic { Species = 630, Level = 25, Location = 17, Ability = 4, Version = GameVersion.B2, Gender = 1,}, // HA Mandibuzz @ Route 4 Thurs Only
|
||||
new EncounterStatic { Species = 637, Level = 35, Location = 35, }, // Volcarona @ Relic Castle
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace PKHeX.Core
|
|||
if (!GetIsMatchStatic(pkm, e, lvl))
|
||||
continue;
|
||||
|
||||
if (pkm.FatefulEncounter != e.Fateful)
|
||||
if (GetIsMatchDeferred(pkm, e))
|
||||
deferred.Add(e);
|
||||
else
|
||||
yield return e;
|
||||
|
@ -53,6 +53,16 @@ namespace PKHeX.Core
|
|||
foreach (var e in deferred)
|
||||
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.Nature != Nature.Random && pkm.Nature != (int)e.Nature)
|
||||
|
|
Loading…
Reference in a new issue