mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 02:28:11 -05:00
revise xd ID check to exclude PAL
ty John_0902 on discord
This commit is contained in:
@@ -631,7 +631,7 @@ public static bool IsValidNameScreenEndSeed(uint seed, out uint origin)
|
||||
// rand() / 10 == 0 is a skip
|
||||
const ushort SEED_THRESHOLD = 0x1999; // Only need the upper 16 bits
|
||||
|
||||
var p1 = XDRNG.Prev16(ref seed) > SEED_THRESHOLD;
|
||||
var p1 = (seed >> 16) > SEED_THRESHOLD;
|
||||
var p2 = XDRNG.Prev16(ref seed) > SEED_THRESHOLD;
|
||||
var p3 = XDRNG.Prev16(ref seed) > SEED_THRESHOLD;
|
||||
var p4 = XDRNG.Prev16(ref seed) > SEED_THRESHOLD;
|
||||
|
||||
@@ -85,8 +85,19 @@ public static bool TryGetShinySID(uint pid, ushort tid, GameVersion version, out
|
||||
|
||||
private static void VerifyTrainerID_CXD<T>(LegalityAnalysis data, T tr) where T : ITrainerID32ReadOnly
|
||||
{
|
||||
var severity = Severity.Invalid;
|
||||
if (data.EncounterOriginal is (EncounterSlot3XD or EncounterShadow3XD or EncounterStatic3XD))
|
||||
{
|
||||
// XD does not do the rand1000 on PAL copies of the game.
|
||||
var lang = (LanguageID)data.Entity.Language;
|
||||
if (lang > LanguageID.English) // definitely PAL
|
||||
return;
|
||||
if (lang is LanguageID.English)
|
||||
severity = Severity.Fishy; // can be PAL or US, let user verify.
|
||||
// japanese will stay Invalid
|
||||
}
|
||||
if (!MethodCXD.TryGetSeedTrainerID(tr.TID16, tr.SID16, out _))
|
||||
data.AddLine(GetInvalid(LTrainerIDNoSeed, CheckIdentifier.Trainer));
|
||||
data.AddLine(Get(LTrainerIDNoSeed, severity, CheckIdentifier.Trainer));
|
||||
}
|
||||
|
||||
private static void VerifyTrainerID_RS<T>(LegalityAnalysis data, T tr, Severity severity = Severity.Invalid) where T : ITrainerID32ReadOnly
|
||||
|
||||
Reference in New Issue
Block a user