From 940cdccb6bb7b0dd874029e0758a22826bb0b245 Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 27 Dec 2019 00:17:59 -0800 Subject: [PATCH] Restrict downleveled to lvl % 5 == 0 --- PKHeX.Core/Legality/Encounters/EncounterStatic8N.cs | 2 ++ .../Legality/Encounters/Information/ValidEncounterMoves.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic8N.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic8N.cs index 14c7686ad..a2b4c1a7a 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic8N.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic8N.cs @@ -55,6 +55,8 @@ protected override bool IsMatchLevel(PKM pkm, int lvl) return false; if (rank < MinRank) // downleveled { + if (metLevel % 5 != 0) + return false; if (pkm.Met_Location == SharedNest) { } // shared nests can be downleveled to any else if (MinRank - rank > 1) // native downlevels: only allow 1 rank down (?) diff --git a/PKHeX.Core/Legality/Encounters/Information/ValidEncounterMoves.cs b/PKHeX.Core/Legality/Encounters/Information/ValidEncounterMoves.cs index 687a6fcf9..def144170 100644 --- a/PKHeX.Core/Legality/Encounters/Information/ValidEncounterMoves.cs +++ b/PKHeX.Core/Legality/Encounters/Information/ValidEncounterMoves.cs @@ -33,7 +33,7 @@ private static void AddEdgeCaseMoves(List moves, IEncounterable encounter, { switch (encounter) { - case EncounterStatic8N r when !EncounterStatic8N.IsHighestLevelTier(pkm.Met_Level): // Downleveled Raid can happen for shared raids and self-hosted raids. + case EncounterStatic8N r when !EncounterStatic8N.IsHighestLevelTier(pkm.Met_Level) && pkm.Met_Level % 5 == 0: // Downleveled Raid can happen for shared raids and self-hosted raids. moves.AddRange(MoveLevelUp.GetMovesLevelUp(pkm, r.Species, -1, -1, 60, r.Form, GameVersion.SW, false, 8)); break; }