Updated happiness values (assuming Timburr/Stunfisk not changing are mistakes), added new type of evolution that triggers after any battle, added code to let Galarian Farfetch'd evolve after dealing 3 critical hits

This commit is contained in:
Maruno17
2021-07-09 21:44:58 +01:00
parent ae7661edc5
commit 33f0403945
9 changed files with 1405 additions and 1367 deletions

View File

@@ -961,6 +961,15 @@ class Pokemon
}
end
# Checks whether this Pokemon can evolve after a battle.
# @return [Symbol, nil] the ID of the species to evolve into
def check_evolution_after_battle(party_index)
return check_evolution_internal { |pkmn, new_species, method, parameter|
success = GameData::Evolution.get(method).call_after_battle(pkmn, party_index, parameter)
next (success) ? new_species : nil
}
end
# Checks whether this Pokemon can evolve by a triggered event.
# @param value [Integer] a value that may be used by the evolution method
# @return [Symbol, nil] the ID of the species to evolve into