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

[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