Pokedex5E
Pokedex5E copied to clipboard
Refactor evolution logic
The "check" for checking if a evolution is possible is currently not enough, we do this in edit.gui_script
. We should only have to check against evolution_possible
.
local evolution_possible = _pokemon.get_evolution_possible(self.pokemon)
local evolution_level = evolution_possible and _pokemon.get_evolution_level(self.pokemon)
if not _pokemon.get_consumed_eviolite(self.pokemon) and evolution_possible and evolution_level <= _pokemon.get_current_level(self.pokemon) then
-- evolution is actually possible
end