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/outmaneuver2.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

24 lines
No EOL
792 B
Lua

require("modifiers")
--Add 30 raw block rate. No idea how much block it actually gives.
function onGain(owner, effect)
owner.AddMod(modifiersGlobal.RawBlockRate, 30);
end
function onLose(owner, effect)
owner.SubtractMod(modifiersGlobal.RawBlockRate, 30);
end
--Gives 200 TP on block. Traited: Gives 10% of the amount blocked back as MP
function onBlock(effect, attacker, defender, action, actionContainer)
--200 TP on block
defender.AddTP(200);
--If traited, add 10% of damage taken as MP
if(effect.GetTier() == 2) then
local mpToReturn = math.ceil(0.10 * action.amount);
defender.AddMP(math.ceil(mpToReturn));
--33009: You recover x MP from Outmaneuver
actionContainer.AddMPAction(defender.actorId, 33009, mpToReturn);
end
end;