New scripts

New scripts for commands and effects that use the new function
signatures and work with the new statuseffectcontainer
This commit is contained in:
Yogurt 2019-05-29 23:05:40 -07:00
parent 4f80023156
commit 00017468cc
129 changed files with 884 additions and 396 deletions

View file

@ -1,16 +1,16 @@
require("modifiers");
--15% in ARR, dont know how it worked in 1.0
function onGain(target, effect)
target.AddMod(modifiersGlobal.RawEvadeRate, 15);
function onGain(owner, effect, actionContainer)
owner.AddMod(modifiersGlobal.RawEvadeRate, 15);
end;
function onLose(target, effect)
target.SubtractMod(modifiersGlobal.RawEvadeRate, 15);
function onLose(owner, effect, actionContainer)
owner.SubtractMod(modifiersGlobal.RawEvadeRate, 15);
end;
--Returns 25%? of amount dodged as MP
function onEvade(effect, attacker, defender, action, actionContainer)
function onEvade(effect, attacker, defender, skill, action, actionContainer)
--25% of amount dodged untraited, 50% traited
local percent = 0.25;
if (effect.GetTier() == 2) then
@ -22,5 +22,5 @@ function onEvade(effect, attacker, defender, action, actionContainer)
--33010: You recover x MP from Featherfoot
actionContainer.AddMPAction(defender.actorId, 33010, mpToReturn);
--Featherfoot is lost after evading
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
end;