mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-15 00:25:20 -05:00
Add duplicate move check
Cleanup the class too.
This commit is contained in:
@@ -227,6 +227,11 @@ private LegalityCheck[] verifyMoves()
|
||||
if (Moves[0] == 0)
|
||||
res[0] = new LegalityCheck(Severity.Invalid, "Invalid Move.");
|
||||
|
||||
// Duplicate Moves Check
|
||||
for (int i = 0; i < 4; i++)
|
||||
if (Moves.Count(m => m != 0 && m == Moves[i]) > 1)
|
||||
res[i] = new LegalityCheck(Severity.Invalid, "Duplicate Move.");
|
||||
|
||||
return res;
|
||||
}
|
||||
private LegalityCheck[] verifyRelearn()
|
||||
|
||||
@@ -150,8 +150,6 @@ public class EncounterStatic
|
||||
public Nature Nature = Nature.Random;
|
||||
public bool Gift = false;
|
||||
public GameVersion Version = GameVersion.Any;
|
||||
|
||||
public EncounterStatic() { }
|
||||
}
|
||||
public enum Nature
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user