• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - 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.

Raising Attack from an Ability?

Grey Metagross

B/W e4 music for the win.
  • 19
    Posts
    14
    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
     
    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.
     
    I'm still confused about how to make the ability actually take effect, raising the Pokémon's Attack stat...

    Sorry to be a bother.
     
    Back
    Top