Skip to content

Commit

Permalink
Classic/Stratholme/Balnazzar: Add boss module (#1205)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Nov 5, 2024
1 parent 4bbb835 commit c62a65b
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 6 deletions.
133 changes: 127 additions & 6 deletions Classic/Stratholme/Balnazzar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,154 @@ mod:RegisterEnableMob(
10813 -- Balnazzar
)
mod:SetEncounterID(478)
--mod:SetRespawnTime(0)
--mod:SetRespawnTime(0) resets, doesn't respawn

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

function mod:GetOptions()
return {

80750, -- Mind Blast
452927, -- Shadow Shock
17405, -- Domination
{452928, "DISPEL"}, -- Sleep
13704, -- Psychic Scream
}
end

function mod:OnBossEnable()
if self:Classic() then
self:Log("SPELL_CAST_SUCCESS", "CrusadersHammer", 17286)
end
if self:Vanilla() then
self:Log("SPELL_CAST_START", "MindBlast", 17287)
else -- Cata, Retail
self:Log("SPELL_CAST_START", "MindBlast", 80750)
end
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_START", "ShadowShock", 452927)
self:Log("SPELL_CAST_START", "Domination", 17405)
self:Log("SPELL_AURA_APPLIED", "DominationApplied", 17405)
self:Log("SPELL_CAST_START", "Sleep", 452928)
self:Log("SPELL_AURA_APPLIED", "SleepApplied", 452928)
else -- Cata, Classic
self:Log("SPELL_CAST_START", "Sleep", 12098)
self:Log("SPELL_AURA_APPLIED", "SleepApplied", 12098)
end
self:Log("SPELL_CAST_SUCCESS", "PsychicScream", 13704)
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 10813)
end
end

function mod:OnEngage()
self:CDBar(80750, 6.2) -- Mind Blast
if not self:Solo() then
self:CDBar(452928, 9.5) -- Sleep
end
self:CDBar(452927, 9.8) -- Shadow Shock
if not self:Solo() then
self:CDBar(17405, 14.7) -- Domination
end
self:CDBar(13704, 26.8) -- Psychic Scream
end

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

if mod:Classic() and not mod:Vanilla() then
function mod:GetOptions()
return {
-- Grand Crusader Dathrohan
17286, -- Crusader's Hammer
-- Balnazzar
12098, -- Sleep
80750, -- Mind Blast
13704, -- Psychic Scream
}
end

function mod:OnEngage()
-- starts off as Grand Crusader Dathrohan
end
end

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

if mod:Vanilla() then
function mod:GetOptions()
return {
-- Grand Crusader Dathrohan
17286, -- Crusader's Hammer
-- Balnazzar
12098, -- Sleep
17287, -- Mind Blast
13704, -- Psychic Scream
}
end

function mod:OnEngage()
-- starts off as Grand Crusader Dathrohan
end
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:MindBlast(args)
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 10.9)
self:PlaySound(args.spellId, "alert")
end

function mod:ShadowShock(args)
self:Message(args.spellId, "orange", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 15.8)
self:PlaySound(args.spellId, "alarm")
end

function mod:PsychicScream(args)
self:Message(args.spellId, "yellow")
self:CDBar(args.spellId, 21.8)
self:PlaySound(args.spellId, "info")
end

function mod:Domination(args)
self:Message(args.spellId, "orange", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 29.1)
self:PlaySound(args.spellId, "warning")
end

function mod:DominationApplied(args)
self:TargetMessage(args.spellId, "cyan", args.destName)
self:PlaySound(args.spellId, "info", nil, args.destName)
end

function mod:Sleep(args)
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 20.6)
self:PlaySound(args.spellId, "alert")
end

function mod:SleepApplied(args)
if self:Me(args.destGUID) or self:Dispeller("magic", nil, args.spellId) then
self:TargetMessage(args.spellId, "cyan", args.destName)
self:PlaySound(args.spellId, "info", nil, args.destName)
end
end

--------------------------------------------------------------------------------
-- Classic Event Handlers
--

function mod:CrusadersHammer(args)
self:Message(args.spellId, "orange")
-- unknown CD
self:PlaySound(args.spellId, "info")
end
8 changes: 8 additions & 0 deletions Classic/Stratholme/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ BigWigs:AddColors("Instructor Galford", {
})

BigWigs:AddColors("Balnazzar", {
[12098] = {"blue","cyan","red"},
[13704] = "yellow",
[17286] = "orange",
[17287] = "red",
[17405] = {"blue","cyan","orange"},
[80750] = "red",
[452927] = "orange",
[452928] = {"blue","cyan","red"},
})

BigWigs:AddColors("Baroness Anastari", {
Expand Down
8 changes: 8 additions & 0 deletions Classic/Stratholme/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ BigWigs:AddSounds("Instructor Galford", {
})

BigWigs:AddSounds("Balnazzar", {
[12098] = {"alert","info"},
[13704] = "info",
[17286] = "info",
[17287] = "alert",
[17405] = {"info","warning"},
[80750] = "alert",
[452927] = "alarm",
[452928] = {"alert","info"},
})

BigWigs:AddSounds("Baroness Anastari", {
Expand Down

0 comments on commit c62a65b

Please sign in to comment.