From 24b5cc48ed27ccbcd0ecd0215e934d94f0269370 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 17 Dec 2017 21:26:31 -0800 Subject: [PATCH] Fix gb encounter move comparison don't calc NoMoveReminder for non-gen2 formats, also fix comparisons (gen1 || gen2&&noRemind) Closes #1707 --- .../Legality/Encounters/VerifyCurrentMoves.cs | 4 ++-- .../Legal/General/004 - CHARMANDER - D5EF.pk1 | Bin 0 -> 69 bytes 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 Tests/PKHeX.Tests/Legality/Legal/General/004 - CHARMANDER - D5EF.pk1 diff --git a/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs b/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs index 48c7e745d..3a743fa88 100644 --- a/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs +++ b/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs @@ -140,8 +140,8 @@ private static CheckMoveResult[] ParseMovesPre3DS(PKM pkm, int[] Moves, LegalInf int[] SpecialMoves = GetSpecialMoves(info.EncounterMatch); return ParseMovesIsEggPreRelearn(pkm, Moves, SpecialMoves, egg); } - var NoMoveReminder = info.EncounterMatch is IGeneration g && (g.Generation == 1 || g.Generation == 2) && !Legal.AllowGen2MoveReminder(pkm); - if (info.Generation <= 2 && NoMoveReminder) + if (info.Generation <= 2 && + info.EncounterMatch is IGeneration g && (g.Generation == 1 || g.Generation == 2 && !Legal.AllowGen2MoveReminder(pkm))) // fixed encounter moves without relearning return ParseMovesGenGB(pkm, Moves, info); if (info.EncounterMatch is EncounterEgg e) return ParseMovesWasEggPreRelearn(pkm, Moves, info, e); diff --git a/Tests/PKHeX.Tests/Legality/Legal/General/004 - CHARMANDER - D5EF.pk1 b/Tests/PKHeX.Tests/Legality/Legal/General/004 - CHARMANDER - D5EF.pk1 new file mode 100644 index 0000000000000000000000000000000000000000..37196fb7963fe08e8a1ee8d703f224e6924cf69c GIT binary patch literal 69 zcmZSF@P7k?Fav{#h%T2d1B2Qg28MP9IQZtTtiiy*3RJ+&zzM|My*oCpTN?nDZ)$It M*wfJ4+%ho$0J^9TcK`qY literal 0 HcmV?d00001