mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 13:58:33 +00:00
Add duplicate move check
Cleanup the class too.
This commit is contained in:
parent
76b3031263
commit
425de6242a
2 changed files with 5 additions and 2 deletions
|
@ -227,6 +227,11 @@ namespace PKHeX
|
|||
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 @@ namespace PKHeX
|
|||
public Nature Nature = Nature.Random;
|
||||
public bool Gift = false;
|
||||
public GameVersion Version = GameVersion.Any;
|
||||
|
||||
public EncounterStatic() { }
|
||||
}
|
||||
public enum Nature
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue