Skip to content

Commit

Permalink
Classic/DireMaul/GuardMoldar: Add boss module (#1223)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Dec 1, 2024
1 parent 99c9c76 commit 883ecff
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 8 deletions.
50 changes: 42 additions & 8 deletions Classic/DireMaul/GuardMoldar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,67 @@ local mod, CL = BigWigs:NewBoss("Guard Mol'dar", 429, 411)
if not mod then return end
mod:RegisterEnableMob(14326) -- Guard Mol'dar
mod:SetEncounterID(362)
--mod:SetRespawnTime(0)
--mod:SetRespawnTime(0) resets, doesn't respawn

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

function mod:GetOptions()
return {

11972, -- Shield Bash
15749, -- Shield Charge
{14516, "TANK"}, -- Strike
8269, -- Frenzy
}
end

function mod:OnBossEnable()
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
end
self:Log("SPELL_CAST_SUCCESS", "ShieldBash", 11972)
self:Log("SPELL_CAST_SUCCESS", "ShieldCharge", 15749)
self:Log("SPELL_CAST_SUCCESS", "Strike", 14516)
self:Log("SPELL_AURA_APPLIED", "FrenzyApplied", 8269)
end

function mod:OnEngage()
-- Shield Charge is cast immediately
-- Shield Bash is only cast if there are casters in melee range
self:CDBar(14516, 11.6) -- Strike
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:ShieldBash(args)
if self:MobId(args.sourceGUID) == 14326 then -- Guard Mol'dar
self:TargetMessage(args.spellId, "orange", args.destName)
self:CDBar(args.spellId, 12.1)
if self:Me(args.destGUID) then
self:PlaySound(args.spellId, "alarm", nil, args.destName)
end
end
end

function mod:ShieldCharge(args)
if self:MobId(args.sourceGUID) == 14326 then -- Guard Mol'dar
self:TargetMessage(args.spellId, "yellow", args.destName)
self:CDBar(args.spellId, 15.8)
self:PlaySound(args.spellId, "alert", nil, args.destName)
end
end

function mod:Strike(args)
if self:MobId(args.sourceGUID) == 14326 then -- Guard Mol'dar
self:Message(args.spellId, "purple")
self:CDBar(args.spellId, 11.8)
self:PlaySound(args.spellId, "alert")
end
end

function mod:FrenzyApplied(args)
if self:MobId(args.sourceGUID) == 14326 then -- Guard Mol'dar
self:Message(args.spellId, "cyan", CL.percent:format(50, args.spellName))
self:PlaySound(args.spellId, "long")
end
end
4 changes: 4 additions & 0 deletions Classic/DireMaul/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ BigWigs:AddColors("Prince Tortheldrin", {
})

BigWigs:AddColors("Guard Mol'dar", {
[8269] = "cyan",
[11972] = {"blue","orange"},
[14516] = "purple",
[15749] = {"blue","yellow"},
})

BigWigs:AddColors("Stomper Kreeg", {
Expand Down
4 changes: 4 additions & 0 deletions Classic/DireMaul/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ BigWigs:AddSounds("Prince Tortheldrin", {
})

BigWigs:AddSounds("Guard Mol'dar", {
[8269] = "long",
[11972] = "alarm",
[14516] = "alert",
[15749] = "alert",
})

BigWigs:AddSounds("Stomper Kreeg", {
Expand Down

0 comments on commit 883ecff

Please sign in to comment.