Skip to content

Commit

Permalink
BlackwingLair: Updates for SoD
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Sep 30, 2024
1 parent 8ff8016 commit ada363a
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 8 deletions.
40 changes: 36 additions & 4 deletions BlackwingLair/Broodlord.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function mod:GetOptions()
return {
{24573, "ICON"}, -- Mortal Strike
23331, -- Blast Wave
18670, -- Knock Away
}
end

Expand All @@ -23,17 +24,24 @@ if mod:GetSeason() == 2 then
return {
{24573, "ICON"}, -- Mortal Strike
23331, -- Blast Wave
18670, -- Knock Away
"stages",
{367369, "ICON", "SAY", "SAY_COUNTDOWN", "ME_ONLY_EMPHASIZE"}, -- Tactical Charge
},nil,{
[367369] = CL.charge, -- Tactical Charge (Charge)
}
end
end

function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "MortalStrike", 24573)
self:Log("SPELL_AURA_REMOVED", "MortalStrikeOver", 24573)
self:Log("SPELL_AURA_APPLIED", "MortalStrikeApplied", 24573)
self:Log("SPELL_AURA_REMOVED", "MortalStrikeRemoved", 24573)
self:Log("SPELL_CAST_SUCCESS", "BlastWave", 23331)
self:Log("SPELL_CAST_SUCCESS", "KnockAway", 18670)
if self:GetSeason() == 2 then
self:Log("SPELL_CAST_SUCCESS", "Teleport", 468495)
self:Log("SPELL_AURA_APPLIED", "TacticalChargeApplied", 367369)
self:Log("SPELL_AURA_REMOVED", "TacticalChargeRemoved", 367369)
end
end

Expand All @@ -47,14 +55,14 @@ end
-- Event Handlers
--

function mod:MortalStrike(args)
function mod:MortalStrikeApplied(args)
self:TargetMessage(args.spellId, "yellow", args.destName)
self:PrimaryIcon(args.spellId, args.destName)
self:TargetBar(args.spellId, 5, args.destName)
self:PlaySound(args.spellId, "alarm")
end

function mod:MortalStrikeOver(args)
function mod:MortalStrikeRemoved(args)
self:StopBar(args.spellName, args.destName)
self:PrimaryIcon(args.spellId)
end
Expand All @@ -64,6 +72,11 @@ function mod:BlastWave(args)
self:PlaySound(args.spellId, "info")
end

function mod:KnockAway(args)
self:TargetMessage(args.spellId, "yellow", args.destName)
self:PlaySound(args.spellId, "alert")
end

function mod:UNIT_HEALTH(event, unit)
if self:MobId(self:UnitGUID(unit)) == 12017 then -- Broodlord Lashlayer
local hp = self:GetHealth(unit)
Expand All @@ -80,3 +93,22 @@ function mod:Teleport()
self:Message("stages", "cyan", CL.percent:format(50, CL.teleport), false)
self:PlaySound("stages", "long")
end

function mod:TacticalChargeApplied(args)
self:TargetMessage(args.spellId, "red", args.destName, CL.charge)
self:SecondaryIcon(args.spellId, args.destName)
self:TargetBar(args.spellId, 5, args.destName, CL.charge)
if self:Me(args.destGUID) then
self:Say(args.spellId, CL.charge, nil, "Charge")
self:SayCountdown(args.spellId, 5)
end
self:PlaySound(args.spellId, "warning", nil, args.destName)
end

function mod:TacticalChargeRemoved(args)
self:StopBar(CL.charge, args.destName)
self:SecondaryIcon(args.spellId)
if self:Me(args.destGUID) then
self:CancelSayCountdown(args.spellId)
end
end
2 changes: 1 addition & 1 deletion BlackwingLair/Chromaggus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,6 @@ function mod:ElementalShield(args) -- Weaknesses
end

function mod:RollOver(args)
self:Message(args.spellId, "yellow")
self:Message(args.spellId, "cyan")
self:PlaySound(args.spellId, "long")
end
59 changes: 58 additions & 1 deletion BlackwingLair/Flamegor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ if not mod then return end
mod:RegisterEnableMob(11981)
mod:SetEncounterID(615)

--------------------------------------------------------------------------------
-- Locals
--

local killedBosses = {}
local UpdateInfoBoxList
local bossList = {
[11981] = 1, -- Flamegor
[14601] = 3, -- Ebonroc
}

--------------------------------------------------------------------------------
-- Initialization
--
Expand All @@ -28,6 +39,7 @@ if mod:GetSeason() == 2 then
368521, -- Brand of Flame
{467764, "CASTBAR", "CASTBAR_COUNTDOWN", "ME_ONLY_EMPHASIZE"}, -- Go!
{467732, "CASTBAR", "CASTBAR_COUNTDOWN", "ME_ONLY_EMPHASIZE"}, -- Stop!
{"health", "INFOBOX"},
}
end
end
Expand All @@ -45,14 +57,26 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_REMOVED", "GoOrStopRemoved", 467764, 467732)
self:Log("SPELL_CAST_SUCCESS", "GoSuccess", 467764)
self:Log("SPELL_CAST_SUCCESS", "StopSuccess", 467732)
self:Death("Deaths", 11981, 14601) -- Flamegor, Ebonroc
end
end

function mod:OnEngage()
self:CDBar(23339, self:GetSeason() == 2 and 66 or 29) -- Wing Buffet
if self:GetPlayerAura(467047) then -- Black Essence
self:CDBar(467732, 20) -- Stop
end
if self:GetSeason() == 2 then
self:CDBar(23339, 66) -- Wing Buffet
self:OpenInfo("health", CL.other:format("BigWigs", CL.health))
for npcId, line in next, bossList do
self:SetInfo("health", line, self:BossName(npcId == 11981 and 1534 or 1533)) -- Flamegor, Ebonroc
self:SetInfoBar("health", line, 1)
self:SetInfo("health", line + 1, "100%")
end
self:SimpleTimer(UpdateInfoBoxList, 1)
else
self:CDBar(23339, 29) -- Wing Buffet
end
end

--------------------------------------------------------------------------------
Expand Down Expand Up @@ -129,3 +153,36 @@ function mod:StopSuccess(args)
self:StopBar(args.spellName) -- Stop!
self:CDBar(467764, 20) -- Go!
end

do
local unitTracker = {}
function mod:Deaths(args)
unitTracker[args.mobId] = nil
killedBosses[args.mobId] = true

local line = bossList[args.mobId]
self:SetInfoBar("health", line, 0)
self:SetInfo("health", line + 1, CL.dead)
end

function UpdateInfoBoxList()
if not mod:IsEngaged() then return end
mod:SimpleTimer(UpdateInfoBoxList, 0.5)

-- Flamegor
if not killedBosses[11981] and (not unitTracker[11981] or mod:MobId(mod:UnitGUID(unitTracker[11981])) ~= 11981) then
unitTracker[11981] = mod:GetUnitIdByGUID(11981)
end
-- Ebonroc
if not killedBosses[14601] and (not unitTracker[14601] or mod:MobId(mod:UnitGUID(unitTracker[14601])) ~= 14601) then
unitTracker[14601] = mod:GetUnitIdByGUID(14601)
end

for npcId, unitToken in next, unitTracker do
local line = bossList[npcId]
local currentHealthPercent = math.floor(mod:GetHealth(unitToken))
mod:SetInfoBar("health", line, currentHealthPercent/100)
mod:SetInfo("health", line + 1, ("%d%%"):format(currentHealthPercent))
end
end
end
7 changes: 6 additions & 1 deletion BlackwingLair/Nefarian.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ local mod, CL = BigWigs:NewBoss("Nefarian Classic", 469, 1536)
if not mod then return end
mod:RegisterEnableMob(11583, 10162, 14261, 14262, 14263, 14264, 14265, 14302) -- Nefarian, Lord Victor Nefarius, Blue, Green, Bronze, Red, Black, Chromatic
mod:SetEncounterID(617)
mod:SetRespawnTime(900)
if mod:GetSeason() ~= 2 then
mod:SetRespawnTime(900)
end
mod:SetStage(1)

--------------------------------------------------------------------------------
Expand Down Expand Up @@ -192,6 +194,9 @@ end

function mod:CHAT_MSG_MONSTER_YELL(_, msg)
if msg:find(L.engage_yell_trigger, nil, true) then
if self:IsEngaged() then
self:Wipe()
end
self:Engage()
elseif msg:find(L.stage3_yell_trigger, nil, true) then
self:SetStage(3)
Expand Down
32 changes: 32 additions & 0 deletions BlackwingLair/Razorgore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ function mod:GetOptions()
return {
14515, -- Dominate Mind
{23023, "ICON"}, -- Conflagration
367873, -- Blinding Ash
366909, -- Ruby Flames
367740, -- Creeping Chill
"eggs",
"stages",
},nil,{
[14515] = CL.mind_control, -- Dominate Mind (Mind Control)
[367873] = CL.underyou:format(CL.fire), -- Blinding Ash (Fire under YOU)
[366909] = CL.underyou:format(CL.fire), -- Ruby Flames (Fire under YOU)
}
end

Expand All @@ -51,6 +56,13 @@ function mod:OnBossEnable()
self:Log("SPELL_CAST_SUCCESS", "DestroyEgg", 19873)
self:Log("SPELL_AURA_APPLIED", "Conflagration", 23023)
self:Log("SPELL_AURA_REMOVED", "ConflagrationOver", 23023)
if self:GetSeason() == 2 then
self:Log("SPELL_AURA_APPLIED", "GroundDamage", 367873, 366909) -- Blinding Ash, Ruby Flames
self:Log("SPELL_PERIODIC_DAMAGE", "GroundDamage", 367873, 366909)
self:Log("SPELL_PERIODIC_MISSED", "GroundDamage", 367873, 366909)
self:Log("SPELL_AURA_APPLIED", "CreepingChillApplied", 367740)
self:Log("SPELL_AURA_APPLIED_DOSE", "CreepingChillApplied", 367740)
end
end

function mod:OnEngage()
Expand Down Expand Up @@ -116,3 +128,23 @@ function mod:ConflagrationOver(args)
self:StopBar(args.spellName, args.destName)
self:PrimaryIcon(args.spellId)
end

do
local prev = 0
function mod:GroundDamage(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

function mod:CreepingChillApplied(args)
if self:Me(args.destGUID) then
self:StackMessage(args.spellId, "blue", args.destName, args.amount, 3)
if args.amount and args.amount >= 3 then
self:PlaySound(args.spellId, "alarm", nil, args.destName)
end
end
end
2 changes: 1 addition & 1 deletion BlackwingLair/Trash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function mod:ArcaneBombApplied(args)
self:TargetBar(args.spellId, 8, args.destName)
if self:Me(args.destGUID) then
self:Yell(args.spellId, nil, nil, "Arcane Bomb")
self:YellCountdown(args.spellId, 8, nil, 5)
self:YellCountdown(args.spellId, 8, nil, 6)
end
self:PlaySound(args.spellId, "warning", nil, args.destName)
end
Expand Down

0 comments on commit ada363a

Please sign in to comment.