mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-30 15:59:13 +00:00
Move WC6 OT memory checks from verifyHistory to verifyOTMemory
This commit is contained in:
parent
8c998d71e6
commit
a0fb281ced
1 changed files with 9 additions and 12 deletions
|
@ -576,14 +576,6 @@ namespace PKHeX
|
||||||
return new LegalityCheck(Severity.Invalid, "Event OT Affection should be zero.");
|
return new LegalityCheck(Severity.Invalid, "Event OT Affection should be zero.");
|
||||||
if (pk6.CurrentHandler != 1)
|
if (pk6.CurrentHandler != 1)
|
||||||
return new LegalityCheck(Severity.Invalid, "Current handler should not be Event OT.");
|
return new LegalityCheck(Severity.Invalid, "Current handler should not be Event OT.");
|
||||||
if (pk6.OT_Memory != MatchedWC6.OT_Memory)
|
|
||||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Memory == 0 ? "should not have an OT Memory" : "OT Memory should be index " + MatchedWC6.OT_Memory) + ".");
|
|
||||||
if (pk6.OT_Intensity != MatchedWC6.OT_Intensity)
|
|
||||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Intensity == 0 ? "should not have an OT Memory Intensity value" : "OT Memory Intensity should be index " + MatchedWC6.OT_Intensity) + ".");
|
|
||||||
if (pk6.OT_TextVar != MatchedWC6.OT_TextVar)
|
|
||||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_TextVar == 0 ? "should not have an OT Memory TextVar value" : "OT Memory TextVar should be index " + MatchedWC6.OT_TextVar) + ".");
|
|
||||||
if (pk6.OT_Feeling != MatchedWC6.OT_Feeling)
|
|
||||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Feeling == 0 ? "should not have an OT Memory Feeling value" : "OT Memory Feeling should be index " + MatchedWC6.OT_Feeling) + ".");
|
|
||||||
}
|
}
|
||||||
if (!pk6.WasEvent && !(pk6.WasLink && (EncounterMatch as EncounterLink)?.OT == false) && (pk6.HT_Name.Length == 0 || pk6.Geo1_Country == 0)) // Is not Traded
|
if (!pk6.WasEvent && !(pk6.WasLink && (EncounterMatch as EncounterLink)?.OT == false) && (pk6.HT_Name.Length == 0 || pk6.Geo1_Country == 0)) // Is not Traded
|
||||||
{
|
{
|
||||||
|
@ -691,10 +683,15 @@ namespace PKHeX
|
||||||
}
|
}
|
||||||
if (EncounterType == typeof(WC6))
|
if (EncounterType == typeof(WC6))
|
||||||
{
|
{
|
||||||
if (pk6.OT_Memory != 0)
|
WC6 MatchedWC6 = EncounterMatch as WC6;
|
||||||
return new LegalityCheck(Severity.Invalid, "Event Pokémon should not have an OT memory.");
|
if (pk6.OT_Memory != MatchedWC6.OT_Memory)
|
||||||
|
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Memory == 0 ? "should not have an OT Memory" : "OT Memory should be index " + MatchedWC6.OT_Memory) + ".");
|
||||||
return new LegalityCheck(Severity.Valid, "OT Memory (Event) is valid.");
|
if (pk6.OT_Intensity != MatchedWC6.OT_Intensity)
|
||||||
|
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Intensity == 0 ? "should not have an OT Memory Intensity value" : "OT Memory Intensity should be index " + MatchedWC6.OT_Intensity) + ".");
|
||||||
|
if (pk6.OT_TextVar != MatchedWC6.OT_TextVar)
|
||||||
|
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_TextVar == 0 ? "should not have an OT Memory TextVar value" : "OT Memory TextVar should be index " + MatchedWC6.OT_TextVar) + ".");
|
||||||
|
if (pk6.OT_Feeling != MatchedWC6.OT_Feeling)
|
||||||
|
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Feeling == 0 ? "should not have an OT Memory Feeling value" : "OT Memory Feeling should be index " + MatchedWC6.OT_Feeling) + ".");
|
||||||
}
|
}
|
||||||
switch (pk6.OT_Memory)
|
switch (pk6.OT_Memory)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue