You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
4.4 KiB

4 years ago
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Skolex, the Insatiable Ravener", 2481, 2465)
if not mod then return end
mod:RegisterEnableMob(181395) -- Skolex
mod:SetEncounterID(2542)
mod:SetRespawnTime(30)
--------------------------------------------------------------------------------
-- Locals
--
local tankComboCounter = 1
local comboCounter = 1
local flailCount = 1
local retchCount = 1
4 years ago
local burrowCount = 1
4 years ago
--------------------------------------------------------------------------------
-- Localization
--
local L = mod:GetLocale()
if L then
4 years ago
L.tank_combo = CL.tank_combo
L.tank_combo_desc = "Timer for Riftmaw/Rend casts at 100 energy."
L.tank_combo_icon = 359979
4 years ago
end
--------------------------------------------------------------------------------
-- Initialization
--
function mod:GetOptions()
return {
"berserk",
4 years ago
359770, -- Ravening Burrow
4 years ago
359829, -- Dust Flail
360451, -- Retch
4 years ago
"tank_combo", -- Tank Combo
4 years ago
359979, -- Rend
359975, -- Riftmaw
364778, -- Destroy
}
end
function mod:OnBossEnable()
self:RegisterUnitEvent("UNIT_SPELLCAST_SUCCEEDED", nil, "boss1")
4 years ago
self:Log("SPELL_CAST_START", "RaveningBurrow", 359770)
4 years ago
self:Log("SPELL_CAST_START", "DustFlail", 359829)
self:Log("SPELL_CAST_START", "Retch", 360451)
self:Log("SPELL_CAST_START", "Rend", 359979)
self:Log("SPELL_CAST_START", "Riftmaw", 359975)
self:Log("SPELL_CAST_START", "Destroy", 364778)
end
function mod:OnEngage()
tankComboCounter = 1
flailCount = 1
retchCount = 1
4 years ago
burrowCount = 1
4 years ago
self:Bar(359829, 2, CL.count:format(self:SpellName(359829), flailCount)) -- Dust Flail
4 years ago
self:Bar("tank_combo", 9, CL.count:format(CL.tank_combo, tankComboCounter), L.tank_combo_icon) -- Tank Combo
4 years ago
self:Bar(360451, 24.5, CL.count:format(self:SpellName(360451), retchCount)) -- Retch
self:Berserk(360)
end
--------------------------------------------------------------------------------
-- Event Handlers
--
function mod:UNIT_SPELLCAST_SUCCEEDED(_, _, _, spellId)
if spellId == 360079 then -- Tank Combo
self:StopBar(CL.count:format(CL.tank_combo, tankComboCounter))
comboCounter = 1
tankComboCounter = tankComboCounter + 1
4 years ago
self:CDBar("tank_combo", self:Easy() and 36.5 or 33, CL.count:format(CL.tank_combo, tankComboCounter), L.tank_combo_icon) -- Tank Combo
4 years ago
end
end
4 years ago
function mod:RaveningBurrow(args)
self:Message(args.spellId, "red", CL.count:format(args.spellName, burrowCount))
4 years ago
self:PlaySound(args.spellId, "long")
4 years ago
burrowCount = burrowCount + 1
4 years ago
local nextTankCombo = self:BarTimeLeft(CL.count:format(CL.tank_combo, tankComboCounter)) + 10
4 years ago
self:CDBar("tank_combo", nextTankCombo, CL.count:format(CL.tank_combo, tankComboCounter), L.tank_combo_icon) -- Tank Combo
4 years ago
local nextRetch = self:BarTimeLeft(CL.count:format(self:SpellName(360451), retchCount)) + 10 -- XXX Not Always correct, different logic?
self:Bar(360451, nextRetch, CL.count:format(self:SpellName(360451), retchCount)) -- Retch
4 years ago
self:StopBar(CL.count:format(self:SpellName(359829), flailCount)) -- Dust Flail
4 years ago
flailCount = 1
self:Bar(359829, 11, CL.count:format(self:SpellName(359829), flailCount)) -- Dust Flail
end
function mod:DustFlail(args)
self:StopBar(CL.count:format(args.spellName, flailCount))
self:Message(args.spellId, "yellow", CL.count:format(args.spellName, flailCount))
self:PlaySound(args.spellId, "alert")
flailCount = flailCount + 1
4 years ago
self:CDBar(args.spellId, self:Easy() and 19.5 or 17, CL.count:format(args.spellName, flailCount))
4 years ago
end
function mod:Retch(args)
self:StopBar(CL.count:format(args.spellName, retchCount))
self:Message(args.spellId, "cyan", CL.count:format(args.spellName, retchCount))
self:PlaySound(args.spellId, "info")
retchCount = retchCount + 1
self:CDBar(args.spellId, 34, CL.count:format(args.spellName, retchCount))
end
function mod:Rend(args)
self:Message(args.spellId, "purple", CL.count:format(args.spellName, comboCounter))
self:PlaySound(args.spellId, "alarm")
comboCounter = comboCounter + 1
end
function mod:Riftmaw(args)
self:Message(args.spellId, "purple", CL.count:format(args.spellName, comboCounter))
self:PlaySound(args.spellId, "alarm")
comboCounter = comboCounter + 1
end
function mod:Destroy(args)
self:Message(args.spellId, "yellow")
self:PlaySound(args.spellId, "alert")
4 years ago
end