2018-04-18 16:06:41 -05:00
|
|
|
require("modifiers")
|
|
|
|
|
|
|
|
--Battle Voice grants HP_Boost and it sets max hp to 125% normal amount and heals for the difference between current
|
|
|
|
--This doesn't seem like the correct way to do this. If max HP changes between gainign and losing wont this break?
|
2019-05-29 23:05:40 -07:00
|
|
|
function onGain(owner, effect, actionContainer)
|
2019-06-01 21:21:21 -07:00
|
|
|
local newMaxHP = owner.GetMaxHP() * 1.25;
|
|
|
|
local healAmount = newMaxHP - owner.GetMaxHP();
|
2018-04-18 16:06:41 -05:00
|
|
|
|
2019-05-29 23:05:40 -07:00
|
|
|
owner.SetMaxHP(newMaxHP);
|
|
|
|
owner.AddHP(healAmount);
|
2018-04-18 16:06:41 -05:00
|
|
|
end;
|
|
|
|
|
2019-05-29 23:05:40 -07:00
|
|
|
function onLose(owner, effect, actionContainer)
|
|
|
|
owner.SetMaxHP(owner.GetMaxHP() / 1.25);
|
2018-04-18 16:06:41 -05:00
|
|
|
end;
|