Skip to content

Commit

Permalink
Updates and cleanups for classic
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Jun 17, 2024
1 parent ed5aa32 commit c71eaf0
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 42 deletions.
2 changes: 1 addition & 1 deletion Bastion/DoubleDragon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Bastion/TwilightAscendants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
66 changes: 59 additions & 7 deletions Blackwing/Atramedes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ local searingFlameCount = 1
local modulationCount = 1
local shieldCount = 0
local shieldClickers = {"None"}
local shieldCollector = {}

--------------------------------------------------------------------------------
-- Localization
Expand Down Expand Up @@ -47,6 +48,7 @@ function mod:GetOptions()
-- General
{78092, "ICON", "SAY", "ME_ONLY_EMPHASIZE"}, -- Tracking
{77611, "INFOBOX"}, -- Resonating Clash
78023, -- Roaring Flame
"stages",
"altpower",
},{
Expand All @@ -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

Expand All @@ -78,16 +81,22 @@ 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()
searingFlameCount = 1
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
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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))
Expand All @@ -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
Expand Down Expand Up @@ -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
51 changes: 29 additions & 22 deletions Blackwing/Chimaeron.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -36,77 +42,78 @@ 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)
self:Log("SPELL_AURA_APPLIED", "Break", 82881)
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

18 changes: 8 additions & 10 deletions Blackwing/Magmaw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
12 changes: 11 additions & 1 deletion Blackwing/Omnotron.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c71eaf0

Please sign in to comment.