mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-23 13:17:45 +00:00
12 lines
518 B
Lua
12 lines
518 B
Lua
![]() |
require("modifiers")
|
||
|
require("battleutils")
|
||
|
|
||
|
function onHit(effect, attacker, defender, action, actionContainer)
|
||
|
if action.commandType == CommandType.Spell then
|
||
|
--Necrogenesis returns 75% of damage done rounded up(?) as MP.
|
||
|
local hpToReturn = math.ceil(0.75 * action.amount);
|
||
|
attacker.AddMp(hpToReturn);
|
||
|
actionContainer.AddHPAction(attacker.actorId, 33012, mpToReturn);
|
||
|
actionContainer.AddAction(attacker.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||
|
end
|
||
|
end
|