landsandboat/scripts/effects/doom.lua
WinterSolstice8 1694e4d8e7
[lua] Simplify doom status, doom counter (#9349)
* Lufaise Meadows NM Audits

Lufaise Meadows NM Audits

* [lua] Simplify doom status, change doom counter

---------

Co-authored-by: Kipling <kiplingffxi@gmail.com>
2026-02-03 18:42:03 +01:00

23 lines
596 B
Lua

-----------------------------------
-- xi.effect.DOOM
-----------------------------------
---@type TEffect
local effectObject = {}
effectObject.onEffectGain = function(target, effect)
end
effectObject.onEffectTick = function(target, effect)
local remainingTicks = math.floor(effect:getTimeRemaining() / 1000 - 0.5) / 3
-- doom counter
target:messagePublic(xi.msg.basic.DOOM_COUNTER, target, remainingTicks, remainingTicks)
end
effectObject.onEffectLose = function(target, effect)
if effect:getTimeRemaining() == 0 then
target:setHP(0)
end
end
return effectObject