From 5ae378d09d9c21255a816f1b16d4d1468ef563d2 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 12 Feb 2017 22:40:47 -0800 Subject: [PATCH] Remove Pay Day from Mewtwo on transfer 1->7 Retains legality relevant to Bank transfer checks with Yellow's TMHM table. --- PKHeX/Legality/Checks.cs | 3 +++ PKHeX/PKM/PK1.cs | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/PKHeX/Legality/Checks.cs b/PKHeX/Legality/Checks.cs index 1a756e168..fab2ec60c 100644 --- a/PKHeX/Legality/Checks.cs +++ b/PKHeX/Legality/Checks.cs @@ -631,6 +631,9 @@ private CheckResult verifyVCEncounter(int baseSpecies) if (pkm.Egg_Location != ematch.EggLocation) return new CheckResult(Severity.Invalid, "Should not have an egg location.", CheckIdentifier.Encounter); + if (species == 150 && pkm.Moves.Contains(6)) + return new CheckResult(Severity.Invalid, "Mewtwo cannot be transferred while knowing Pay Day.", CheckIdentifier.Encounter); + return new CheckResult(CheckIdentifier.Encounter); } private void verifyLevel() diff --git a/PKHeX/PKM/PK1.cs b/PKHeX/PKM/PK1.cs index 8c1ad0683..da9092932 100644 --- a/PKHeX/PKM/PK1.cs +++ b/PKHeX/PKM/PK1.cs @@ -381,6 +381,18 @@ public PK7 convertToPK7() } pk7.TradeMemory(Bank:true); // oh no, memories on gen7 pkm + + if (pk7.Species == 150) // Pay Day Mewtwo + { + var moves = pk7.Moves; + var index = Array.IndexOf(moves, 6); + if (index != -1) + { + moves[index] = 0; + pk7.Moves = moves; + pk7.FixMoves(); + } + } pk7.RefreshChecksum(); return pk7;