2018-06-25 23:36:18 -05:00
|
|
|
require("modifiers")
|
|
|
|
require("battleutils")
|
|
|
|
|
2019-05-29 23:05:40 -07:00
|
|
|
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
|
|
|
if skill.GetCommandType() == CommandType.Spell then
|
2018-06-25 23:36:18 -05:00
|
|
|
--Necrogenesis returns 75% of damage done rounded up(?) as MP.
|
|
|
|
local hpToReturn = math.ceil(0.75 * action.amount);
|
2019-05-29 23:05:40 -07:00
|
|
|
attacker.AddHP(hpToReturn);
|
|
|
|
actionContainer.AddHPAbsorbAction(defender.actorId, 33012, hpToReturn);
|
|
|
|
attacker.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
2018-06-25 23:36:18 -05:00
|
|
|
end
|
|
|
|
end
|