mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
15 lines
463 B
Lua
15 lines
463 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.Id, 30332, amount);
|
|
end
|
|
end; |