mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-23 21:27:46 +00:00
17 lines
493 B
Lua
17 lines
493 B
Lua
![]() |
require("modifiers")
|
||
|
require("hiteffect")
|
||
|
require("battleutils")
|
||
|
|
||
|
function onHit(effect, attacker, defender, action, actionContainer)
|
||
|
if action.commandType == 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.AddHPAction(defender.actorId, 30332, amount);
|
||
|
end
|
||
|
end;
|