81 lines
4.2 KiB
Lua
81 lines
4.2 KiB
Lua
-- Firemaw (Octo BigWigs Raids/BWL/Firemaw.lua r30141), native events.
|
|
-- Spell IDs: Tortoise boss_firemaw.cpp (Shadow Flame 22539, Wing Buffet 23339, Flame Buffet 23341).
|
|
local 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",
|
|
msg_sfzone = "Look for new Floor Zones!", bar_sfzoneFind = "find new Zone(s)", bar_sfzone = "soak Floor Zone(s)",
|
|
warn_sfexplosion = "Unsoaked Zone!", bar_flameBuffet = "Flame Buffet",
|
|
msg_flameBuffetYou = " Flame Buffet Stacks - Consider losing your stacks",
|
|
}
|
|
local timer = {wingBuffetFirstCd = 30, wingBuffetCd = 29, wingBuffetCast = 1, shadowFlameCd = 14, shadowFlameCast = 2,
|
|
sfzonePre = 4, sfzoneDur = 8, flameBuffet = {1.7, 3.0}}
|
|
local icon = {wingBuffet = "INV_Misc_MonsterScales_14", shadowFlame = "Spell_Fire_Incinerate", flameBuffet = "Spell_Fire_Fireball",
|
|
sfzone = "spell_shadow_antishadow", sfexplosion = "Spell_Fire_SelfDestruct"}
|
|
local color = {wingBuffetCd = "Cyan", wingBuffetCast = "Blue", shadowFlameCd = "Orange", shadowFlameCast = "Red",
|
|
sfzone = "Black", flameBuffet = "Black"}
|
|
|
|
local m = OctoBossMods:NewModule("Firemaw", {npcs = {11983}, displayName = "Firemaw", zone = "Blackwing Lair"})
|
|
|
|
function m:OnEngage()
|
|
self.zoneWarned = false
|
|
self:Bar(L.bar_wingBuffetCd, timer.wingBuffetFirstCd, icon.wingBuffet, true, color.wingBuffetCd)
|
|
self:DelayedMessage(timer.wingBuffetFirstCd - 2, L.msg_wingBuffetSoon, "Attention")
|
|
self:Bar(L.bar_shadowFlameCd, timer.shadowFlameCd, icon.shadowFlame, true, color.shadowFlameCd)
|
|
end
|
|
|
|
function m:WingBuffet()
|
|
if not self:Throttle("wing", 3) then return end
|
|
self:CancelDelayedMessage(L.msg_wingBuffetSoon)
|
|
self:RemoveBar(L.bar_wingBuffetCd)
|
|
self:Bar(L.bar_wingBuffetCast, timer.wingBuffetCast, icon.wingBuffet, true, color.wingBuffetCast)
|
|
self:DelayedBar(timer.wingBuffetCast, L.bar_wingBuffetCd, timer.wingBuffetCd, icon.wingBuffet, true, color.wingBuffetCd)
|
|
self:DelayedMessage(timer.wingBuffetCast + timer.wingBuffetCd - 2, L.msg_wingBuffetSoon, "Attention")
|
|
end
|
|
|
|
function m:ShadowFlameCast()
|
|
if not self:Throttle("sfcast", 3) then return end
|
|
self:RemoveBar(L.bar_shadowFlameCd)
|
|
self:Bar(L.bar_shadowFlameCast, timer.shadowFlameCast, icon.shadowFlame, true, color.shadowFlameCast)
|
|
self:Message(L.msg_shadowFlameCast, "Urgent")
|
|
end
|
|
|
|
function m:ShadowFlameHit()
|
|
if not self:Throttle("sfhit", 3) then return end
|
|
self:RemoveBar(L.bar_shadowFlameCd)
|
|
self:Bar(L.bar_shadowFlameCd, timer.shadowFlameCd, icon.shadowFlame, true, color.shadowFlameCd)
|
|
self:Message(L.msg_sfzone, "Core")
|
|
self:Bar(L.bar_sfzoneFind, timer.sfzonePre, icon.sfzone, true, color.sfzone)
|
|
self:DelayedBar(timer.sfzonePre, L.bar_sfzone, timer.sfzoneDur, icon.sfzone, true, color.sfzone)
|
|
self.zoneWarned = false
|
|
end
|
|
|
|
function m:FlameBuffet()
|
|
self:RemoveBar(L.bar_flameBuffet)
|
|
self:IntervalBar(L.bar_flameBuffet, timer.flameBuffet[1], timer.flameBuffet[2], icon.flameBuffet, true, color.flameBuffet)
|
|
end
|
|
|
|
function m:FlameBuffetStacks(_, _, dstGUID, _, _, _, _, _, amount)
|
|
if dstGUID ~= UnitGUID("player") or not amount or amount < 8 then return end
|
|
-- Octo: no warning while tanking Firemaw.
|
|
if OctoBossMods.NpcId(UnitGUID("target")) == 11983 and UnitIsUnit("targettarget", "player") then return end
|
|
self:Message(amount .. L.msg_flameBuffetYou, "Personal")
|
|
self:WarningSign(icon.flameBuffet, 0.7)
|
|
self:Sound("Info")
|
|
end
|
|
|
|
function m:ShadowflameExplosion()
|
|
if not self:Throttle("sfexplosion", 1.5) then return end
|
|
self:WarningSign(icon.sfexplosion, 1, false, L.warn_sfexplosion)
|
|
if self.zoneWarned then self:Sound("Alarm") else self:Sound("Beware") self.zoneWarned = true end
|
|
end
|
|
|
|
m.events = {
|
|
SPELL_CAST_START = {[23339] = "WingBuffet", [22539] = "ShadowFlameCast"},
|
|
SPELL_DAMAGE = {[22539] = "ShadowFlameHit", ["Shadowflame Explosion"] = "ShadowflameExplosion"},
|
|
SPELL_MISSED = {[22539] = "ShadowFlameHit"},
|
|
SPELL_CAST_SUCCESS = {[23341] = "FlameBuffet"},
|
|
SPELL_AURA_APPLIED_DOSE = {[23341] = "FlameBuffetStacks"},
|
|
}
|