• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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] How to make an ability check if the user is a certain type?

  • 35
    Posts
    4
    Years
    • Seen Mar 19, 2025
    Tried lifting the user.types script from Psywave but something is wrong and I'm pretty sure that's it.

    Battle::AbilityEffects::DamageCalcFromUser.add(:RAILGUN,
    proc { |ability, user, target, move, mults, baseDmg, type|
    if user.types == :ELECTRIC && move.physicalMove?
    if move.contactMove?
    mults[:base_damage_multiplier] *= 1.0
    else
    mults[:base_damage_multiplier] *= 2.0
    end
    end
    }
    )
     
    Back
    Top