Flag EReader shadows with any nonzero IV

This commit is contained in:
Kurt
2026-11-09 12:43:46 -06:00
parent 3767c1367a
commit 96e33e7432

View File

@@ -83,6 +83,13 @@ private static IEnumerable<IEncounterable> IterateInner(PKM pk, EvoCriteria[] ch
private static bool GetIsShadowLockValidEReader(PKM pk, LegalInfo info, EncounterShadow3Colo s)
{
// E-Reader have fixed IVs, and aren't recognized as CXD (no PID-IV correlation).
// IVs are all zero.
Span<int> ivs = stackalloc int[6];
pk.GetIVs(ivs);
if (ivs.ContainsAnyExcept(0))
return false;
Span<uint> seeds = stackalloc uint[XDRNG.MaxCountSeedsPID];
var count = XDRNG.GetSeeds(seeds, pk.EncryptionConstant);
var xdc = seeds[..count];