mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 14:30:56 +00: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
2 changed files with 19 additions and 2 deletions
|
@ -61,8 +61,20 @@ namespace PKHeX.Core
|
|||
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 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 a new issue