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

Raising Attack from an Ability?

Grey Metagross

B/W e4 music for the win.
19
Posts
13
Years
  • I need help getting an Ability to raise Attack. The ability is called ArcLightning, and it's just like LightningRod except it raises the Attack stat instead of the Sp.Attack stat. I'm very confused as to what I should have ArcLightning say to raise Attack. Does anyone know how to do this?

    LightningRod:
    Code:
    if targets.length>0 && isConst?(thismove.type,PBTypes,:ELECTRIC) && 
           !isConst?(target.ability,PBAbilities,:LIGHTNINGROD)
          # all damaging Electric attacks have a target of "single non-user"
          for i in priority # use Pokémon earliest in priority
            next if !pbIsOpposing?(i.index)
            if isConst?(i.ability,PBAbilities,:LIGHTNINGROD)
              target=i# X's LightningRod took the attack!
              changeeffect=1
              break
            end
          end
        end
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Copy-pasting is good enough for a start.

    What you've quoted is the target redirection part of LightningRod's effect. You'll need to worry about something in there, which is the changeeffect=1 line. The number determines which message is shown to indicate that the ability has taken effect - see the end of the def this code appears in. 5 and onwards are free for use.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Search the scripts for every instance of LIGHTNINGROD. One of them is the part which raises Sp. Atk. Again, copy-paste.
     
    Back
    Top