ability evolution fix

This commit is contained in:
infinitefusion
2022-09-05 13:27:30 -04:00
parent 94f2833c52
commit d58c71781d
23 changed files with 123 additions and 110 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -6,7 +6,7 @@
module Settings
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
GAME_VERSION = '5.0.0'
GAME_VERSION_NUMBER = "5.0.31 - beta"
GAME_VERSION_NUMBER = "5.0.32 - beta"
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18

View File

@@ -602,6 +602,12 @@ class PokemonEvolutionScene
@sprites["msgwindow"].text = ""
# Check for consumed item and check if Pokémon should be duplicated
pbEvolutionMethodAfterEvolution
oldAbility = @pokemon.ability.id
newSpecies = GameData::Species.get(@newspecies)
allNewPossibleAbilities = newSpecies.abilities + newSpecies.hidden_abilities
# Modify Pokémon to make it evolved
@pokemon.species = @newspecies
@pokemon.form = 0 if @pokemon.isSpecies?(:MOTHIM)
@@ -609,6 +615,11 @@ class PokemonEvolutionScene
# See and own evolved species
$Trainer.pokedex.register(@pokemon)
$Trainer.pokedex.set_owned(@newspecies)
if allNewPossibleAbilities.include?(oldAbility)
@pokemon.ability=oldAbility
end
# Learn moves upon evolution for evolved species
movelist = @pokemon.getMoveList
for i in movelist

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.