From bf2e3a9abbbaccff783d3a4b84748b85de176676 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 2 Jan 2017 22:20:16 -0800 Subject: [PATCH] Fix cosplay pikachu static fetch with the addition of forme checking, these 'can switch forme' cosplay pikachu are currently not recognized. just add a skip toggle instead of duplicating the encounters (variant location and formes) --- PKHeX/Legality/Core.cs | 2 +- PKHeX/Legality/Structures/EncounterStatic.cs | 1 + PKHeX/Legality/Tables6.cs | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/PKHeX/Legality/Core.cs b/PKHeX/Legality/Core.cs index a1cae9732..69996a139 100644 --- a/PKHeX/Legality/Core.cs +++ b/PKHeX/Legality/Core.cs @@ -259,7 +259,7 @@ internal static EncounterStatic getValidStaticEncounter(PKM pkm) continue; if (e.Level != pkm.Met_Level) continue; - if (e.Form != pkm.AltForm && !FormChange.Contains(pkm.Species)) + if (e.Form != pkm.AltForm && !FormChange.Contains(pkm.Species) && !e.SkipFormCheck) continue; // Defer to EC/PID check diff --git a/PKHeX/Legality/Structures/EncounterStatic.cs b/PKHeX/Legality/Structures/EncounterStatic.cs index 768a29242..71f7b3a77 100644 --- a/PKHeX/Legality/Structures/EncounterStatic.cs +++ b/PKHeX/Legality/Structures/EncounterStatic.cs @@ -23,5 +23,6 @@ public class EncounterStatic public bool Fateful = false; public bool RibbonWishing = false; + public bool SkipFormCheck = false; } } diff --git a/PKHeX/Legality/Tables6.cs b/PKHeX/Legality/Tables6.cs index 3c267167f..0b1d2bd05 100644 --- a/PKHeX/Legality/Tables6.cs +++ b/PKHeX/Legality/Tables6.cs @@ -426,10 +426,10 @@ public static partial class Legal new EncounterStatic { Species = 498, Level = 5, Location = 204, Gift = true }, // Tepig new EncounterStatic { Species = 501, Level = 5, Location = 204, Gift = true }, // Oshawott - new EncounterStatic { Species = 25, Level = 20, Location = 178, Gender = 1, Ability = 4, IVs = new[] {-1, -1, -1, 31, -1, -1}, Contest = new[] {70,70,70,70,70,0}, Gift = true, Shiny = false }, // Pikachu - new EncounterStatic { Species = 25, Level = 20, Location = 180, Gender = 1, Ability = 4, IVs = new[] {-1, -1, -1, 31, -1, -1}, Contest = new[] {70,70,70,70,70,0}, Gift = true, Shiny = false }, // Pikachu - new EncounterStatic { Species = 25, Level = 20, Location = 186, Gender = 1, Ability = 4, IVs = new[] {-1, -1, -1, 31, -1, -1}, Contest = new[] {70,70,70,70,70,0}, Gift = true, Shiny = false }, // Pikachu - new EncounterStatic { Species = 25, Level = 20, Location = 194, Gender = 1, Ability = 4, IVs = new[] {-1, -1, -1, 31, -1, -1}, Contest = new[] {70,70,70,70,70,0}, Gift = true, Shiny = false }, // Pikachu + new EncounterStatic { Species = 25, Level = 20, Location = 178, Gender = 1, Ability = 4, IVs = new[] {-1, -1, -1, 31, -1, -1}, Contest = new[] {70,70,70,70,70,0}, Gift = true, Shiny = false, SkipFormCheck = true }, // Pikachu + new EncounterStatic { Species = 25, Level = 20, Location = 180, Gender = 1, Ability = 4, IVs = new[] {-1, -1, -1, 31, -1, -1}, Contest = new[] {70,70,70,70,70,0}, Gift = true, Shiny = false, SkipFormCheck = true }, // Pikachu + new EncounterStatic { Species = 25, Level = 20, Location = 186, Gender = 1, Ability = 4, IVs = new[] {-1, -1, -1, 31, -1, -1}, Contest = new[] {70,70,70,70,70,0}, Gift = true, Shiny = false, SkipFormCheck = true }, // Pikachu + new EncounterStatic { Species = 25, Level = 20, Location = 194, Gender = 1, Ability = 4, IVs = new[] {-1, -1, -1, 31, -1, -1}, Contest = new[] {70,70,70,70,70,0}, Gift = true, Shiny = false, SkipFormCheck = true }, // Pikachu new EncounterStatic { Species = 360, Level = 1, EggLocation = 60004, Ability = 1, Gift = true }, // Wynaut new EncounterStatic { Species = 175, Level = 1, EggLocation = 60004, Ability = 1, Gift = true }, // Togepi