project-meteor-server/data/scripts/effects/necrogenesis.lua
yogurt c442dc9ecd Script fixes and new effects.
Cleaned up unneeded requires in some scripts
Fixed Second Wind
Added new effect scripts
Added bard song scripts that mostly work
2018-06-25 23:36:18 -05:00

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