From e104c4c998f8d181742c34b4462966dc0e87f678 Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Wed, 8 Jan 2025 20:03:53 -0500 Subject: [PATCH] Classic/Deadmines/Cookie: Add boss module (#1239) --- Classic/Deadmines/Cookie.lua | 51 ++++++++++++++++++++++++---- Classic/Deadmines/Options/Colors.lua | 2 ++ Classic/Deadmines/Options/Sounds.lua | 2 ++ 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/Classic/Deadmines/Cookie.lua b/Classic/Deadmines/Cookie.lua index eccc0fabc..2f1d9998b 100644 --- a/Classic/Deadmines/Cookie.lua +++ b/Classic/Deadmines/Cookie.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 -- @@ -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 diff --git a/Classic/Deadmines/Options/Colors.lua b/Classic/Deadmines/Options/Colors.lua index e963b83ef..13dabfc2e 100644 --- a/Classic/Deadmines/Options/Colors.lua +++ b/Classic/Deadmines/Options/Colors.lua @@ -35,4 +35,6 @@ BigWigs:AddColors("Edwin VanCleef", { }) BigWigs:AddColors("Cookie", { + [5174] = "red", + [6306] = {"blue","orange","yellow"}, }) diff --git a/Classic/Deadmines/Options/Sounds.lua b/Classic/Deadmines/Options/Sounds.lua index 3a8bb2e2a..0e684b38c 100644 --- a/Classic/Deadmines/Options/Sounds.lua +++ b/Classic/Deadmines/Options/Sounds.lua @@ -35,4 +35,6 @@ BigWigs:AddSounds("Edwin VanCleef", { }) BigWigs:AddSounds("Cookie", { + [5174] = "warning", + [6306] = "alert", })