Remove Pay Day from Mewtwo on transfer 1->7

Retains legality relevant to Bank transfer checks with Yellow's TMHM
table.
This commit is contained in:
Kurt
2017-02-12 22:40:47 -08:00
parent e1b8a07cef
commit 5ae378d09d
2 changed files with 15 additions and 0 deletions

View File

@@ -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()

View File

@@ -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;