# Checks whether a Pokemon can evolve now. If a block is given, calls the block
# with the following parameters:
# Pokemon to check; evolution type; level or other parameter; ID of the new Pokemon species
def pbCheckEvolutionEx(pokemon)
return -1 if pokemon.species<=0 || pokemon.isEgg?
return -1 if isConst?(pokemon.species,PBSpecies,:PICHU) && pokemon.form==1
return -1 if isConst?(pokemon.item,PBItems,:EVERSTONE)
ret=-1
for form in pbGetEvolvedFormData(pokemon.species)
ret=yield pokemon,form[0],form[1],form[2]
break if ret>0
end
return ret
end