• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
9
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:
    148
    Posts
    11
    Years
  • 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.
     
    19
    Posts
    9
    Years
    • Seen Aug 23, 2015
    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 >.<
     
    148
    Posts
    11
    Years
  • 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.
     
    1,224
    Posts
    10
    Years
  • 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
     
    148
    Posts
    11
    Years
  • 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:
    19
    Posts
    9
    Years
    • Seen Aug 23, 2015
    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?
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    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