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,18 +1,18 @@
require("modifiers")
--Increases block rate by 100%
function onGain(owner, effect)
function onGain(owner, effect, actionContainer)
owner.AddMod(modifiersGlobal.RawBlockRate, 100);
end
function onLose(owner, effect)
function onLose(owner, effect, actionContainer)
owner.SubtractMod(modifiersGlobal.RawBlockRate, 100);
end
--Applys Divine Regen to party in range when healed by cure or cura
function onHealed(caster, target, effect, skill, action, actionContainer)
function onHealed(effect, caster, target, skill, action, actionContainer)
-- cure cura
if (skill.id == 27346 or skill.id == 27347) and (caster != owner) then
if (skill.id == 27346 or skill.id == 27347) and (caster != target) then
local regenDuration = 30;
--Apparently heals for 85 without AF, 113 with. Unsure if these can be improved with stats
local magnitude = 85
@ -23,9 +23,8 @@ function onHealed(caster, target, effect, skill, action, actionContainer)
end
--For each party member in range, add divine regen
for chara in owner.GetPartyMembersInRange(8) do
local addAction = chara.statusEffects.AddStatusForBattleAction(223264, effect.GetTier(), magnitude, regenDuration);
actionContainer.AddAction(addAction);
for chara in target.GetPartyMembersInRange(8) do
chara.statusEffects.AddStatusEffect(223264, effect.GetTier(), magnitude, regenDuration, actionContainer);
end
end
end;