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,11 +1,27 @@
require("global");
require("weaponskill");
require("modifiers")
function onSkillPrepare(caster, target, skill)
return 0;
end;
--Resets rampage to increase damage
function onSkillStart(caster, target, skill)
--Get Rampage statuseffect
local rampage = caster.statusEffects.GetStatusEffectById(223208);
--if it isn't nil, remove the AP and Defense mods and reset extra to 0, increase potency
if rampage != nil then
local parryPerDT = 20;
local delayMsPerDT = 100;
caster.SubtractMod(modifiersGlobal.Parry, parryPerDT * rampage.GetExtra());
caster.AddMod(modifiersGlobal.Delay, delayMsPerDT * rampage.GetExtra());
rampage.SetExtra(0);
skill.basePotency = skill.basePotency * 1.5;
end;
return 0;
end;
@ -15,6 +31,10 @@ function onCombo(caster, target, skill)
end;
function onSkillFinish(caster, target, skill, action, actionContainer)
if target.target == caster then
skill.statusId = 223015
end;
--calculate ws damage
action.amount = skill.basePotency;
@ -23,4 +43,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
--Try to apply status effect
action.TryStatus(caster, target, skill, actionContainer, true);
skill.statusId = 0;
end;