• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Akari, Selene, Mint, Solana - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Stopping evolution if pokemon is a specific species and form

In the script section Pokémon_Evolution there's this piece of code:

Code:
def pbCheckEvolutionEx(pokemon)
  return -1 if pokemon.species<=0 || pokemon.isEgg?
  [COLOR="Red"]return -1 if isConst?(pokemon.species,PBSpecies,:PICHU) && pokemon.form==1[/COLOR]
  return -1 if isConst?(pokemon.item,PBItems,:EVERSTONE) &&
               !isConst?(pokemon.species,PBSpecies,:KADABRA)
  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

Now you could add a new rule similar to the red line like:

Code:
return -1 if isConst?(pokemon.species,PBSpecies,:PIKACHU) && pokemon.form != 0
 
Last edited:
In the script section Pokémon_Evolution there's this piece of code:

Code:
def pbCheckEvolutionEx(pokemon)
  return -1 if pokemon.species<=0 || pokemon.isEgg?
  [COLOR="Red"]return -1 if isConst?(pokemon.species,PBSpecies,:PICHU) && pokemon.form==1[/COLOR]
  return -1 if isConst?(pokemon.item,PBItems,:EVERSTONE) &&
               !isConst?(pokemon.species,PBSpecies,:KADABRA)
  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

Now you could add a new rule similar to the red line like:

Code:
return -1 if isConst?(pokemon.species,PBSpecies,:PIKACHU) && pokemon.form != 0

Telemetius, your original code was If the species is Pikachu and the statement "the form is form number 1" is false. While that is technically right (other than the wrong form number), it'd just be easier to say If the species is Pikachu and the form is not form number zero.
 
Telemetius, your original code was If the species is Pikachu and the statement "the form is form number 1" is false. While that is technically right (other than the wrong form number), it'd just be easier to say If the species is Pikachu and the form is not form number zero.

You're right, I should have double checked it! Editing it now.
 
Back
Top