• 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!
  • 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.

Ability to add status problem to every attack

  • 19
    Posts
    10
    Years
    • Seen Aug 23, 2015
    I wanted to try making an ability that added a chance, for select moves, to poison (or any other status problem) the target. I'm no good at scripting, but this is what I thought would be on the right track.

    Code:
          if isConst?(attacker.ability,PBAbilities,:POISONSKIN)
            if @id == 25 or @id == 56 or @id == 93 or @id == 548 && #Move IDs
             self.pbRandom(10)<3 && user.pbCanPoison?(false)
            user.pbPoison(target)
            pbDisplay(_INTL("{1}'s {2} poisoned {3}!",target.pbThis,
               PBAbilities.getName(target.ability),user.pbThis(true)))
              end
           end

    Wanted it to be select moves so both contact and non contact moves could add the chance to poison. Also, because I thought adding a chance for additional status problems on a move that already added one would mess the game up. Am I on the right train of thought or completely off with this?

    EDIT: Tried testing it and I couldn't attack.
     
    Last edited:
    Sorry no one is replying, I tried to make this work but I'm pretty limited with my scripting as well. I had the can't attack bug too, putting it under "POISONTOUCH" in "PokeBattle_Battle" fixed that. Sorry I couldn't be more help. It sounds like a cool effect. Hope you get it working.
     
    Sorry no one is replying, I tried to make this work but I'm pretty limited with my scripting as well. I had the can't attack bug too, putting it under "POISONTOUCH" in "PokeBattle_Battle" fixed that. Sorry I couldn't be more help. It sounds like a cool effect. Hope you get it working.

    I really thought this would be a simple thing to figure out. I hope it's not just a small error preventing this from working >.<
     
    Worst case, if you only wanted to make this for one pokemon, make all new moves for it in the Moves file and give all of them the ability to poison. Then make a dummy ability that doesn't actually do anything but says it makes all it's moves have a chance to poison.
     
    That would be way too much work for this JynxedOne lol

    maybe something like this?
    Code:
      if isConst?(user.ability,PBAbilities,:POISONSKIN) &&
             self.pbRandom(10)<3 && target.pbCanPoison?(false) && (move.id== 25 or move.id== 56 or move.id== 93 or move.id== 548)
            target.pbPoison(user)
            pbDisplay(_INTL("{1}'s {2} poisoned {3}!",user.pbThis,
               PBAbilities.getName(user.ability),target.pbThis(true)))
          end
     
    That would be way too much work for this JynxedOne lol

    maybe something like this?
    Code:
      if isConst?(user.ability,PBAbilities,:POISONSKIN) &&
             self.pbRandom(10)<3 && target.pbCanPoison?(false) && (move.id== 25 or move.id== 56 or move.id== 93 or move.id== 548)
            target.pbPoison(user)
            pbDisplay(_INTL("{1}'s {2} poisoned {3}!",user.pbThis,
               PBAbilities.getName(user.ability),target.pbThis(true)))
          end

    Not a lot of work, just a lot of copy and pasting :P

    Works fine. Definitely going to use this. Thanks!
     
    Last edited:
    That would be way too much work for this JynxedOne lol

    maybe something like this?
    Code:
      if isConst?(user.ability,PBAbilities,:POISONSKIN) &&
             self.pbRandom(10)<3 && target.pbCanPoison?(false) && (move.id== 25 or move.id== 56 or move.id== 93 or move.id== 548)
            target.pbPoison(user)
            pbDisplay(_INTL("{1}'s {2} poisoned {3}!",user.pbThis,
               PBAbilities.getName(user.ability),target.pbThis(true)))
          end

    Thank you mej71. This is pretty close to the last code I came up with. Glad to know I wasn't far off. The line " self.pbRandom(10)<3" is the percent chance that poison will effect the target right?
     
    You know that King's Rock works in pretty much the same way, right? You'd just need to make sure your effect only applies to certain moves (whatever criteria you have for it).
     
    Back
    Top