Check memories for eggs/transfer

Catches some of those jan2014 banked pentagon mons without OT memories
The last check is unused; the last two checks are designed in case past
gen pkm are checked.
This commit is contained in:
Kaphotics 2016-03-30 18:53:34 -07:00
parent 9645cccbb5
commit 4869f188bd

View File

@ -521,7 +521,22 @@ private LegalityCheck verifyHandlerMemories()
if (pk6.HT_Memory == 0)
return new LegalityCheck(Severity.Invalid, "Memory -- missing Handling Trainer Memory.");
}
// Memory Checks
if (pk6.IsEgg)
{
if (pk6.HT_Memory != 0)
return new LegalityCheck(Severity.Invalid, "Memory -- has Handling Trainer Memory.");
if (pk6.OT_Memory != 0)
return new LegalityCheck(Severity.Invalid, "Memory -- has Original Trainer Memory.");
}
else if (EncounterType != typeof(WC6))
{
if (pk6.OT_Memory == 0 ^ !pk6.Gen6)
return new LegalityCheck(Severity.Invalid, "Memory -- missing Original Trainer Memory.");
if (!pk6.Gen6 && pk6.OT_Affection != 0)
return new LegalityCheck(Severity.Invalid, "OT Affection should be zero.");
}
// Unimplemented: Ingame Trade Memories
return new LegalityCheck(Severity.Valid, "History is valid.");