mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-14 08:00:33 -05:00
Add first shadow lock check
Currently toggled off, can be optionally toggled on (I'm not sure that it's perfect? Random save files have stuff flagged since they don't match the lock; will have to investigate later)
This commit is contained in:
parent
8c4a17335f
commit
3d0d8fa649
|
|
@ -61,8 +61,20 @@ private static IEnumerable<IEncounterable> GetEncounters3(PKM pkm, LegalInfo inf
|
|||
var deferred = new List<IEncounterable>();
|
||||
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
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@ public static class ParseSettings
|
|||
public static Severity NicknamedMysteryGift { get; set; } = Severity.Fishy;
|
||||
public static Severity RNGFrameNotFound { get; set; } = Severity.Fishy;
|
||||
|
||||
/// <summary>
|
||||
/// Setting to specify if an analysis should flag a shadow encounter that does not match the first lock.
|
||||
/// </summary>
|
||||
public static bool FlagCXDShadowFirstLockMismatch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if Crystal is available to visit/originate from.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user