From 108233b45f7873021ea43bf35a48641bcb189c02 Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 10 Dec 2019 19:54:26 -0800 Subject: [PATCH] Add glalie/skuntank locations #2570 --- PKHeX.Core/Legality/Areas/EncounterArea8.cs | 9 +++++---- PKHeX.Core/Legality/Encounters/Data/Encounters8.cs | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/PKHeX.Core/Legality/Areas/EncounterArea8.cs b/PKHeX.Core/Legality/Areas/EncounterArea8.cs index faa832140..87b2fec09 100644 --- a/PKHeX.Core/Legality/Areas/EncounterArea8.cs +++ b/PKHeX.Core/Legality/Areas/EncounterArea8.cs @@ -19,11 +19,12 @@ public override bool IsMatchLocation(int location) if (!PermitCrossover) return false; - // get all other areas that can bleed encounters to the met location - if (!ConnectingArea8.TryGetValue(location, out var others)) + // Get all other areas that the Location can bleed encounters to + if (!ConnectingArea8.TryGetValue(Location, out var others)) return false; - return others.Contains((byte)Location); + // Check if any of the other areas are the met location + return others.Contains((byte)location); } protected override IEnumerable GetMatchFromEvoLevel(PKM pkm, IEnumerable vs, int minLevel) @@ -46,7 +47,7 @@ protected override IEnumerable GetMatchFromEvoLevel(PKM pkm, IEnu private static bool IsMatch(DexLevel evo, EncounterSlot slot) { - if (evo.Species != slot.Species) + if (evo.Species != slot.Species) return false; if (evo.Form == slot.Form) return true; diff --git a/PKHeX.Core/Legality/Encounters/Data/Encounters8.cs b/PKHeX.Core/Legality/Encounters/Data/Encounters8.cs index 039f339eb..1e2886178 100644 --- a/PKHeX.Core/Legality/Encounters/Data/Encounters8.cs +++ b/PKHeX.Core/Legality/Encounters/Data/Encounters8.cs @@ -109,6 +109,7 @@ static Encounters8() #endregion #region Static Part 2 + // Some of these may be crossover cases. For now, just log the locations they can show up in and re-categorize later. new EncounterStatic8 { Species = 095, Level = 26, Location = 122, }, // Onix in the Rolling Fields (in a Wild Area) new EncounterStatic8 { Species = 416, Level = 26, Location = 122, }, // Vespiquen in the Rolling Fields (in a Wild Area) new EncounterStatic8S{ Species = 675, Level = 32, Locations = new[] {122, 124}}, // Pangoro in the Rolling Fields, in the Dappled Grove (in a Wild Area) @@ -233,7 +234,7 @@ static Encounters8() new EncounterStatic8 { Species = 344, Level = 36, Location = 124, }, // Claydol in the Dappled Grove (in a Wild Area) new EncounterStatic8 { Species = 093, Level = 34, Location = 126, }, // Haunter at Watchtower Ruins (in a Wild Area) new EncounterStatic8 { Species = 356, Level = 40, Location = 126, }, // Dusclops at Watchtower Ruins (in a Wild Area) - new EncounterStatic8 { Species = 362, Level = 40, Location = 126, }, // Glalie at Watchtower Ruins (in a Wild Area) + new EncounterStatic8S{ Species = 362, Level = 40, Locations = new[] {126, 130}, }, // Glalie at Watchtower Ruins (in a Wild Area) & at West Lake Axewell new EncounterStatic8 { Species = 279, Level = 28, Location = 138, }, // Pelipper at North Lake Miloch (in a Wild Area) new EncounterStatic8 { Species = 536, Level = 28, Location = 130, }, // Palpitoad at West Lake Axewell (in a Wild Area) new EncounterStatic8 { Species = 660, Level = 28, Location = -1, }, // Diggersby @@ -247,7 +248,7 @@ static Encounters8() new EncounterStatic8 { Species = 558, Level = 34, Location = 134, }, // Crustle at South Lake Miloch (in a Wild Area) new EncounterStatic8 { Species = 067, Level = 31, Location = 134, }, // Machoke at South Lake Miloch (in a Wild Area) new EncounterStatic8 { Species = 426, Level = 31, Location = -1, }, // Drifblim - new EncounterStatic8 { Species = 435, Level = 36, Location = -1, }, // Skuntank + new EncounterStatic8 { Species = 435, Level = 36, Location = 138, }, // Skuntank at North Lake Miloch (in a Wild Area) new EncounterStatic8 { Species = 537, Level = 36, Location = 124, }, // Seismitoad in the Dappled Grove (in a Wild Area) new EncounterStatic8 { Species = 583, Level = 36, Location = -1, }, // Vanillish new EncounterStatic8 { Species = 426, Level = 36, Location = -1, }, // Drifblim