Fixed crash when soft resetting, fixed crash when Struggle and confusion pseudo-moves are used, fix broken AI, fixed crash after evolution, fixed crash when editing weather map metadata.

This commit is contained in:
Maruno17
2021-04-28 23:24:17 +01:00
parent f3048abd86
commit 17d1344e74
5 changed files with 7 additions and 8 deletions

View File

@@ -917,9 +917,8 @@ class Pokemon
# required it to have a held item) or duplicate this Pokémon (Shedinja only).
# @param new_species [Pokemon] the species that this Pokémon evolved into
def action_after_evolution(new_species)
species_data.get_evolutions(true).each do |evo| # [new_species, method, parameter, boolean]
next if evo[3] # Prevolution
break if GameData::Evolution.get(method).call_after_evolution(self, evo[0], evo[2], new_species)
species_data.get_evolutions(true).each do |evo| # [new_species, method, parameter]
break if GameData::Evolution.get(evo[1]).call_after_evolution(self, evo[0], evo[2], new_species)
end
end