53 lines
2.5 KiB
Lua
53 lines
2.5 KiB
Lua
-- Shared Ebonroc/Flamegor logic (Octo BigWigs Raids/BWL Ebonroc.lua, Flamegor.lua): Wing Buffet 23339 and
|
|
-- Shadow Flame 22539 from Tortoise boss_ebonroc.cpp / boss_flamegor.cpp.
|
|
local D = {}
|
|
OctoBossMods.BWLDrake = D
|
|
D.L = {
|
|
bar_wingBuffetCast = "Casting Wing Buffet!", bar_wingBuffetCd = "Wing Buffet CD",
|
|
msg_wingBuffetSoon = "Wing Buffet in 2 seconds - Taunt now!",
|
|
bar_shadowFlameCast = "Casting Shadow Flame!", msg_shadowFlameCast = "Casting Shadow Flame!",
|
|
bar_shadowFlameCd = "Shadow Flame CD",
|
|
}
|
|
D.timer = {wingBuffetFirstCd = 30, wingBuffetCd = 29, wingBuffetCast = 1, shadowFlameFirstCd = 16, shadowFlameCd = 14, shadowFlameCast = 2}
|
|
D.icon = {wingBuffet = "INV_Misc_MonsterScales_14", shadowFlame = "Spell_Fire_Incinerate"}
|
|
D.color = {wingBuffetCd = "Cyan", wingBuffetCast = "Blue", shadowFlameCd = "Orange", shadowFlameCast = "Red"}
|
|
|
|
function D.Engage(m)
|
|
local L, t = D.L, D.timer
|
|
m:Bar(L.bar_wingBuffetCd, t.wingBuffetFirstCd, D.icon.wingBuffet, true, D.color.wingBuffetCd)
|
|
m:DelayedMessage(t.wingBuffetFirstCd - 2, L.msg_wingBuffetSoon, "Attention")
|
|
m:Bar(L.bar_shadowFlameCd, t.shadowFlameFirstCd, D.icon.shadowFlame, true, D.color.shadowFlameCd)
|
|
end
|
|
function D.WingBuffet(m)
|
|
if not m:Throttle("wing", 3) then return end
|
|
local L, t = D.L, D.timer
|
|
m:CancelDelayedMessage(L.msg_wingBuffetSoon)
|
|
m:RemoveBar(L.bar_wingBuffetCd)
|
|
m:Bar(L.bar_wingBuffetCast, t.wingBuffetCast, D.icon.wingBuffet, true, D.color.wingBuffetCast)
|
|
m:DelayedBar(t.wingBuffetCast, L.bar_wingBuffetCd, t.wingBuffetCd, D.icon.wingBuffet, true, D.color.wingBuffetCd)
|
|
m:DelayedMessage(t.wingBuffetCast + t.wingBuffetCd - 2, L.msg_wingBuffetSoon, "Attention")
|
|
end
|
|
function D.ShadowFlameCast(m)
|
|
if not m:Throttle("sfcast", 3) then return end
|
|
m:RemoveBar(D.L.bar_shadowFlameCd)
|
|
m:Bar(D.L.bar_shadowFlameCast, D.timer.shadowFlameCast, D.icon.shadowFlame, true, D.color.shadowFlameCast)
|
|
m:Message(D.L.msg_shadowFlameCast, "Urgent")
|
|
end
|
|
function D.ShadowFlameHit(m)
|
|
if not m:Throttle("sfhit", 3) then return end
|
|
m:RemoveBar(D.L.bar_shadowFlameCd)
|
|
m:Bar(D.L.bar_shadowFlameCd, D.timer.shadowFlameCd, D.icon.shadowFlame, true, D.color.shadowFlameCd)
|
|
end
|
|
function D.Events(extra)
|
|
local e = {
|
|
SPELL_CAST_START = {[23339] = D.WingBuffet, [22539] = D.ShadowFlameCast},
|
|
SPELL_DAMAGE = {[22539] = D.ShadowFlameHit},
|
|
SPELL_MISSED = {[22539] = D.ShadowFlameHit},
|
|
}
|
|
for sub, handlers in pairs(extra or {}) do
|
|
e[sub] = e[sub] or {}
|
|
for k, v in pairs(handlers) do e[sub][k] = v end
|
|
end
|
|
return e
|
|
end
|