Skip to content

Commit

Permalink
Classic/ZulFarrak/Theka: Add boss module (#1185)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Nov 4, 2024
1 parent 42eee58 commit b9208cc
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Classic/ZulFarrak/Options/Colors.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@

BigWigs:AddColors("Theka the Martyr", {
[8600] = {"blue","orange","yellow"},
[15654] = {"blue","yellow"},
[17228] = "red",
[450933] = {"blue","yellow"},
})

BigWigs:AddColors("Antu'sul", {
Expand Down
4 changes: 4 additions & 0 deletions Classic/ZulFarrak/Options/Sounds.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@

BigWigs:AddSounds("Theka the Martyr", {
[8600] = {"alarm","alert"},
[15654] = "alarm",
[17228] = "alert",
[450933] = "warning",
})

BigWigs:AddSounds("Antu'sul", {
Expand Down
84 changes: 80 additions & 4 deletions Classic/ZulFarrak/Theka.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,100 @@ mod:SetEncounterID(596)

function mod:GetOptions()
return {
{8600, "DISPEL"}, -- Fevered Plague
17228, -- Shadow Bolt Volley
{15654, "DISPEL"}, -- Shadow Word: Pain
{450933, "DISPEL"}, -- Curse of the Martyr
-- 11089 Shadow Transformation, cast doesn't log, aura is hidden
}
end

function mod:OnBossEnable()
self:Log("SPELL_CAST_START", "FeveredPlague", 8600)
self:Log("SPELL_AURA_APPLIED", "FeveredPlagueApplied", 8600)
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_START", "ShadowBoltVolley", 17228)
self:Log("SPELL_CAST_SUCCESS", "ShadowWordPain", 15654)
self:Log("SPELL_AURA_APPLIED", "ShadowWordPainApplied", 15654)
self:Log("SPELL_CAST_SUCCESS", "CurseOfTheMartyr", 450933)
self:Log("SPELL_AURA_APPLIED", "CurseOfTheMartyrApplied", 450933)
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 7272)
end
end
end

function mod:OnEngage()
self:CDBar(17228, 7.6) -- Shadow Bolt Volley
self:CDBar(8600, 11.2) -- Fevered Plague
self:CDBar(15654, 18.2) -- Shadow Word: Pain
self:CDBar(450933, 19.5) -- Curse of the Martyr
end

--------------------------------------------------------------------------------
-- Classic Initialization
--

if mod:Classic() then
function mod:GetOptions()
return {
8600, -- Fevered Plague
}
end

function mod:OnEngage()
self:CDBar(8600, 11.2) -- Fevered Plague
end
end

--------------------------------------------------------------------------------
-- Event Handlers
--

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:FeveredPlague(args)
if self:MobId(args.sourceGUID) == 7272 then -- Theka the Martyr
self:Message(args.spellId, "orange", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 8.5)
self:PlaySound(args.spellId, "alert")
end
end

function mod:FeveredPlagueApplied(args)
if (self:Me(args.destGUID) or self:Dispeller("disease", nil, args.spellId)) and self:MobId(args.sourceGUID) == 7272 then -- Theka the Martyr
self:TargetMessage(args.spellId, "yellow", args.destName)
self:PlaySound(args.spellId, "alarm", nil, args.destName)
end
end

function mod:ShadowBoltVolley(args)
if self:MobId(args.sourceGUID) == 7272 then -- Theka the Martyr
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 21.8)
self:PlaySound(args.spellId, "alert")
end
end

function mod:ShadowWordPain(args)
if self:MobId(args.sourceGUID) == 7272 then -- Theka the Martyr
self:CDBar(args.spellId, 17.0)
end
end

function mod:ShadowWordPainApplied(args)
if self:Dispeller("magic", nil, args.spellId) and self:MobId(args.sourceGUID) == 7272 then -- Theka the Martyr
self:TargetMessage(args.spellId, "yellow", args.destName)
self:PlaySound(args.spellId, "alarm", nil, args.destName)
end
end

function mod:CurseOfTheMartyr(args)
self:CDBar(args.spellId, 11.0)
end

function mod:CurseOfTheMartyrApplied(args)
if self:Me(args.destGUID) or self:Dispeller("magic", nil, args.spellId) then
self:TargetMessage(args.spellId, "yellow", args.destName)
self:PlaySound(args.spellId, "warning", nil, args.destName)
end
end

0 comments on commit b9208cc

Please sign in to comment.