Skip to content

Commit

Permalink
Classic/Stratholme/TimmyTheCruel: Add boss module (#1201)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Nov 5, 2024
1 parent 52d34dc commit 2314f1f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Classic/Stratholme/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ BigWigs:AddColors("The Unforgiven", {
})

BigWigs:AddColors("Timmy the Cruel", {
[8599] = "cyan",
[12021] = {"blue","red"},
[17470] = "purple",
})

BigWigs:AddColors("Commander Malor", {
Expand Down
3 changes: 3 additions & 0 deletions Classic/Stratholme/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ BigWigs:AddSounds("The Unforgiven", {
})

BigWigs:AddSounds("Timmy the Cruel", {
[8599] = "long",
[12021] = "alarm",
[17470] = "alert",
})

BigWigs:AddSounds("Commander Malor", {
Expand Down
54 changes: 48 additions & 6 deletions Classic/Stratholme/TimmyTheCruel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,75 @@ local mod, CL = BigWigs:NewBoss("Timmy the Cruel", 329, 445)
if not mod then return end
mod:RegisterEnableMob(10808) -- Timmy the Cruel
mod:SetEncounterID(474)
--mod:SetRespawnTime(0)
--mod:SetRespawnTime(0) resets, doesn't respawn
mod:SetStage(1)

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

function mod:GetOptions()
return {

17470, -- Ravenous Claw
8599, -- Enrage
12021, -- Fixate
}
end

function mod:OnBossEnable()
self:Log("SPELL_CAST_SUCCESS", "RavenousClaw", 17470) -- no SPELL_CAST_START
self:Log("SPELL_CAST_SUCCESS", "Enrage", 8599)
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_SUCCESS", "Fixate", 12021)
end
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
end
if self:Heroic() or self:Classic() then -- no encounter events in Timewalking, ENCOUNTER_END missing in Classic
self:Death("Win", 10808)
end
end

function mod:OnEngage()
self:SetStage(1)
end

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

if mod:Classic() then
function mod:GetOptions()
return {
17470, -- Ravenous Claw
8599, -- Enrage
}
end
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:RavenousClaw(args)
self:Message(args.spellId, "purple")
self:CDBar(args.spellId, 5.5)
self:PlaySound(args.spellId, "alert")
end

function mod:Enrage(args)
if self:MobId(args.sourceGUID) == 10808 then -- Timmy the Cruel
self:SetStage(2)
self:Message(args.spellId, "cyan", CL.percent:format(50, args.spellName))
self:CDBar(17470, 2.0) -- Ravenous Claw
self:PlaySound(args.spellId, "long")
end
end

function mod:Fixate(args)
self:TargetMessage(args.spellId, "red", args.destName)
self:CDBar(args.spellId, 21.8)
if self:Me(args.destGUID) then
self:PlaySound(args.spellId, "alarm")
end
end

0 comments on commit 2314f1f

Please sign in to comment.