• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Akari, Red, Kris, May - which Pokémon protagonist is your favorite? Let us know by voting in our semifinal favorite protagonist 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.

[Question] Im having trouble with an ability

  • 2
    Posts
    5
    Years
    • Seen Jan 16, 2024
    Im having trouble with an ability that makes biting moves act like giga drain, also doesnt help that im incredibly new to scripting.
    This is my script ive wrote:
    Battle::AbilityEffects::DamageCalcFromUser.add(:CARNIVORE,
    proc { |ability, user, target, move, mults, baseDmg, type|
    if move.bitingMove?

    original_target_hp = target.hp


    damage_dealt = target.pbReduceHP(baseDmg, false)


    target.pbFaint if target.hp <= 0


    hp_restored = original_target_hp - target.hp


    user.pbRecoverHP(hp_restored) if hp_restored > 0
    end
    }
    )

    But its working kind of weird, hard to explain in words so heres a short video of what im talking about.
    Im trying to get the healing exactly like how giga drain works is there anything i can do?
     
    Back
    Top