From ee79ba2f61a96bad4e059871afcf9c7b06b1e7a5 Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 16 Apr 2026 00:30:24 -0500 Subject: [PATCH] WC9: Permit 255-all hisuian zoroark size HOME misapplying PLA's size fixing, fun. Seems it was fixed in 4.0.0 (after 3.2.1?) or server side. A last-minute redeem=>deposit was "fixed" to 255, so the full date range of the card is allowed to be mutated. --- PKHeX.Core/MysteryGifts/WC9.cs | 49 ++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/PKHeX.Core/MysteryGifts/WC9.cs b/PKHeX.Core/MysteryGifts/WC9.cs index b13c1540c..385d94bb7 100644 --- a/PKHeX.Core/MysteryGifts/WC9.cs +++ b/PKHeX.Core/MysteryGifts/WC9.cs @@ -725,21 +725,8 @@ public override bool IsMatchExact(PKM pk, EvoCriteria evo) if (pk is IScaledSize s) { - if (!Encounter9RNG.IsHeightMatchSV(pk, (byte)HeightValue)) + if (!IsMatchSize(pk, s)) return false; - if (s.WeightScalar != WeightValue) - return false; - - if (!IsBeforePatch120(CardID) || (pk.MetDate is { } valid && !IsBeforePatch120(valid))) - { - // S/V 1.2.0 added scale specification. - if (Scale != 256) - { - var current = pk is IScaledSize3 s3 ? s3.Scale : s.HeightScalar; - if (Scale != current) - return false; - } - } } // PID Types 0 and 1 do not use the fixed PID value. @@ -751,6 +738,40 @@ public override bool IsMatchExact(PKM pk, EvoCriteria evo) return pk.PID == GetPID(pk, type); } + private bool IsMatchSize(PKM pk, IScaledSize s) + { + if (CardID == 1513 && s is { HeightScalar: 255, WeightScalar: 255 } and IHomeTrack { HasTracker: true }) + { + // Hisiuan Zoroark was locked to 128 but could be bumped to 255 via HOME misapplying PLA's fix for Cavern alphas. + // This is an OK case of mismatch. + // This was fixed on HOME 4.0.0 update (2026, a few years after this event distribution ended), and samples could be deposited afterward (thus not requiring 255-all). + if (pk is not IScaledSize3 { Scale: not 255 }) // if Scale is also present, should be 255. + return true; + // Otherwise, fall through and check via usual logic, which will return false if it doesn't match 128. + } + + // Check for strict match of Height/Weight. + if (!Encounter9RNG.IsHeightMatchSV(pk, (byte)HeightValue)) + return false; + if (s.WeightScalar != WeightValue) + return false; + + // S/V 1.2.0 added scale specification to all available (replaced) and future cards. + // If it is a pre-patch card, double check that the date was possible to redeem before the patch. + if (IsBeforePatch120(CardID) && (pk.MetDate is not { } valid || IsBeforePatch120(valid))) + return true; // No scale to check, can be anything random triangular = rand(127) + rand(128); + + if (Scale == 256) // Random + return true; // Allowed to be random triangular. + + // Check for strict match. + var current = pk is IScaledSize3 s3 ? s3.Scale : s.HeightScalar; + if (Scale != current) + return false; + + return true; // Everything matches. + } + private bool IsMatchTrainerName(ReadOnlySpan trainerTrash, PKM pk) { Span trainerName = stackalloc char[12];