Skip to content

Commit

Permalink
Classic/ZulFarrak/Velratha: Add boss module
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle committed Nov 3, 2024
1 parent e0b0dba commit d72b081
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Classic/ZulFarrak/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ BigWigs:AddColors("Antu'sul", {
})

BigWigs:AddColors("Hydromancer Velratha", {
[12491] = "red",
[15245] = "orange",
[15982] = "red",
[78802] = "purple",
})

BigWigs:AddColors("Witch Doctor Zum'rah", {
Expand Down
4 changes: 4 additions & 0 deletions Classic/ZulFarrak/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ BigWigs:AddSounds("Antu'sul", {
})

BigWigs:AddSounds("Hydromancer Velratha", {
[12491] = "alert",
[15245] = "alarm",
[15982] = "alert",
[78802] = "alarm",
})

BigWigs:AddSounds("Witch Doctor Zum'rah", {
Expand Down
71 changes: 65 additions & 6 deletions Classic/ZulFarrak/Velratha.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
if BigWigsLoader.isRetail and select(4, GetBuildInfo()) < 110005 then return end -- XXX remove when 11.0.5 is live
--------------------------------------------------------------------------------
-- Module Declaration
--
Expand All @@ -15,24 +14,84 @@ mod:SetEncounterID(593)

function mod:GetOptions()
return {
15982, -- Healing Wave
78802, -- Crashing Wave
}
end

function mod:OnBossEnable()
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_START", "HealingWave", 15982)
self:Log("SPELL_INTERRUPT", "HealingWaveInterrupt", 15982)
self:Log("SPELL_CAST_SUCCESS", "HealingWaveSuccess", 15982)
self:Log("SPELL_CAST_START", "CrashingWave", 78802)
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 7795)
end
end

function mod:OnEngage()
self:CDBar(78802, 8.5) -- Crashing Wave
end

--------------------------------------------------------------------------------
-- Vanilla Initialization
--

if mod:Vanilla() then
function mod:GetOptions()
return {
12491, -- Healing Wave
15245, -- Shadow Bolt Volley
}
end

function mod:OnBossEnable()
self:Log("SPELL_CAST_START", "HealingWave", 12491)
self:Log("SPELL_CAST_START", "ShadowBoltVolley", 15245)
end

function mod:OnEngage()
end
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:HealingWave(args)
if self:MobId(args.sourceGUID) == 7795 then -- Hydromancer Velratha
-- on Retail this is only cast when the boss is below 50% health
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:PlaySound(args.spellId, "alert")
end
end

function mod:HealingWaveInterrupt(args)
if self:MobId(args.destGUID) == 7795 then -- Hydromancer Velratha
self:CDBar(15982, 10.4)
end
end

function mod:HealingWaveSuccess(args)
if self:MobId(args.sourceGUID) == 7795 then -- Hydromancer Velratha
self:CDBar(args.spellId, 10.4)
end
end

function mod:CrashingWave(args)
self:Message(args.spellId, "purple")
self:CDBar(args.spellId, 8.5)
self:PlaySound(args.spellId, "alarm")
end

--------------------------------------------------------------------------------
-- Vanilla Event Handlers
--

function mod:ShadowBoltVolley(args)
if self:MobId(args.sourceGUID) == 7795 then -- Hydromancer Velratha
self:Message(args.spellId, "orange", CL.casting:format(args.spellName))
self:PlaySound(args.spellId, "alarm")
end
end

0 comments on commit d72b081

Please sign in to comment.