From 4d9cd1cfc28943d87d7ccad55f3c458c14050c46 Mon Sep 17 00:00:00 2001 From: javierhimura Date: Mon, 24 Apr 2017 19:42:27 +0200 Subject: [PATCH] Fix Encounter Type checks Added bug contest as tail grass encounters Illex Forest as cave encounter Mark encounter types in the final encounter array to avoid have none encounter in any alt slot --- PKHeX/Legality/Core.cs | 15 ++++++++------- PKHeX/Legality/Tables4.cs | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/PKHeX/Legality/Core.cs b/PKHeX/Legality/Core.cs index 3cdc67da6..85da4dbf0 100644 --- a/PKHeX/Legality/Core.cs +++ b/PKHeX/Legality/Core.cs @@ -326,7 +326,8 @@ private static EncounterType GetEncounterTypeBySlotHGSS(SlotType Type, Encounter { // HGSS Safari encounters have normal water/grass encounter type, not safari encounter type case SlotType.Grass: - case SlotType.Grass_Safari: return GrassType; + case SlotType.Grass_Safari: + case SlotType.BugContest: return GrassType; case SlotType.Surf: case SlotType.Old_Rod: case SlotType.Good_Rod: @@ -671,12 +672,12 @@ private static EncounterArea[] getTables2(GameVersion Version) SlotsHG = addExtraTableSlots(HG_Slots, HG_Headbutt_Slots, SlotsHGSSAlt); SlotsSS = addExtraTableSlots(SS_Slots, SS_Headbutt_Slots, SlotsHGSSAlt); - MarkDPPtEncounterTypeSlots(ref D_Slots); - MarkDPPtEncounterTypeSlots(ref P_Slots); - MarkDPPtEncounterTypeSlots(ref Pt_Slots); - MarkHGSSEncounterTypeSlots(ref HG_Slots); - MarkHGSSEncounterTypeSlots(ref SS_Slots); - + MarkDPPtEncounterTypeSlots(ref SlotsD); + MarkDPPtEncounterTypeSlots(ref SlotsP); + MarkDPPtEncounterTypeSlots(ref SlotsPt); + MarkHGSSEncounterTypeSlots(ref SlotsHG); + MarkHGSSEncounterTypeSlots(ref SlotsSS); + Evolves4 = new EvolutionTree(new[] { Resources.evos_g4 }, GameVersion.DP, PersonalTable.DP, MaxSpeciesID_4); // Update Personal Entries with Tutor Data diff --git a/PKHeX/Legality/Tables4.cs b/PKHeX/Legality/Tables4.cs index 4cdde4172..a08072e26 100644 --- a/PKHeX/Legality/Tables4.cs +++ b/PKHeX/Legality/Tables4.cs @@ -232,6 +232,7 @@ public static partial class Legal 209, // Ruins of Alph 210, // Union Cave 211, // SLOWPOKE Well + 214, // Ilex Forest 216, // Mt. Mortar 217, // Ice Path 218, // Whirl Islands