Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==================================================
- # Add an OnDealingHit handler to apply the healing
- Battle::AbilityEffects::OnDealingHit.add(:VAMPIRISM,
- proc { |ability, user, targets, move, battle|
- # Apply healing to the user
- next if !move.bitingMove?
- next if !user.canHeal?
- heal = (targets.damageState.hpLost / 2)
- next if heal <= 0
- battle.pbShowAbilitySplash(user)
- user.pbRecoverHP(heal)
- if Battle::Scene::USE_ABILITY_SPLASH
- battle.pbDisplay(_INTL("{1}'s stole some health!", user.pbThis))
- else
- battle.pbDisplay(_INTL("{1}'s {2} recovers it a bit!", user.pbThis,
- user.abilityName))
- end
- battle.pbHideAbilitySplash(user)
- }
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement