From df321d14b54bf1eae3e2c3be6e9577a7ce5908e4 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 15 Sep 2018 16:13:17 -0700 Subject: [PATCH] Reorder checks most common path is now first --- .../Legality/Encounters/Verifiers/VerifyCurrentMoves.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs b/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs index 3078db5c5..b5c20a5de 100644 --- a/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs +++ b/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs @@ -643,7 +643,9 @@ private static void ParseEvolutionLevelupMove(PKM pkm, IList re // Ignore if there is an invalid move or an empty move, this validation is only for 4 non-empty moves that are all valid, but invalid as a 4 combination // Ignore Mr. Mime and Sudowodoo from generations 1 to 3, they cant be evolved from Bonsly or Munchlax // Ignore if encounter species is the evolution species, the pokemon was not evolved by the player - if (!res.All(r => r?.Valid ?? false) || moves.Any(m => m == 0) || (Legal.BabyEvolutionWithMove.Contains(pkm.Species) && pkm.GenNumber <= 3) || info.EncounterMatch.Species == pkm.Species) + if (info.EncounterMatch.Species == pkm.Species) + return; + if (!res.All(r => r?.Valid ?? false) || moves.Any(m => m == 0) || (Legal.BabyEvolutionWithMove.Contains(pkm.Species) && info.Generation <= 3)) return; var ValidMoves = Legal.GetValidPostEvolutionMoves(pkm, pkm.Species, info.EvoChainsAllGens, GameVersion.Any);