Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classic/ZulFarrak/Velratha: Add boss module #1187

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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