Skip to content

Commit

Permalink
Classic/Deadmines/Cookie: Add boss module (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Jan 9, 2025
1 parent 01af23d commit e104c4c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 7 deletions.
51 changes: 44 additions & 7 deletions Classic/Deadmines/Cookie.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 @@ -15,25 +14,63 @@ mod:SetEncounterID(mod:Retail() and 2986 or 2746)

function mod:GetOptions()
return {

5174, -- Cookie's Cooking
{6306, "DISPEL"}, -- Acid Splash
}
end

function mod:OnBossEnable()
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_START", "CookiesCooking", 5174)
self:Log("SPELL_CAST_START", "AcidSplash", 6306)
self:Log("SPELL_AURA_APPLIED", "AcidSplashApplied", 6306)
if self:Classic() then
-- no ENCOUNTER_END on Classic
self:Death("Win", 645)
end
end

function mod:OnEngage()
-- Cookie's Cooking is only cast below a certain hp
self:CDBar(6306, 2.4) -- Acid Splash
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:CookiesCooking(args)
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 21.0)
self:PlaySound(args.spellId, "warning")
end

do
local playerList = {}

function mod:AcidSplash(args)
playerList = {}
self:Message(args.spellId, "orange")
if self:Retail() then
self:CDBar(args.spellId, 13.3)
else -- Classic
self:CDBar(args.spellId, 55.0)
end
end

function mod:AcidSplashApplied(args)
if self:Retail() then
if self:Dispeller("poison", nil, args.spellId) and self:Player(args.destFlags) then
playerList[#playerList + 1] = args.destName
self:TargetsMessage(args.spellId, "yellow", playerList, 5)
self:PlaySound(args.spellId, "alert", nil, playerList)
end
else -- Classic
-- not dispellable on Classic
if self:Me(args.destGUID) or (self:Healer() and self:Player(args.destFlags)) then
playerList[#playerList + 1] = args.destName
self:TargetsMessage(args.spellId, "yellow", playerList, 5)
self:PlaySound(args.spellId, "alert", nil, playerList)
end
end
end
end
2 changes: 2 additions & 0 deletions Classic/Deadmines/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ BigWigs:AddColors("Edwin VanCleef", {
})

BigWigs:AddColors("Cookie", {
[5174] = "red",
[6306] = {"blue","orange","yellow"},
})
2 changes: 2 additions & 0 deletions Classic/Deadmines/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ BigWigs:AddSounds("Edwin VanCleef", {
})

BigWigs:AddSounds("Cookie", {
[5174] = "warning",
[6306] = "alert",
})

0 comments on commit e104c4c

Please sign in to comment.