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

[Question] Im having trouble with an ability

2
Posts
4
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