From 43cd9300fbda5eb21b2a519c6aa4355bfddd48ef Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 23 Feb 2024 20:54:56 -0600 Subject: [PATCH] Display raid seed for valid SW/SH raids Yay leadslot for making this possible Sure we do a little bit of extra work (checking seed twice) but it's negligible overall. --- PKHeX.Core/Legality/RNG/PIDIV.cs | 2 +- PKHeX.Core/Legality/Verifiers/MiscVerifier.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/PKHeX.Core/Legality/RNG/PIDIV.cs b/PKHeX.Core/Legality/RNG/PIDIV.cs index 78765547e..43eb4771e 100644 --- a/PKHeX.Core/Legality/RNG/PIDIV.cs +++ b/PKHeX.Core/Legality/RNG/PIDIV.cs @@ -52,7 +52,7 @@ public PIDIV(PIDType type, ulong seed) #endif public bool IsClassicMethod() => Type.IsClassicMethod(); - public bool IsSeed64() => false; + public bool IsSeed64() => Type is PIDType.Raid8; public PIDIV AsEncounteredVia(LeadSeed condition) => this with { Lead = condition.Lead, EncounterSeed = condition.Seed }; } diff --git a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs index 8c2213a32..344dc24fe 100644 --- a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs @@ -127,6 +127,11 @@ public override void Verify(LegalityAnalysis data) if (!valid) data.AddLine(GetInvalid(LPIDTypeMismatch)); } + else if (enc is ISeedCorrelation64 s64) + { + if (s64.TryGetSeed(pk, out var seed)) + data.Info.PIDIV = new PIDIV(PIDType.Raid8, seed); + } else if (enc is IMasteryInitialMoveShop8 m) { if (!m.IsForcedMasteryCorrect(pk))