project-meteor-server/data/scripts/effects/life_surge_II.lua
Yogurt 00017468cc New scripts
New scripts for commands and effects that use the new function
signatures and work with the new statuseffectcontainer
2019-05-29 23:05:40 -07:00

15 lines
468 B
Lua

require("battleutils")
function onHit(effect, attacker, defender, skill, action, actionContainer)
if skill.GetCommandType() == CommandType.AutoAttack then
local healPercent = 0.20;
if effect.GetTier() == 2 then
healPercent = 0.40;
end
local amount = math.floor((healPercent * action.amount) + 1);
attacker.AddHP(amount);
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
end
end;