From 1b4ec11335a4b77dfc8154b359fa20bcdc282ae7 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 23 Apr 2018 17:14:52 -0700 Subject: [PATCH] Add rebattleable Miror B locations to xd shadows https://projectpokemon.org/home/forums/topic/44957-bug-pokemon-xd-post-game-shadows-flagged-illegal/ if shadow lock sets are ever implemented, would need to update this as well to 'clone' with the different shadow teams available. --- .../Legality/Encounters/Data/Encounters3.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/PKHeX.Core/Legality/Encounters/Data/Encounters3.cs b/PKHeX.Core/Legality/Encounters/Data/Encounters3.cs index ad81a86da..a883aa6a5 100644 --- a/PKHeX.Core/Legality/Encounters/Data/Encounters3.cs +++ b/PKHeX.Core/Legality/Encounters/Data/Encounters3.cs @@ -604,7 +604,21 @@ private static EncounterArea GetUnownArea(int location, IReadOnlyList SlotF }, }; - internal static readonly EncounterStatic[] Encounter_CXD = Encounter_Colo.Concat(Encounter_XD).ToArray(); + private static readonly int[] MirorBXDLocations = + { + 090, // Rock + 091, // Oasis + 092, // Cave + 113, // Pyrite Town + 059, // Realgam Tower + }; + internal static readonly EncounterStatic[] Encounter_CXD = Encounter_Colo.Concat(Encounter_XD.SelectMany(CloneMirorB)).ToArray(); + private static IEnumerable CloneMirorB(EncounterStatic arg) + { + yield return arg; + foreach (int loc in MirorBXDLocations) + yield return arg.Clone(loc); + } #endregion }