Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classic/Deadmines/MrSmite: Add boss module #1236

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -9,6 +9,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 @@ -9,6 +9,11 @@ BigWigs:AddSounds("Gilnid", {
})

BigWigs:AddSounds("Mr. Smite", {
[-29823] = "long",
[-29813] = "long",
[6432] = "long",
[6435] = "alarm",
[450550] = "alert",
})

BigWigs:AddSounds("Captain Greenskin", {
Expand Down