landsandboat/scripts/effects/dia.lua
2025-02-17 02:40:44 +01:00

23 lines
779 B
Lua

-----------------------------------
-- xi.effect.DIA
-----------------------------------
-- Quick Explanation of Algorithm:
-- Dia 1: Power of 1. Results in reduced defense of ~5.27% (27/512) and 1 hp/tick damage.
-- Dia 2: Power of 2. Results in reduced defense of ~10.35% (53/512) and 2 hp/tick damage.
-- Dia 3: Power of 3. Results in reduced defense of ~15.4% (79/512) and 3 hp/tick damage.
-----------------------------------
---@type TEffect
local effectObject = {}
effectObject.onEffectGain = function(target, effect)
effect:addMod(xi.mod.REGEN_DOWN, effect:getPower())
effect:addMod(xi.mod.DEFP, -effect:getSubPower())
end
effectObject.onEffectTick = function(target, effect)
end
effectObject.onEffectLose = function(target, effect)
end
return effectObject