diff --git a/PKHeX.Core/Editing/CommonEdits.cs b/PKHeX.Core/Editing/CommonEdits.cs index ccb9ce688..880319e35 100644 --- a/PKHeX.Core/Editing/CommonEdits.cs +++ b/PKHeX.Core/Editing/CommonEdits.cs @@ -207,7 +207,7 @@ namespace PKHeX.Core // In Generation 1/2 Format sets, when EVs are not specified at all, it implies maximum EVs instead! // Under this scenario, just apply maximum EVs (65535). if (Set.EVs.All(z => z == 0)) - gb.EV_HP = gb.EV_ATK = gb.EV_DEF = gb.EV_SPC = gb.EV_SPE = gb.MaxEV; + gb.MaxEVs(); else pk.EVs = Set.EVs; } @@ -244,7 +244,7 @@ namespace PKHeX.Core if (pk is PB7 b) { for (int i = 0; i < 6; i++) - pk.SetEV(i, 0); + b.SetEV(i, 0); b.ResetCalculatedValues(); } } diff --git a/PKHeX.Core/PKM/Shared/GBPKM.cs b/PKHeX.Core/PKM/Shared/GBPKM.cs index 227470817..a3619e080 100644 --- a/PKHeX.Core/PKM/Shared/GBPKM.cs +++ b/PKHeX.Core/PKM/Shared/GBPKM.cs @@ -225,6 +225,8 @@ namespace PKHeX.Core return pp + (ppUpCount * Math.Min(7, pp / 5)); } + public void MaxEVs() => EV_HP = EV_ATK = EV_DEF = EV_SPC = EV_SPE = MaxEV; + /// /// Applies to the to make it shiny. ///