Skip to content

Commit

Permalink
Classic/Deadmines/MrSmite: Add boss module (#1236)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Jan 9, 2025
1 parent e6b8b9c commit 33bd76e
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 6 deletions.
71 changes: 65 additions & 6 deletions Classic/Deadmines/MrSmite.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 check when 11.0.5 is live
--------------------------------------------------------------------------------
-- Module Declaration
--
Expand All @@ -8,32 +7,92 @@ 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
--

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
5 changes: 5 additions & 0 deletions Classic/Deadmines/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
5 changes: 5 additions & 0 deletions Classic/Deadmines/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down

0 comments on commit 33bd76e

Please sign in to comment.