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,30 +1,30 @@
require("modifiers")
require("battleutils")
function onGain(target, effect)
function onGain(owner, effect, actionContainer)
--Untraited Sentinel is 30% damage taken down, traited is 50%
local amount = 30;
if effect.GetTier() == 2 then
amount = 50;
end
target.AddMod(modifiersGlobal.DamageTakenDown, amount);
owner.AddMod(modifiersGlobal.DamageTakenDown, amount);
end;
function onLose(target, effect)
function onLose(owner, effect, actionContainer)
local amount = 30;
if effect.GetTier() == 2 then
amount = 50;
end
target.SubtractMod(modifiersGlobal.DamageTakenDown, amount);
owner.SubtractMod(modifiersGlobal.DamageTakenDown, amount);
end;
--Increases action's enmity by 100 for weaponskills
--http://forum.square-enix.com/ffxiv/threads/47393-Tachi-s-Guide-to-Paladin-%28post-1.22b%29
--Sentinel only works on weaponskills. It's possible that was a bug because the description says actions
function onHit(effect, attacker, defender, action, actionContainer)
if action.commandType == CommandType.WeaponSkill then
function onHit(effect, attacker, defender, skill, action, actionContainer)
if skill.GetCommandType() == CommandType.WeaponSkill then
action.enmity = action.enmity + 100;
end
end