mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Set Max EVs for ShowdownSet`s imported onto GBPKM with unspecified EVs
https://github.com/architdate/PKHeX-Plugins/issues/48
This commit is contained in:
parent
0b8989e4ce
commit
0111c3dd6f
1 changed files with 7 additions and 1 deletions
|
@ -199,6 +199,12 @@ namespace PKHeX.Core
|
||||||
pk.CurrentLevel = Set.Level;
|
pk.CurrentLevel = Set.Level;
|
||||||
pk.CurrentFriendship = Set.Friendship;
|
pk.CurrentFriendship = Set.Friendship;
|
||||||
pk.IVs = Set.IVs;
|
pk.IVs = Set.IVs;
|
||||||
|
|
||||||
|
// 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 (pk is GBPKM gb && Set.EVs.All(z => z == 0))
|
||||||
|
gb.EV_HP = gb.EV_ATK = gb.EV_DEF = gb.EV_SPC = gb.EV_SPE = gb.MaxEV;
|
||||||
|
else
|
||||||
pk.EVs = Set.EVs;
|
pk.EVs = Set.EVs;
|
||||||
|
|
||||||
// IVs have no side effects such as hidden power type in gen 8
|
// IVs have no side effects such as hidden power type in gen 8
|
||||||
|
|
Loading…
Reference in a new issue