From c71eaf01dc53d205efdefc63619e15e388c6c2f6 Mon Sep 17 00:00:00 2001 From: funkydude Date: Mon, 17 Jun 2024 18:26:14 +0100 Subject: [PATCH] Updates and cleanups for classic --- Bastion/DoubleDragon.lua | 2 +- Bastion/TwilightAscendants.lua | 2 +- Blackwing/Atramedes.lua | 66 ++++++++++++++++++++++++++++++---- Blackwing/Chimaeron.lua | 51 ++++++++++++++------------ Blackwing/Magmaw.lua | 18 +++++----- Blackwing/Omnotron.lua | 12 ++++++- 6 files changed, 109 insertions(+), 42 deletions(-) diff --git a/Bastion/DoubleDragon.lua b/Bastion/DoubleDragon.lua index 7c41b98..7c545e1 100644 --- a/Bastion/DoubleDragon.lua +++ b/Bastion/DoubleDragon.lua @@ -55,7 +55,7 @@ function mod:GetOptions() [93051] = "heroic", phase_switch = "general", },{ - [86505] = CL.fire, -- Fabulous Flames (Fire) + [86505] = CL.underyou:format(CL.fire), -- Fabulous Flames (Fire under YOU) } end diff --git a/Bastion/TwilightAscendants.lua b/Bastion/TwilightAscendants.lua index 4225208..5211fe4 100644 --- a/Bastion/TwilightAscendants.lua +++ b/Bastion/TwilightAscendants.lua @@ -81,7 +81,7 @@ function mod:GetOptions() [92067] = "heroic", switch = "general", },{ - [82860] = CL.fire, -- Inferno Rush (Fire) + [82860] = CL.underyou:format(CL.fire), -- Inferno Rush (Fire under YOU) } end diff --git a/Blackwing/Atramedes.lua b/Blackwing/Atramedes.lua index 881da9c..ec5b5f4 100644 --- a/Blackwing/Atramedes.lua +++ b/Blackwing/Atramedes.lua @@ -17,6 +17,7 @@ local searingFlameCount = 1 local modulationCount = 1 local shieldCount = 0 local shieldClickers = {"None"} +local shieldCollector = {} -------------------------------------------------------------------------------- -- Localization @@ -47,6 +48,7 @@ function mod:GetOptions() -- General {78092, "ICON", "SAY", "ME_ONLY_EMPHASIZE"}, -- Tracking {77611, "INFOBOX"}, -- Resonating Clash + 78023, -- Roaring Flame "stages", "altpower", },{ @@ -57,6 +59,7 @@ function mod:GetOptions() [92685] = CL.add, -- Pestered! (Add) [78092] = CL.plus:format(self:SpellName(78075), self:SpellName(78221)), -- Tracking (Sonic Breath + Roaring Flame Breath) [77611] = CL.shield, -- Resonating Clash (Shield) + [78023] = CL.underyou:format(CL.fire), -- Roaring Flame (Fire under YOU) } end @@ -78,9 +81,14 @@ function mod:OnBossEnable() self:Log("SPELL_CAST_SUCCESS", "Modulation", 77612) self:Log("SPELL_CAST_SUCCESS", "SonarPulse", 77672) self:Log("SPELL_CAST_SUCCESS", "ResonatingClash", 77611, 78168) -- Stage 1, Stage 2 + self:Log("SPELL_INSTAKILL", "SonicFlamesKill", 77782, 78945) -- Stage 1, Stage 2 + self:Death("ShieldDies", 42954, 42960, 42949, 42947, 42956, 42951, 42958, 41445) -- 8 Ancient Dwarven Shield, there are 10, but 2 share the same ID... self:Log("SPELL_CAST_SUCCESS", "PhaseShift", 92681) self:Log("SPELL_AURA_APPLIED", "PesteredApplied", 92685) + + self:Log("SPELL_DAMAGE", "RoaringFlameDamage", 78023) + self:Log("SPELL_MISSED", "RoaringFlameDamage", 78023) end function mod:OnEngage() @@ -88,6 +96,7 @@ function mod:OnEngage() modulationCount = 1 shieldCount = 0 shieldClickers = {"None"} + shieldCollector = {} self:SetStage(1) self:CDBar(77612, 11, CL.count:format(self:SpellName(77612), modulationCount)) -- Modulation self:CDBar(77672, 11.3) -- Sonar Pulse @@ -120,11 +129,13 @@ do end function mod:UNIT_SPELLCAST_SUCCEEDED(_, _, _, spellId) if spellId == 86915 then -- Take Off Anim Kit - self:SetStage(2) + local stage2Msg = CL.stage:format(2) + self:StopBar(stage2Msg) self:StopBar(78075) -- Sonic Breath self:StopBar(77672) -- Sonar Pulse + self:SetStage(2) self:StopBar(CL.count:format(self:SpellName(77612), modulationCount)) -- Modulation - self:Message("stages", "cyan", CL.stage:format(2), false) + self:Message("stages", "cyan", stage2Msg, false) self:Bar("stages", 36, CL.stage:format(1), "achievement_boss_nefarion") self:ScheduleTimer(groundPhase, 36, self) self:PlaySound("stages", "long") @@ -166,13 +177,13 @@ end do local lineRef = {1,3,5,7,9} + local prev = 0 function mod:ResonatingClash(args) + if not self:IsEngaged() then + self:Engage() -- You can pull him by clicking a shield + end if self:Player(args.sourceFlags) then -- The shield itself also casts it - if self:Heroic() and args.spellId == 77611 and shieldCount < 9 then - shieldCount = shieldCount + 1 - local nefarianName = self:SpellName(-3279) -- Nefarian - table.insert(shieldClickers, 2, ("%d %s"):format(shieldCount, nefarianName)) - end + prev = args.time shieldCount = shieldCount + 1 local colorName = self:ColorName(args.sourceName) table.insert(shieldClickers, 2, ("%d %s"):format(shieldCount, colorName)) @@ -184,6 +195,36 @@ do self:SetInfo(77611, lineRef[i], shieldClickers[i] or "") end self:PlaySound(77611, "info") + elseif args.spellId == 77611 and args.time ~= prev then -- Rarely it seems like the player cast is missing in Stage 1 + shieldCount = shieldCount + 1 + table.insert(shieldClickers, 2, ("%d ?"):format(shieldCount)) + self:Message(77611, "cyan", CL.other:format(CL.count:format(CL.shield, shieldCount), "?"), false) + self:SetInfo(77611, 1, CL.remaining:format(10-shieldCount)) + local per = shieldCount / 10 + self:SetInfoBar(77611, 1, 1-per) + for i = 2, 5 do + self:SetInfo(77611, lineRef[i], shieldClickers[i] or "") + end + self:PlaySound(77611, "info") + end + end + + function mod:SonicFlamesKill(args) + shieldCollector[args.destGUID] = true + end + + function mod:ShieldDies(args) + if not shieldCollector[args.destGUID] then + shieldCollector[args.destGUID] = true + shieldCount = shieldCount + 1 + local nefarianName = self:SpellName(-3279) -- Nefarian + table.insert(shieldClickers, 2, ("%d %s"):format(shieldCount, nefarianName)) + self:SetInfo(77611, 1, CL.remaining:format(10-shieldCount)) + local per = shieldCount / 10 + self:SetInfoBar(77611, 1, 1-per) + for i = 2, 5 do + self:SetInfo(77611, lineRef[i], shieldClickers[i] or "") + end end end end @@ -215,3 +256,14 @@ do end end end + +do + local prev = 0 + function mod:RoaringFlameDamage(args) + if self:Me(args.destGUID) and args.time - prev > 2 then + prev = args.time + self:PersonalMessage(args.spellId, "underyou", CL.fire) + self:PlaySound(args.spellId, "underyou") + end + end +end diff --git a/Blackwing/Chimaeron.lua b/Blackwing/Chimaeron.lua index 9d50dc3..8c9b495 100644 --- a/Blackwing/Chimaeron.lua +++ b/Blackwing/Chimaeron.lua @@ -27,7 +27,13 @@ end function mod:GetOptions() return { - "warmup", 82848, 88826, 82881, 88853, 82935, 82890, + "warmup", + 82848, -- Massacre + 88826, -- Double Attack + 82881, -- Break + 88853, -- Systems Failure + 82935, -- Caustic Slime + 82890, -- Mortality "berserk" }, { warmup = "normal", @@ -36,6 +42,8 @@ function mod:GetOptions() end function mod:OnBossEnable() + self:RegisterEvent("CHAT_MSG_MONSTER_EMOTE") + self:Log("SPELL_AURA_APPLIED", "SystemFailureStart", 88853) self:Log("SPELL_AURA_REMOVED", "SystemFailureEnd", 88853) self:Log("SPELL_CAST_SUCCESS", "Mortality", 82890) @@ -43,70 +51,69 @@ function mod:OnBossEnable() self:Log("SPELL_AURA_APPLIED_DOSE", "Break", 82881) self:Log("SPELL_AURA_APPLIED", "DoubleAttack", 88826) self:Log("SPELL_CAST_START", "Massacre", 82848) - - self:RegisterEvent("CHAT_MSG_MONSTER_EMOTE", "Warmup") -end - -function mod:Warmup(_, msg) - if msg == L["bileotron_engage"] then - self:Bar("warmup", 30, CL.active, "achievement_dungeon_blackwingdescent_raid_chimaron") - end end function mod:OnEngage() self:StopBar(CL.active) self:Berserk(450) if not self:Heroic() then - self:CDBar(88853, 90, L["next_system_failure"]) --happens randomly at either 60 or 90 on heroic + self:CDBar(88853, 90, L["next_system_failure"]) -- Systems Failure, happens randomly at either 60 or 90 on heroic end self:Bar(82848, 30) --Massacre - self:RegisterUnitEvent("UNIT_HEALTH", "Phase2Warn", "boss1") + self:RegisterUnitEvent("UNIT_HEALTH", nil, "boss1") end -------------------------------------------------------------------------------- -- Event Handlers -- +function mod:CHAT_MSG_MONSTER_EMOTE(_, msg) + if msg == L["bileotron_engage"] then + self:Bar("warmup", 30, CL.active, "achievement_dungeon_blackwingdescent_raid_chimaron") + end +end + function mod:SystemFailureStart(args) self:StopBar(L["next_system_failure"]) self:Bar(args.spellId, 30) - self:MessageOld(args.spellId, "red", "alarm") - --self:Flash(args.spellId) + self:Message(args.spellId, "red") + self:PlaySound(args.spellId, "alarm") end function mod:SystemFailureEnd(args) - if self.isEngaged then -- To prevent firing after a wipe + if self:IsEngaged() then -- To prevent firing after a wipe if not self:Heroic() then self:CDBar(args.spellId, 65, L["next_system_failure"]) end - --self:Flash(args.spellId) end end function mod:Massacre(args) - self:MessageOld(args.spellId, "yellow") + self:Message(args.spellId, "yellow") self:Bar(args.spellId, 30) self:Bar(82935, 19) --Caustic Slime end function mod:Mortality(args) - self:MessageOld(args.spellId, "red", "long") + self:Message(args.spellId, "red") self:StopBar(L["next_system_failure"]) + self:PlaySound(args.spellId, "long") end function mod:Break(args) - self:StackMessageOld(args.spellId, args.destName, args.amount, "yellow") + self:StackMessage(args.spellId, "yellow", args.destName, args.amount, 3) end function mod:DoubleAttack(args) - self:MessageOld(args.spellId, "orange") + self:Message(args.spellId, "orange") end -function mod:Phase2Warn(event, unit) +function mod:UNIT_HEALTH(event, unit) local hp = self:GetHealth(unit) if hp < 23 then - self:MessageOld(82890, "green", "info", L["phase2_message"]) self:UnregisterUnitEvent(event, unit) + if hp > 20 then + self:Message(82890, "cyan", CL.soon:format(self:SpellName(82890)), false) + end end end - diff --git a/Blackwing/Magmaw.lua b/Blackwing/Magmaw.lua index e0f46ca..97ce432 100644 --- a/Blackwing/Magmaw.lua +++ b/Blackwing/Magmaw.lua @@ -68,7 +68,7 @@ function mod:GetOptions() ["slump"] = L.slump_bar, -- Slump (Rodeo) [79011] = CL.weakened, -- Point of Vulnerability (Weakened) [78941] = CL.parasite, -- Parasitic Infection (Parasite) - [92134] = CL.fire, -- Ignition (Fire) + [92134] = CL.underyou:format(CL.fire), -- Ignition (Fire under YOU) } end @@ -127,15 +127,13 @@ function mod:CHAT_MSG_MONSTER_YELL(_, msg) end function mod:INSTANCE_ENCOUNTER_ENGAGE_UNIT() - if headGUID then - local headUnit = self:GetBossId(headGUID) - if not isNewHeadPhase and headUnit then - isNewHeadPhase = true - self:Message(79011, "green", self:SpellName(79011), false, true) -- XXX TEST - elseif isNewHeadPhase and not headUnit then - isNewHeadPhase = false - self:Message(79011, "green", CL.removed:format(self:SpellName(79011)), false, true) -- XXX TEST - end + local headUnit = self:GetBossId(42347) -- Exposed Head of Magmaw + if not isNewHeadPhase and headUnit then + isNewHeadPhase = true + self:Message(79011, "green", self:SpellName(79011), false, true) -- XXX TEST + elseif isNewHeadPhase and not headUnit then + isNewHeadPhase = false + self:Message(79011, "green", CL.over:format(CL.weakened), false, true) -- XXX TEST end end diff --git a/Blackwing/Omnotron.lua b/Blackwing/Omnotron.lua index 2c160fd..d748229 100644 --- a/Blackwing/Omnotron.lua +++ b/Blackwing/Omnotron.lua @@ -58,6 +58,7 @@ function mod:GetOptions() -- Arcanotron 79710, -- Arcane Annihilator 79624, -- Power Generator + {79735, "DISPEL"}, -- Converted Power -- Heroic "nef", {91849, "CASTBAR"}, -- Grip of Death @@ -82,6 +83,7 @@ function mod:GetOptions() [79888] = L.lightning, -- Lightning Conductor (Lightning) [80053] = CL.adds, -- Poison Protocol (Adds) [79624] = CL.pool, -- Power Generator (Pool) + [79735] = CL.magic_buff_boss:format(""), -- Converted Power (Magic buff on BOSS:) ["nef"] = CL.next_ability, -- Lord Victor Nefarius (Next ability) [91879] = L.pool_explosion, -- Arcane Blowback (Pool Explosion) [92048] = L.infusion, -- Shadow Infusion (Infusion) @@ -108,6 +110,7 @@ function mod:OnBossEnable() -- Arcanotron self:Log("SPELL_CAST_START", "ArcaneAnnihilator", 79710) self:Log("SPELL_CAST_SUCCESS", "PowerGenerator", 79624) + self:Log("SPELL_AURA_APPLIED_DOSE", "ConvertedPowerAppliedDose", 79735) -- Heroic self:Log("SPELL_CAST_SUCCESS", "OverchargedPowerGenerator", 91857) self:Log("SPELL_AURA_APPLIED", "OverchargedPowerGeneratorApplied", 91858) @@ -270,12 +273,19 @@ function mod:PowerGenerator(args) self:PlaySound(args.spellId, "info") end +function mod:ConvertedPowerAppliedDose(args) + if self:MobId(args.destGUID) == 42166 and self:Dispeller("magic", true, args.spellId) then -- Only when applied to Arcanotron (Can be Spellstolen) + self:Message(args.spellId, "orange", CL.magic_buff_other:format(args.destName, args.spellName)) + self:PlaySound(args.spellId, "info") + end +end + -- Heroic function mod:OverchargedPowerGenerator() self:Message(91879, "orange", L.pool_explosion) self:Bar(91879, 8, L.pool_explosion) self:CDBar("nef", 35, CL.next_ability, L.nef_icon) - self:PlaySound(91879, "info") + self:PlaySound(91879, "warning") end do