From 981001b12e8a9f8202b35c30cb00edbc85c17165 Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 25 Nov 2022 15:55:10 -0800 Subject: [PATCH] Clamp max obey level to current, slot tera recheck --- PKHeX.Core/Legality/Verifiers/MiscVerifier.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs index 4818df0a8..3e112ff4c 100644 --- a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs @@ -154,15 +154,17 @@ public sealed class MiscVerifier : Verifier if (pk9.Tracker != 0) data.AddLine(GetInvalid(LTransferTrackerShouldBeZero)); - if (enc is EncounterEgg && !Tera9RNG.IsMatchTeraTypePersonalEgg(enc.Species, enc.Form, (byte)pk9.TeraTypeOriginal)) + if (enc is EncounterEgg or EncounterSlot9 && !Tera9RNG.IsMatchTeraTypePersonalEgg(enc.Species, enc.Form, (byte)pk9.TeraTypeOriginal)) data.AddLine(GetInvalid(LTeraTypeMismatch)); VerifyTechRecordSV(data, pk9); } - private static bool IsObedienceLevelValid(PKM pk9, byte current, int expectObey) + private static bool IsObedienceLevelValid(PKM pk, byte current, int expectObey) { - if (!pk9.IsUntraded) + if (current > pk.CurrentLevel) + return false; + if (!pk.IsUntraded) return current >= expectObey; return current == expectObey; }