Fix colo espeon pidiv double-check

forgot about the fakeID before IVs
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/page/30/#findComment-293040
ty jacksonf !
This commit is contained in:
Kurt 2025-01-13 22:25:32 -06:00
parent 7d2c564744
commit ef60ee622d
2 changed files with 7 additions and 5 deletions

View File

@ -536,8 +536,8 @@ public static bool TryGetOriginSeedStarterXD(PKM pk, out uint result)
if (!IsMatchIVs(iv1, iv2, ivSeed))
continue;
}
var pidSeed = XDRNG.Next7(seed);
var pid = GetColoStarterPID(ref pidSeed, id32);
var pidSeedU = XDRNG.Next7(seed);
var pid = GetColoStarterPID(ref pidSeedU, id32);
if (species is (ushort)Species.Umbreon)
{
if (pid != expectPID)
@ -547,10 +547,11 @@ public static bool TryGetOriginSeedStarterXD(PKM pk, out uint result)
}
// Espeon
if (!IsMatchIVs(iv1, iv2, pidSeed))
var afterFake = XDRNG.Next2(pidSeedU);
if (!IsMatchIVs(iv1, iv2, afterFake))
continue;
pidSeed = XDRNG.Next3(pidSeed);
pid = GetColoStarterPID(ref pidSeed, id32);
var pidSeedE = XDRNG.Next3(afterFake);
pid = GetColoStarterPID(ref pidSeedE, id32);
if (pid != expectPID)
continue;
result = seed;

View File

@ -14,6 +14,7 @@ public override void Verify(LegalityAnalysis data)
var pk = data.Entity;
if (data.EncounterMatch is EncounterStatic3XD { Species: (ushort)Species.Eevee })
VerifyStarterXD(data);
// Colo starters are already hard-verified. No need to check them here.
if (pk.OriginalTrainerGender == 1)
data.AddLine(GetInvalid(LG3OTGender, CheckIdentifier.Trainer));