From 33bd76e3c0ef36dcee9785bf98aae76b1361d3ca Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Wed, 8 Jan 2025 20:01:52 -0500 Subject: [PATCH] Classic/Deadmines/MrSmite: Add boss module (#1236) --- Classic/Deadmines/MrSmite.lua | 71 +++++++++++++++++++++++++--- Classic/Deadmines/Options/Colors.lua | 5 ++ Classic/Deadmines/Options/Sounds.lua | 5 ++ 3 files changed, 75 insertions(+), 6 deletions(-) diff --git a/Classic/Deadmines/MrSmite.lua b/Classic/Deadmines/MrSmite.lua index d8a8d25a8..978616862 100644 --- a/Classic/Deadmines/MrSmite.lua +++ b/Classic/Deadmines/MrSmite.lua @@ -1,4 +1,3 @@ -if BigWigsLoader.isRetail and select(4, GetBuildInfo()) < 110005 then return end -- XXX remove check when 11.0.5 is live -------------------------------------------------------------------------------- -- Module Declaration -- @@ -8,6 +7,7 @@ if not mod then return end mod:RegisterEnableMob(646) -- Mr. Smite mod:SetEncounterID(mod:Retail() and 2970 or 2745) --mod:SetRespawnTime(0) +mod:SetStage(1) -------------------------------------------------------------------------------- -- Initialization @@ -15,25 +15,84 @@ mod:SetEncounterID(mod:Retail() and 2970 or 2745) function mod:GetOptions() return { - + 450550, -- Pistol Shot + -29823, -- I'll Have to Improvise + -29813, -- Now I'm Angry + {6435, "TANK_HEALER"}, -- Smite Slam } end function mod:OnBossEnable() if self:Retail() then - self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames + self:Log("SPELL_CAST_START", "PistolShot", 450550) + end + self:Log("SPELL_CAST_SUCCESS", "SmiteStomp", 6432) + self:Log("SPELL_CAST_SUCCESS", "SmiteSlam", 6435) + if self:Classic() then + -- no ENCOUNTER_END on classic + self:Death("Win", 646) end end function mod:OnEngage() + self:SetStage(1) + if self:Retail() then + self:CDBar(450550, 4.8) -- Pistol Shot + end +end + +-------------------------------------------------------------------------------- +-- Classic Initialization +-- + +if mod:Classic() then + function mod:GetOptions() + return { + 6432, -- Smite Stomp + {6435, "TANK_HEALER"}, -- Smite Slam + } + end end -------------------------------------------------------------------------------- -- Event Handlers -- -function mod:ENCOUNTER_START(_, id) -- XXX no boss frames - if id == self.engageId then - self:Engage() +function mod:PistolShot(args) + if self:MobId(args.sourceGUID) == 646 then -- Mr. Smite + self:Message(args.spellId, "red", CL.casting:format(args.spellName)) + self:CDBar(args.spellId, 12.1) + if self:Interrupter() then + self:PlaySound(args.spellId, "alert") + end end end + +function mod:SmiteStomp(args) + if self:GetStage() == 1 then -- Stage 1 to Stage 2 + self:SetStage(2) + if self:Retail() then + self:Message(-29823, "cyan", CL.percent:format(70, self:SpellName(-29823))) -- I'll Have to Improvise + self:PlaySound(-29823, "long") + else -- Classic + self:Message(args.spellId, "cyan", CL.percent:format(70, args.spellName)) + self:PlaySound(args.spellId, "long") + end + else -- Stage 2 to Stage 3 + self:SetStage(3) + if self:Retail() then + self:Message(-29813, "cyan", CL.percent:format(35, self:SpellName(-29813))) -- Now I'm Angry + self:PlaySound(-29813, "long") + else -- Classic + self:Message(args.spellId, "cyan", CL.percent:format(35, args.spellName)) + self:PlaySound(args.spellId, "long") + end + end +end + +function mod:SmiteSlam(args) + -- only cast in stage 3 + self:Message(args.spellId, "purple") + self:CDBar(args.spellId, 6.1) + self:PlaySound(args.spellId, "alarm") +end diff --git a/Classic/Deadmines/Options/Colors.lua b/Classic/Deadmines/Options/Colors.lua index 81400c3fb..7f3f4493a 100644 --- a/Classic/Deadmines/Options/Colors.lua +++ b/Classic/Deadmines/Options/Colors.lua @@ -17,6 +17,11 @@ BigWigs:AddColors("Gilnid", { }) BigWigs:AddColors("Mr. Smite", { + [-29823] = "cyan", + [-29813] = "cyan", + [6432] = "cyan", + [6435] = "purple", + [450550] = "red", }) BigWigs:AddColors("Captain Greenskin", { diff --git a/Classic/Deadmines/Options/Sounds.lua b/Classic/Deadmines/Options/Sounds.lua index 9b4abc190..3c6ce9f4b 100644 --- a/Classic/Deadmines/Options/Sounds.lua +++ b/Classic/Deadmines/Options/Sounds.lua @@ -17,6 +17,11 @@ BigWigs:AddSounds("Gilnid", { }) BigWigs:AddSounds("Mr. Smite", { + [-29823] = "long", + [-29813] = "long", + [6432] = "long", + [6435] = "alarm", + [450550] = "alert", }) BigWigs:AddSounds("Captain Greenskin", {