Use PokeBattle_Pokemon#hasItem? instead of isConst?

This commit is contained in:
jonisavo
2020-09-06 15:41:46 +03:00
parent 97b2548a7e
commit e73bef533d
8 changed files with 34 additions and 35 deletions

View File

@@ -309,7 +309,7 @@ end
# Pokemon to check; evolution type; level or other parameter; ID of the new species
def pbCheckEvolutionEx(pokemon)
return -1 if pokemon.species<=0 || pokemon.egg? || pokemon.shadowPokemon?
return -1 if isConst?(pokemon.item,PBItems,:EVERSTONE)
return -1 if pokemon.hasItem?(:EVERSTONE)
return -1 if isConst?(pokemon.ability,PBAbilities,:BATTLEBOND)
ret = -1
for form in pbGetEvolvedFormData(pbGetFSpeciesFromForm(pokemon.species,pokemon.form),true)