mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
Add exp > lvl100 check
stop directly writing EXP values lol
This commit is contained in:
parent
3ebf5279cc
commit
f3b3f15035
2 changed files with 8 additions and 0 deletions
|
@ -281,6 +281,7 @@ namespace PKHeX.Core
|
|||
public static string LIVF_COUNT0_31 { get; set; } = "Should have at least {0} IVs = 31.";
|
||||
|
||||
public static string LLevelEXPThreshold { get; set; } = "Current experience matches level threshold.";
|
||||
public static string LLevelEXPTooHigh { get; set; } = "Current experience exceeds maximum amount for level 100.";
|
||||
public static string LLevelMetBelow { get; set; } = "Current level is below met level.";
|
||||
public static string LLevelMetGift { get; set; } = "Met Level does not match Mystery Gift level.";
|
||||
public static string LLevelMetGiftFail { get; set; } = "Current Level below Mystery Gift level.";
|
||||
|
|
|
@ -56,6 +56,13 @@ namespace PKHeX.Core
|
|||
}
|
||||
|
||||
int lvl = pkm.CurrentLevel;
|
||||
if (lvl >= 100)
|
||||
{
|
||||
var expect = Experience.GetEXP(100, pkm.PersonalInfo.EXPGrowth);
|
||||
if (pkm.EXP != expect)
|
||||
data.AddLine(GetInvalid(LLevelEXPTooHigh));
|
||||
}
|
||||
|
||||
if (lvl < pkm.Met_Level)
|
||||
data.AddLine(GetInvalid(LLevelMetBelow));
|
||||
else if (!enc.IsWithinEncounterRange(pkm) && lvl != 100 && pkm.EXP == Experience.GetEXP(lvl, pkm.PersonalInfo.EXPGrowth))
|
||||
|
|
Loading…
Reference in a new issue