Skip to content

Commit

Permalink
WarWithin/OperationFloodgate/BigMOMMA: Add boss module (#1242)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Jan 9, 2025
1 parent 382dffe commit 8037066
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 0 deletions.
116 changes: 116 additions & 0 deletions WarWithin/OperationFloodgate/BigMOMMA.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,138 @@ if not mod then return end
mod:RegisterEnableMob(226398) -- Big M.O.M.M.A.
mod:SetEncounterID(3020)
mod:SetRespawnTime(30)
mod:SetStage(1)

--------------------------------------------------------------------------------
-- Initialization
--

function mod:GetOptions()
return {
{460156, "CASTBAR"}, -- Jumpstart
473287, -- Excessive Electrification
471585, -- Mobilize Mechadrones
{473351, "TANK_HEALER"}, -- Electrocrush
{473220, "SAY"}, -- Sonic Boom
469981, -- Kill-o-Block Barrier
-- Darkfuse Mechadrone
1214780, -- Maximum Distortion (Mythic)
{472452, "NAMEPLATE"}, -- Doom Storm
}, {
[1214780] = -30316, -- Darkfuse Mechadrone
}
end

function mod:OnBossEnable()
self:Log("SPELL_CAST_START", "Jumpstart", 460156)
self:Log("SPELL_AURA_APPLIED", "JumpstartApplied", 460156)
self:Log("SPELL_PERIODIC_DAMAGE", "ExcessiveElectrificationDamage", 473287)
self:Log("SPELL_PERIODIC_MISSED", "ExcessiveElectrificationDamage", 473287)
self:Log("SPELL_CAST_START", "MobilizeMechadrones", 471585)
self:Log("SPELL_CAST_START", "Electrocrush", 473351)
self:Log("SPELL_CAST_START", "SonicBoom", 473220)
self:Log("SPELL_CAST_START", "KillOBlockBarrier", 469981)

-- Darkfuse Mechadrone
self:Log("SPELL_SUMMON", "MobilizeMechadronesSummon", 471595)
self:Log("SPELL_CAST_START", "MaximumDistortion", 1214780) -- Mythic only
self:Log("SPELL_CAST_START", "DoomStorm", 472452)
self:Death("DarkfuseMechadroneDeath", 228424)
end

function mod:OnEngage()
self:SetStage(1)
self:CDBar(473351, 5.7) -- Electrocrush
self:CDBar(473220, 15.4) -- Sonic Boom
self:CDBar(469981, 51.0) -- Kill-o-Block Barrier
end

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

function mod:Jumpstart(args)
self:StopBar(473351) -- Electrocrush
self:StopBar(473220) -- Sonic Boom
self:StopBar(469981) -- Kill-o-Block Barrier
self:SetStage(2)
self:Message(args.spellId, "green", CL.casting:format(args.spellName))
self:PlaySound(args.spellId, "info")
end

function mod:JumpstartApplied(args)
self:Message(args.spellId, "green", CL.onboss:format(args.spellName))
self:CastBar(args.spellId, 12)
self:PlaySound(args.spellId, "long")
end

do
local prev = 0
function mod:ExcessiveElectrificationDamage(args)
if self:Me(args.destGUID) and args.time - prev > 1.5 then
prev = args.time
self:PersonalMessage(args.spellId, "underyou")
self:PlaySound(args.spellId, "underyou")
end
end
end

function mod:MobilizeMechadrones(args)
self:SetStage(1)
self:Message(args.spellId, "cyan")
self:CDBar(473351, 9.2) -- Electrocrush
self:CDBar(473220, 18.9) -- Sonic Boom
self:CDBar(469981, 54.1) -- Kill-o-Block Barrier
self:PlaySound(args.spellId, "info")
end

function mod:Electrocrush(args)
self:Message(args.spellId, "purple")
self:CDBar(args.spellId, 20.6)
self:PlaySound(args.spellId, "alert")
end

do
local function printTarget(self, name, guid)
self:TargetMessage(473220, "yellow", name)
if self:Me(guid) then
self:Say(473220, nil, nil, "Sonic Boom")
self:PlaySound(473220, "warning")
else
self:PlaySound(473220, "alarm", nil, name)
end
end

function mod:SonicBoom(args)
self:GetUnitTarget(printTarget, 0.2, args.sourceGUID)
self:CDBar(args.spellId, 21.9)
end
end

function mod:KillOBlockBarrier(args)
self:StopBar(args.spellId)
self:Message(args.spellId, "cyan")
self:PlaySound(args.spellId, "info")
end

-- Darkfuse Mechadrone

function mod:MobilizeMechadronesSummon(args)
self:Nameplate(472452, 9.3, args.destGUID) -- Doom Storm
end

function mod:MaximumDistortion(args)
-- TODO timer?
self:Message(args.spellId, "red")
self:PlaySound(args.spellId, "alarm")
end

function mod:DoomStorm(args)
self:Message(args.spellId, "orange")
self:Nameplate(args.spellId, 32.7, args.sourceGUID)
self:PlaySound(args.spellId, "alarm")
end

function mod:DarkfuseMechadroneDeath(args)
self:ClearNameplate(args.destGUID)
end
8 changes: 8 additions & 0 deletions WarWithin/OperationFloodgate/Options/Colors.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@

BigWigs:AddColors("Big M.O.M.M.A.", {
[460156] = "green",
[469981] = "cyan",
[471585] = "cyan",
[472452] = "orange",
[473220] = {"blue","yellow"},
[473287] = "blue",
[473351] = "purple",
[1214780] = "red",
})

BigWigs:AddColors("Demolition Duo", {
Expand Down
8 changes: 8 additions & 0 deletions WarWithin/OperationFloodgate/Options/Sounds.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@

BigWigs:AddSounds("Big M.O.M.M.A.", {
[460156] = {"info","long"},
[469981] = "info",
[471585] = "info",
[472452] = "alarm",
[473220] = {"alarm","warning"},
[473287] = "underyou",
[473351] = "alert",
[1214780] = "alarm",
})

BigWigs:AddSounds("Demolition Duo", {
Expand Down

0 comments on commit 8037066

Please sign in to comment.