• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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.

[Scripting Question] How to make code check the type of the foe who poisoned a Pokemon, when a Pokemon is poisoned?

  • 428
    Posts
    5
    Years
    # POISON TOXIC CHECK
    when :POISON
    if !(opponent.hasType?(:POISON))
    @effects[PBEffects::Toxic] = 0
    @effects[PBEffects::Poisoned] = 1
    end
    # POISON TOXIC CHECK
    when :POISON
    if (opponent.hasType?(:POISON))
    @effects[PBEffects::Poisoned] = 0
    @effects[PBEffects::Toxic] = 1
    end

    That's basically what I want to program, but I don't speak this coding language.

    When a Pokemon is Poisoned or Badly Poisoned, I want the code to check who used the poisoning move. If it is a Poison-type Pokemon, regular poison should be lifted and Toxic Poison should be applied. Otherwise, Toxic Poison should be removed and regular Poison should be applied.

    This change should promote the use of Poison-type Pokemon by making Toxic Poison into something only they can apply, be it with extra move effects or Poisonpowder or Toxic.
     
    Back
    Top