mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Handle max possible level for transferred & evolved-to-new-species
A Gen3 level 26 sylveon with a met level of 25 in Generation 8: Transferred as Eevee at level 25, and leveled up to 26=>Sylveon If we use met_level (25), we need to decrease 1 as we evolve. No, use Current Level and ensure the max isn't above the bare minimum (met level)
This commit is contained in:
parent
804b85ea33
commit
7cb484834c
1 changed files with 2 additions and 1 deletions
|
@ -118,7 +118,8 @@ namespace PKHeX.Core
|
|||
if (generation >= 4)
|
||||
return met;
|
||||
|
||||
return GetLevelOriginMaxTransfer(pkm, met, generation);
|
||||
var downLevel = GetLevelOriginMaxTransfer(pkm, pkm.CurrentLevel, generation);
|
||||
return Math.Min(met, downLevel);
|
||||
}
|
||||
|
||||
private static int GetLevelOriginMaxTransfer(PKM pkm, int met, int generation)
|
||||
|
|
Loading…
Reference in a new issue