Fix multiple matched cards

Charizardite Y with Inferno fixed, just add a break to get out of the
loop.
This commit is contained in:
Kaphotics
2016-07-04 16:06:07 -07:00
parent 8276c6fcc1
commit 8dd5c40a93

View File

@@ -865,8 +865,12 @@ private LegalityCheck[] verifyMoves()
else
res[i] = new LegalityCheck(Severity.Invalid, "Invalid Move.");
}
if (res.All(r => r.Valid)) // Card matched
{ EncounterMatch = wc; RelearnBase = wc.RelearnMoves; }
if (res.Any(r => !r.Valid))
continue;
EncounterMatch = wc;
RelearnBase = wc.RelearnMoves;
break;
}
}
else
@@ -891,7 +895,6 @@ private LegalityCheck[] verifyMoves()
if (Moves[0] == 0)
res[0] = new LegalityCheck(Severity.Invalid, "Invalid Move.");
if (pk6.Species == 647) // Keldeo
if (pk6.AltForm == 1 ^ pk6.Moves.Contains(548))
res[0] = new LegalityCheck(Severity.Invalid, "Secret Sword / Resolute Keldeo Mismatch.");