mirror of
https://github.com/risingPhil/libpokemegb.git
synced 2026-03-21 17:44:24 -05:00
Also recalculate lvl in gen1_recalculatePokeStats
This commit is contained in:
parent
76ecc15ede
commit
b275d12a97
|
|
@ -142,6 +142,7 @@ void gen1_recalculatePokeStats(Gen1GameReader& reader, Gen1TrainerPokemon& poke)
|
|||
Gen1PokeStats stats;
|
||||
reader.readPokemonStatsForIndex(poke.poke_index, stats);
|
||||
|
||||
poke.level = getLevelForExp(poke.exp, stats.growth_rate);
|
||||
poke.max_hp = calculatePokeStat(PokeStat::HP, stats.base_hp, getStatIV(PokeStat::HP, poke.iv_data), poke.hp_effort_value, poke.level);
|
||||
poke.atk = calculatePokeStat(PokeStat::ATK, stats.base_attack, getStatIV(PokeStat::ATK, poke.iv_data), poke.atk_effort_value, poke.level);
|
||||
poke.def = calculatePokeStat(PokeStat::DEF, stats.base_defense, getStatIV(PokeStat::DEF, poke.iv_data), poke.def_effort_value, poke.level);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user