60 lines
3.3 KiB
Lua
60 lines
3.3 KiB
Lua
-- Anomalus (Octo BigWigs Raids/KarazhanUpper/Anomalus.lua), Turtle Upper Karazhan, native server events.
|
|
-- Arcane Overload 51100/41694 (bomb, interval shrinks each time), Arcane Prison 51107, Manabound Strikes 51105 stacks,
|
|
-- Arcane Dampening 51101 (can soak, marked). Octo's movable Manabound status frame is replaced by your own expiry bar.
|
|
local L = {
|
|
msg_bombYou = "BOMB ON YOU - DPS HARD THEN RUN AWAY!", msg_bombOther = "BOMB on %s!", bar_bomb = "Next Bomb",
|
|
bar_bombExplosion = "BOMB ON YOU Explosion", msg_prison = "Arcane Prison on %s!", bar_manabound = "Manabound stacks expire",
|
|
bar_dampening = "Arcane Dampening - Can Soak",
|
|
}
|
|
local BOMB_TIMERS = {7, 15, 13.5, 12.1, 10.9, 9.8, 8.8, 8, 7.2, 6.5, 5.8, 5.2, 4.5}
|
|
local icon = {bomb = "INV_Misc_Bomb_04", prison = "Spell_Frost_Glacier", manabound = "Spell_Holy_FlashHeal", dampening = "Spell_Nature_AbolishMagic"}
|
|
local DAMPEN_MARKS = {1, 2, 3, 4, 5, 6, 7}
|
|
local m = OctoBossMods:NewModule("Anomalus", {npcs = {61951}, displayName = "Anomalus", zone = "Karazhan"})
|
|
function m:OnEngage()
|
|
self.bombs, self.dampened, self.nextMark = 1, {}, 1
|
|
self:Bar(L.bar_bomb, BOMB_TIMERS[1], icon.bomb, true, "White")
|
|
end
|
|
function m:Bomb(_, _, dstGUID, dstName)
|
|
if not dstName or not self:Throttle("bomb", 2) then return end
|
|
self.bombs = self.bombs + 1
|
|
if dstGUID == UnitGUID("player") then
|
|
self:Message(L.msg_bombYou, "Important", true, "Alarm")
|
|
self:WarningSign(icon.bomb, 5, true, "BOMB ON YOU")
|
|
self:Bar(L.bar_bombExplosion, 15, icon.bomb, true, "Red")
|
|
else
|
|
self:Message(format(L.msg_bombOther, dstName), "Important")
|
|
end
|
|
self:SetRaidTargetForPlayer(dstName, 8)
|
|
self:RemoveBar(L.bar_bomb)
|
|
self:Bar(L.bar_bomb, BOMB_TIMERS[self.bombs] or 4.5, icon.bomb, true, "White")
|
|
end
|
|
function m:BombFade(_, _, dstGUID)
|
|
if dstGUID == UnitGUID("player") then self:RemoveBar(L.bar_bombExplosion) self:RemoveWarningSign(icon.bomb) end
|
|
end
|
|
function m:Prison(_, _, _, dstName) if dstName then self:Message(format(L.msg_prison, dstName), "Attention") end end
|
|
function m:Manabound(_, _, dstGUID)
|
|
if dstGUID ~= UnitGUID("player") then return end
|
|
self:RemoveBar(L.bar_manabound)
|
|
self:Bar(L.bar_manabound, 60, icon.manabound, true, "Blue")
|
|
end
|
|
function m:ManaboundFade(_, _, dstGUID) if dstGUID == UnitGUID("player") then self:RemoveBar(L.bar_manabound) end end
|
|
function m:Dampening(_, _, dstGUID, dstName)
|
|
if not dstName then return end
|
|
if dstGUID == UnitGUID("player") then self:Bar(L.bar_dampening, 45, icon.dampening, true, "Cyan") end
|
|
if not self.dampened[dstName] then
|
|
self.dampened[dstName] = true
|
|
self:SetRaidTargetForPlayer(dstName, DAMPEN_MARKS[self.nextMark])
|
|
self.nextMark = self.nextMark % #DAMPEN_MARKS + 1
|
|
end
|
|
end
|
|
function m:DampeningFade(_, _, dstGUID, dstName)
|
|
if not dstName then return end
|
|
if dstGUID == UnitGUID("player") then self:RemoveBar(L.bar_dampening) end
|
|
if self.dampened[dstName] then self.dampened[dstName] = nil self:RestorePreviousRaidTargetForPlayer(dstName) end
|
|
end
|
|
m.events = {
|
|
SPELL_AURA_APPLIED = {[51100] = "Bomb", [41694] = "Bomb", [51107] = "Prison", [51105] = "Manabound", [51101] = "Dampening"},
|
|
SPELL_AURA_APPLIED_DOSE = {[51105] = "Manabound"},
|
|
SPELL_AURA_REMOVED = {[51100] = "BombFade", [41694] = "BombFade", [51105] = "ManaboundFade", [51101] = "DampeningFade"},
|
|
}
|