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

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

HeroesFightingFear

"The Champion of Alon"
  • 99
    Posts
    4
    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.
     
  • 1,682
    Posts
    8
    Years
    • Seen yesterday
    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.
     
    Back
    Top