76 lines
4.2 KiB
Lua
76 lines
4.2 KiB
Lua
-- Broodlord Lashlayer (Octo BigWigs Raids/BWL/Broodlord.lua r30141), native events.
|
|
-- boss_broodlord_lashlayer.cpp: Mortal Strike 24573, Blast Wave 23331, Knock Away 18670; Serrated Wound 52754 (Turtle).
|
|
local L = {
|
|
msg_msEvade = "Mortal Strike was Dodged!", bar_msCd = "Mortal Strike CD", bar_msSoon = "Mortal Strike Soon...",
|
|
bar_msDur = " Mortal Strike", msg_ms = " Mortal Strike", bar_bwCd = "Blast Wave CD", bar_bwSoon = "Blast Wave Soon...",
|
|
bar_knockCd = "Knock Away CD", bar_knockSoon = "Knock Away Soon...", bar_serratedDur = ">%s< bleeding",
|
|
}
|
|
local timer = {msFirstCd = 30, msCd = 20, msSoon = 10, msDur = 5, bwCd = 20, bwSoon = 15,
|
|
knockFirstCd = 20, knockFirstSoon = 5, knockCd = 12, knockSoon = 13, serratedDur = 10}
|
|
local icon = {ms = "Ability_Warrior_SavageBlow", bw = "Spell_Holy_Excorcism_02", knock = "INV_Gauntlets_05", serrated = "Ability_Rogue_Rupture"}
|
|
local color = {msCd = "Black", msSoon = "Black", msDur = "Magenta", bwCd = "Orange", bwSoon = "Red", knockCd = "Cyan",
|
|
knockSoon = "Blue", serrated = "Yellow"}
|
|
|
|
local m = OctoBossMods:NewModule("Broodlord Lashlayer", {npcs = {12017}, displayName = "Broodlord Lashlayer",
|
|
zone = "Blackwing Lair", engageYells = {"None of your kind should be here! You've doomed only yourselves!"}})
|
|
|
|
function m:OnEngage()
|
|
self:Bar(L.bar_msCd, timer.msFirstCd, icon.ms, true, color.msCd)
|
|
self:Bar(L.bar_bwCd, timer.bwCd, icon.bw, true, color.bwCd)
|
|
self:Bar(L.bar_knockCd, timer.knockFirstCd, icon.knock, true, color.knockCd)
|
|
self:DelayedBar(timer.knockFirstCd, L.bar_knockSoon, timer.knockFirstSoon, icon.knock, true, color.knockSoon)
|
|
-- Octo: the raid leader/officer keeps a skull on Broodlord's current target.
|
|
self:ScheduleRepeatingEvent("target", function()
|
|
if (UnitIsGroupLeader("player") or UnitIsGroupAssistant("player")) and OctoBossMods.NpcId(UnitGUID("target")) == 12017 and UnitExists("targettarget") then
|
|
SetRaidTarget("targettarget", 8)
|
|
end
|
|
end, 0.5)
|
|
end
|
|
local function msTimers(self, first)
|
|
self:CancelDelayedBar(L.bar_msSoon)
|
|
self:RemoveBar(L.bar_msSoon)
|
|
self:RemoveBar(L.bar_msCd)
|
|
if first then
|
|
self:DelayedBar(timer.msDur, L.bar_msCd, timer.msCd, icon.ms, true, color.msCd)
|
|
else
|
|
self:Bar(L.bar_msCd, timer.msDur + timer.msCd, icon.ms, true, color.msCd)
|
|
end
|
|
self:DelayedBar(timer.msDur + timer.msCd, L.bar_msSoon, timer.msSoon, icon.ms, true, color.msSoon)
|
|
end
|
|
function m:MortalStrike(_, _, _, dstName)
|
|
if not dstName or not self:Throttle("ms", 3) then return end
|
|
msTimers(self, true)
|
|
self:Bar(dstName .. L.bar_msDur, timer.msDur, icon.ms, true, color.msDur)
|
|
self:Message(dstName .. L.msg_ms, "Urgent")
|
|
end
|
|
function m:MortalStrikeMissed()
|
|
if not self:Throttle("ms", 3) then return end
|
|
msTimers(self, false)
|
|
self:Message(L.msg_msEvade, "Urgent")
|
|
end
|
|
function m:MortalStrikeFade(_, _, _, dstName) if dstName then self:RemoveBar(dstName .. L.bar_msDur) end end
|
|
function m:BlastWave()
|
|
if not self:Throttle("bw", 3) then return end
|
|
self:CancelDelayedBar(L.bar_bwSoon)
|
|
self:RemoveBar(L.bar_bwSoon)
|
|
self:Bar(L.bar_bwCd, timer.bwCd, icon.bw, true, color.bwCd)
|
|
self:DelayedBar(timer.bwCd, L.bar_bwSoon, timer.bwSoon, icon.bw, true, color.bwSoon)
|
|
end
|
|
function m:KnockAway()
|
|
if not self:Throttle("knock", 3) then return end
|
|
self:CancelDelayedBar(L.bar_knockSoon)
|
|
self:RemoveBar(L.bar_knockSoon)
|
|
self:Bar(L.bar_knockCd, timer.knockCd, icon.knock, true, color.knockCd)
|
|
self:DelayedBar(timer.knockCd, L.bar_knockSoon, timer.knockSoon, icon.knock, true, color.knockSoon)
|
|
end
|
|
function m:Serrated(_, _, _, dstName) if dstName then self:Bar(format(L.bar_serratedDur, dstName), timer.serratedDur, icon.serrated, true, color.serrated) end end
|
|
function m:SerratedFade(_, _, _, dstName) if dstName then self:RemoveBar(format(L.bar_serratedDur, dstName)) end end
|
|
|
|
m.events = {
|
|
SPELL_AURA_APPLIED = {[24573] = "MortalStrike", [52754] = "Serrated", ["Serrated Wound"] = "Serrated"},
|
|
SPELL_AURA_REMOVED = {[24573] = "MortalStrikeFade", [52754] = "SerratedFade", ["Serrated Wound"] = "SerratedFade"},
|
|
SPELL_MISSED = {[24573] = "MortalStrikeMissed"},
|
|
SPELL_DAMAGE = {[23331] = "BlastWave"},
|
|
SPELL_CAST_SUCCESS = {[23331] = "BlastWave", [18670] = "KnockAway"},
|
|
}
|