mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-05 21:17:14 -05:00
Add gen1/2 EV checks
This commit is contained in:
parent
c83a311fd4
commit
19bf8de17c
|
|
@ -126,6 +126,7 @@ private void ParsePK1(PKM pk)
|
|||
}
|
||||
VerifyNickname();
|
||||
VerifyDVs();
|
||||
VerifyEVs();
|
||||
VerifyG1OT();
|
||||
VerifyMiscG1();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ private void VerifyEVs()
|
|||
int sum = evs.Sum();
|
||||
if (sum > 0 && pkm.IsEgg)
|
||||
AddLine(Severity.Invalid, V22, CheckIdentifier.EVs);
|
||||
if (sum > 510)
|
||||
if (pkm.Format >= 3 && sum > 510)
|
||||
AddLine(Severity.Invalid, V25, CheckIdentifier.EVs);
|
||||
if (pkm.Format >= 6 && evs.Any(ev => ev > 252))
|
||||
AddLine(Severity.Invalid, V26, CheckIdentifier.EVs);
|
||||
|
|
@ -351,6 +351,9 @@ private void VerifyEVs()
|
|||
// Cannot EV train above 100 without increasing EXP
|
||||
if (PKX.GetEXP(EncounterMatch.LevelMin, pkm.Species) == pkm.EXP && evs.Any(ev => ev > maxEV))
|
||||
AddLine(Severity.Invalid, string.Format(V418, maxEV), CheckIdentifier.EVs);
|
||||
|
||||
if (pkm.Format < 3)
|
||||
return;
|
||||
}
|
||||
|
||||
// Only one of the following can be true: 0, 508, and x%6!=0
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user