mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
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
This commit is contained in:
17
data/scripts/effects/parsimony.lua
Normal file
17
data/scripts/effects/parsimony.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Forces crit of a single WS action from rear.
|
||||
function onMagicCast(caster, effect, skill)
|
||||
skill.mpCost = skill.mpCost / 2;
|
||||
end;
|
||||
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.Spell then
|
||||
--Parsimony returns 35% of damage done rounded up as MP.
|
||||
local mpToReturn = math.ceil(0.35 * action.amount);
|
||||
attacker.AddMp(mpToReturn);
|
||||
actionContainer.AddMPAction(attacker.actorId, 33007, mpToReturn);
|
||||
actionContainer.AddAction(attacker.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user