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

[Scripting Question] [v18] How to make this work?

HeroesFightingFear

"The Champion of Alon"
  • 99
    Posts
    5
    Years
    I want to make an ability that uses Physical Defense to deal damage with Physical attacks, and Special Defense to deal damage with Special attacks.
    Any help would be appreciated, but you do not have to if you dont want to.

    Ability
    Offensive Armament - The Pokémon uses its Defenses to attack.
     
    Easiest way I can think of is editing def pbGetAttackStats(user,target) to check if the user has the working ability (user.hasActiveAbility?(:OFFENSIVEARMAMENT)) and returning the defensive stats instead.

    there's 2 pbGetAttackStats, as Foul Play also defines this method to use the target's stats against it. You can probably leave that one alone, since it has it's own, mostly unrelated gimmick.
    But it would be the same deal there if you really wanted to.
     
    Thank you for the tip, it helped a lot.
     
    Back
    Top