Fix hiteffect.lua to not use bor since we can't reference other members

of the same table

Change hp_penalty onGain and onLose to use the new function signature
This commit is contained in:
Yogurt 2019-06-01 02:59:41 -07:00
parent 4e054ca947
commit afe1e59889
3 changed files with 32 additions and 30 deletions

View file

@ -1,11 +1,11 @@
require("modifiers")
function onGain(target, effect)
local newMaxHP = target.GetMaxHP() * 0.75;
function onGain(owner, effect, actionContainer)
local newMaxHP = owner.GetMaxHP() * 0.75;
target.SetMaxHP(newMaxHP);
owner.SetMaxHP(newMaxHP);
end;
function onLose(target, effect)
target.SetMaxHP(target.GetMaxHP() / 0.75);
function onLose(owner, effect, actionContainer)
owner.SetMaxHP(owner.GetMaxHP() / 0.75);
end;