diff --git a/PKHeX.Core/Legality/Encounters/Generator/EncounterGenerator.cs b/PKHeX.Core/Legality/Encounters/Generator/EncounterGenerator.cs index cb61274be..b36881411 100644 --- a/PKHeX.Core/Legality/Encounters/Generator/EncounterGenerator.cs +++ b/PKHeX.Core/Legality/Encounters/Generator/EncounterGenerator.cs @@ -61,8 +61,20 @@ namespace PKHeX.Core var deferred = new List(); foreach (var z in GenerateRawEncounters3(pkm, info)) { - if (z is EncounterSlot w && pkm.Version == 15) - info.PIDIV = MethodFinder.GetPokeSpotSeeds(pkm, w.SlotNumber).FirstOrDefault() ?? info.PIDIV; + if (pkm.Version == 15) + { + if (z is EncounterSlot w) + { + var seeds = MethodFinder.GetPokeSpotSeeds(pkm, w.SlotNumber).FirstOrDefault(); + info.PIDIV = seeds ?? info.PIDIV; + } + else if (ParseSettings.FlagCXDShadowFirstLockMismatch + && z is EncounterStaticShadow s && !LockFinder.IsFirstShadowLockValid(s, info.PIDIV)) + { + deferred.Add(s); + continue; + } + } if (info.PIDIV.Type.IsCompatible3(z, pkm)) yield return z; else diff --git a/PKHeX.Core/Legality/Verifiers/ParseSettings.cs b/PKHeX.Core/Legality/Verifiers/ParseSettings.cs index 1eaef079b..5d5a1512d 100644 --- a/PKHeX.Core/Legality/Verifiers/ParseSettings.cs +++ b/PKHeX.Core/Legality/Verifiers/ParseSettings.cs @@ -23,6 +23,11 @@ public static Severity NicknamedMysteryGift { get; set; } = Severity.Fishy; public static Severity RNGFrameNotFound { get; set; } = Severity.Fishy; + /// + /// Setting to specify if an analysis should flag a shadow encounter that does not match the first lock. + /// + public static bool FlagCXDShadowFirstLockMismatch { get; set; } + /// /// Checks to see if Crystal is available to visit/originate from. ///