Skip to content

Commit

Permalink
Classic/DireMaul/Hydrospawn: Add boss module (#1213)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Dec 1, 2024
1 parent ff9df8e commit 4a38847
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 7 deletions.
49 changes: 42 additions & 7 deletions Classic/DireMaul/Hydrospawn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,68 @@ local mod, CL = BigWigs:NewBoss("Hydrospawn", 429, 403)
if not mod then return end
mod:RegisterEnableMob(13280) -- Hydrospawn
mod:SetEncounterID(344)
--mod:SetRespawnTime(0)
--mod:SetRespawnTime(0) resets, doesn't respawn

--------------------------------------------------------------------------------
-- Locals
--

local summonHydrolingCount = 1

--------------------------------------------------------------------------------
-- Initialization
--

function mod:GetOptions()
return {

22419, -- Riptide
22421, -- Massive Geyser
22714, -- Summon Hydroling
}
end

function mod:OnBossEnable()
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_SUCCESS", "Riptide", 22419)
self:Log("SPELL_CAST_START", "MassiveGeyser", 22421)
self:Log("SPELL_CAST_SUCCESS", "SummonHydroling", 22714)
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 13280)
end
end

function mod:OnEngage()
summonHydrolingCount = 1
self:CDBar(22419, 6.9) -- Riptide
self:CDBar(22421, 5.7) -- Massive Geyser
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:Riptide(args)
self:Message(args.spellId, "red")
self:CDBar(args.spellId, 6.1)
self:PlaySound(args.spellId, "alert")
end

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

function mod:SummonHydroling(args)
if self:Retail() then
if summonHydrolingCount == 1 then
self:Message(args.spellId, "cyan", CL.percent:format(66, args.spellName))
else -- 2
self:Message(args.spellId, "cyan", CL.percent:format(33, args.spellName))
end
summonHydrolingCount = summonHydrolingCount + 1
else -- Classic
self:Message(args.spellId, "cyan")
end
self:PlaySound(args.spellId, "info")
end
3 changes: 3 additions & 0 deletions Classic/DireMaul/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ BigWigs:AddColors("Lethtendris", {
})

BigWigs:AddColors("Hydrospawn", {
[22419] = "red",
[22421] = "orange",
[22714] = "cyan",
})

BigWigs:AddColors("Zevrim Thornhoof", {
Expand Down
3 changes: 3 additions & 0 deletions Classic/DireMaul/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ BigWigs:AddSounds("Lethtendris", {
})

BigWigs:AddSounds("Hydrospawn", {
[22419] = "alert",
[22421] = "alarm",
[22714] = "info",
})

BigWigs:AddSounds("Zevrim Thornhoof", {
Expand Down

0 comments on commit 4a38847

Please sign in to comment.