• 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!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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.

Adding in "Cobra Strike" Ability

  • 378
    Posts
    12
    Years
    • Seen Oct 18, 2017
    I want to code in the ability "Cobra Strike" which makes all poison type moves stronger. Would this code work? I put right above Torrent, Blaze and Overgrow.

    Spoiler:
     
    I want to code in the ability "Cobra Strike" which makes all poison type moves stronger. Would this code work? I put right above Torrent, Blaze and Overgrow.

    Spoiler:

    Should work fine. You can shorten it to

    Code:
    if isConst?(attacker.ability,PBAbilities,:COBRASTRIKE) &&  isConst?(type,PBTypes,:POISON)
            basedmg=(basedmg*1.5).floor
          end
     
    Should work fine. You can shorten it to

    Code:
    if isConst?(attacker.ability,PBAbilities,:COBRASTRIKE) &&  isConst?(type,PBTypes,:POISON)
            basedmg=(basedmg*1.5).floor
          end

    Thanks! It worked! Just wanted confirmation.
     
    Thanks! It worked! Just wanted confirmation.

    For future reference, you can test if something works pretty easily.

    Code:
    if isConst?(attacker.ability,PBAbilities,:COBRASTRIKE) &&  isConst?(type,PBTypes,:POISON)
            basedmg=(basedmg*200).floor
          end

    Battle a higher level pokemon, and you should be able to tell if it changed it or not with ease.
     
    Back
    Top