1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-20 11:47:48 +00:00
project-meteor-server/data/scripts/effects/aegis_boon.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

19 lines
No EOL
884 B
Lua

require("modifiers")
require("utils")
--Forces a full block (0 damage taken)
function onPreAction(effect, caster, target, skill, action, actionContainer)
--If action hit from the rear and is a weaponskill ation
action.blockRate = 100.0;
end;
--Heals for the amount of HP blocked, up to a certain point. I don't know what determines the cap but it seems to be 703 at level 50. Unsure if it scales down based on level, dlvl, or if that's an arbitrary cap added.
function onBlock(effect, attacker, defender, action, actionContainer)
--Amount blocked
local absorbAmount = math.Clamp(action.amountMitigated, 0, 703);
--33008: You recover x HP from Aegis Boon
defender.AddHP(absorbAmount);
actionContainer.AddHPAction(defender.actorId, 33008, absorbAmount);
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
end;