Fixed bug with trainer data, tidied evolution-checking code

This commit is contained in:
Maruno17
2021-02-02 23:09:57 +00:00
parent 44e3c934ad
commit e1e9706cd9
5 changed files with 42 additions and 37 deletions

View File

@@ -348,7 +348,7 @@ ItemHandlers::UseOnPokemon.addIf(proc { |item| GameData::Item.get(item).is_evolu
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
newspecies = EvolutionCheck.check(pkmn,item)
newspecies = EvolutionCheck.check_item_methods(pkmn, item)
if newspecies
pbFadeOutInWithMusic {
evo = PokemonEvolutionScene.new
@@ -356,7 +356,7 @@ ItemHandlers::UseOnPokemon.addIf(proc { |item| GameData::Item.get(item).is_evolu
evo.pbEvolution(false)
evo.pbEndScreen
if scene.is_a?(PokemonPartyScreen)
scene.pbRefreshAnnotations(proc { |p| !EvolutionCheck.check(p, item).nil? })
scene.pbRefreshAnnotations(proc { |p| !EvolutionCheck.check_item_methods(p, item).nil? })
scene.pbRefresh
end
}