landsandboat/scripts/effects/bane.lua

23 lines
745 B
Lua
Raw Permalink Normal View History

2016-01-16 01:26:33 -05:00
-----------------------------------
2021-04-01 15:10:15 -04:00
-- xi.effect.BANE
2016-01-16 01:26:33 -05:00
-----------------------------------
---@type TEffect
local effectObject = {}
2016-01-16 01:26:33 -05:00
effectObject.onEffectGain = function(target, effect)
2016-01-16 01:26:33 -05:00
--NOTE: The power amount dictates the amount to REDUCE MAX VALUES BY. E.g. Power=75 means 'reduce max hp/mp by 75%'
target:addMod(xi.mod.CURSE_PCT, -effect:getPower())
target:addMod(xi.mod.MOVE_SPEED_WEIGHT_PENALTY, effect:getPower())
end
2016-01-16 01:26:33 -05:00
effectObject.onEffectTick = function(target, effect)
end
2016-01-16 01:26:33 -05:00
effectObject.onEffectLose = function(target, effect)
--restore HP and MP to its former state.
target:delMod(xi.mod.CURSE_PCT, -effect:getPower())
target:addMod(xi.mod.MOVE_SPEED_WEIGHT_PENALTY, effect:getPower())
end
return effectObject