diff --git a/PKHeX.Core/Legality/Analysis.cs b/PKHeX.Core/Legality/Analysis.cs index 4cb9a6e7a..489116374 100644 --- a/PKHeX.Core/Legality/Analysis.cs +++ b/PKHeX.Core/Legality/Analysis.cs @@ -1,6 +1,7 @@ -using System; +#define SUPPRESS + +using System; using System.Collections.Generic; -using System.Diagnostics; using System.Linq; using System.Reflection; using static PKHeX.Core.LegalityCheckStrings; @@ -55,7 +56,9 @@ private IEnumerable AllSuggestedRelearnMoves public LegalityAnalysis(PKM pk) { +#if SUPPRESS try +#endif { switch (pk.Format) // prior to storing GameVersion { @@ -90,14 +93,16 @@ public LegalityAnalysis(PKM pk) AddLine(Severity.Indeterminate, V188, CheckIdentifier.Fateful); } } +#if SUPPRESS catch (Exception e) { - Debug.WriteLine(e.Message); + System.Diagnostics.Debug.WriteLine(e.Message); Valid = false; AddLine(Severity.Invalid, V190, CheckIdentifier.Misc); pkm = pk; Error = true; } +#endif Parsed = true; } diff --git a/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs b/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs index 73026af97..9862d78de 100644 --- a/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs +++ b/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs @@ -256,6 +256,8 @@ private static CheckMoveResult[] ParseMoves(PKM pkm, int[] moves, int[] special, var IncenseMovesLearned = new List(); // Check moves going backwards, marking the move valid in the most current generation when it can be learned int[] generations = GetGenMovesCheckOrder(pkm); + if (pkm.Format <= 2) + generations = generations.Where(z => z < info.EncounterMoves.LevelUpMoves.Length).ToArray(); foreach (var gen in generations) { var HMLearned = new int[0]; @@ -290,7 +292,7 @@ private static CheckMoveResult[] ParseMoves(PKM pkm, int[] moves, int[] special, else if (gen == pkm.GenNumber && special.Contains(moves[m])) res[m] = new CheckMoveResult(MoveSource.Special, gen, Severity.Valid, V175, CheckIdentifier.Move); - if (res[m] == null || gen < 3) + if (res[m] == null || gen >= 3) continue; if (res[m].Valid && gen == 2 && NonTradebackLvlMoves.Contains(m))