Hey! Do you think you could help me with this code? It's giving me issues!
Spoiler:
ItemHandlers::UseOnPokemon.add(:REVEALGLASS,proc{|item,pokemon,scene|
if (isConst?(pokemon.species,PBSpecies,:TORNADUS) ||
isConst?(pokemon.species,PBSpecies,:THUNDURUS) ||
isConst?(pokemon.species,PBSpecies,:LANDORUS))
if pokemon.hp>0
pokemon.form=(pokemon.form==0) ? 1 : 0
scene.pbRefresh
scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
next true
else
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
end
if (isConst?(pokemon.species,PBSpecies,:ELDISH)
if pokemon.hp>0
pbFadeOutInWithMusic(99999){
evo=PokemonEvolutionScene.new
evo.pbStartScreen(pokemon,newspecies)
evo.pbEvolution(false)
evo.pbEndScreen
if scene.is_a?(PokemonBag_Scene)
scene.pbRefreshAnnotations(proc{|p| pbCheckEvolution(p,item)>0 })
scene.pbRefresh
end
}
end
next true
else
scene.pbDisplay(_INTL("It had no effect."))
next false
end
})
I modified Reveal Glass's script to make it so it makes a Pokemon evolve as well.