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,7 +1,7 @@
require("battleutils")
function onHit(effect, attacker, defender, action, actionContainer)
if action.commandType == CommandType.AutoAttack then
function onHit(effect, attacker, defender, skill, action, actionContainer)
if skill.GetCommandType() == CommandType.AutoAttack then
local healPercent = 0.20;
if effect.GetTier() == 2 then
@ -10,6 +10,6 @@ function onHit(effect, attacker, defender, action, actionContainer)
local amount = math.floor((healPercent * action.amount) + 1);
attacker.AddHP(amount);
actionContainer.AddHPAction(defender.actorId, 30332, amount);
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
end
end;