From 6508350f2e17d2d7b4171bc7d26c84baf18001e6 Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Wed, 8 Jan 2025 20:06:21 -0500 Subject: [PATCH] WarWithin/OperationFloodgate/GeezleGigazap: Add boss module (#1245) --- .../OperationFloodgate/GeezleGigazap.lua | 88 +++++++++++++++++++ .../OperationFloodgate/Options/Colors.lua | 5 ++ .../OperationFloodgate/Options/Sounds.lua | 5 ++ 3 files changed, 98 insertions(+) diff --git a/WarWithin/OperationFloodgate/GeezleGigazap.lua b/WarWithin/OperationFloodgate/GeezleGigazap.lua index 3c9ff0bb8..8b0e2cb51 100644 --- a/WarWithin/OperationFloodgate/GeezleGigazap.lua +++ b/WarWithin/OperationFloodgate/GeezleGigazap.lua @@ -8,6 +8,17 @@ if not mod then return end mod:RegisterEnableMob(226404) -- Geezle Gigazap mod:SetEncounterID(3054) mod:SetRespawnTime(30) +mod:SetPrivateAuraSounds({ + 468811, -- Gigazap +}) + +-------------------------------------------------------------------------------- +-- Locals +-- + +local turboChargeCount = 1 +local gigazapCount = 1 +local thunderPunchCount = 1 -------------------------------------------------------------------------------- -- Initialization @@ -15,15 +26,92 @@ mod:SetRespawnTime(30) function mod:GetOptions() return { + 465463, -- Turbo Charge + 468841, -- Leaping Sparks + {468813, "PRIVATE"}, -- Gigazap + {466190, "TANK_HEALER"}, -- Thunder Punch + 468723, -- Shock Water } end function mod:OnBossEnable() + self:Log("SPELL_CAST_START", "TurboCharge", 465463) + self:Log("SPELL_CAST_START", "LeapingSparks", 468841) + self:Log("SPELL_AURA_APPLIED", "LeapingSparkApplied", 468616) + self:Log("SPELL_CAST_START", "Gigazap", 468813) + self:Log("SPELL_CAST_START", "ThunderPunch", 466190) + self:Log("SPELL_PERIODIC_DAMAGE", "ShockWaterDamage", 468723) + self:Log("SPELL_PERIODIC_MISSED", "ShockWaterDamage", 468723) end function mod:OnEngage() + turboChargeCount = 1 + gigazapCount = 1 + thunderPunchCount = 1 + self:CDBar(465463, 1.6, CL.count:format(self:SpellName(465463), turboChargeCount)) -- Turbo Charge + self:CDBar(466190, 24.0) -- Thunder Punch + self:CDBar(468813, 28.0, CL.count:format(self:SpellName(468813), gigazapCount)) -- Gigazap + self:CDBar(468841, 38.0) -- Leaping Sparks end -------------------------------------------------------------------------------- -- Event Handlers -- + +function mod:TurboCharge(args) + self:StopBar(CL.count:format(args.spellName, turboChargeCount)) + self:Message(args.spellId, "orange", CL.count:format(args.spellName, turboChargeCount)) + turboChargeCount = turboChargeCount + 1 + self:CDBar(args.spellId, 60.0, CL.count:format(args.spellName, turboChargeCount)) + self:PlaySound(args.spellId, "long") +end + +function mod:LeapingSparks(args) + self:Message(args.spellId, "red") + self:CDBar(args.spellId, 60.0) +end + +function mod:LeapingSparkApplied(args) + if self:Me(args.destGUID) then + self:PersonalMessage(468841, nil, args.spellName) + self:PlaySound(468841, "warning") + end +end + +function mod:Gigazap(args) + self:StopBar(CL.count:format(args.spellName, gigazapCount)) + self:Message(args.spellId, "yellow", CL.count:format(args.spellName, gigazapCount)) + gigazapCount = gigazapCount + 1 + if gigazapCount % 2 == 0 then + self:CDBar(args.spellId, 26.0, CL.count:format(args.spellName, gigazapCount)) + else + self:CDBar(args.spellId, 34.0, CL.count:format(args.spellName, gigazapCount)) + end + self:PlaySound(args.spellId, "info") +end + +function mod:ThunderPunch(args) + self:Message(args.spellId, "purple") + thunderPunchCount = thunderPunchCount + 1 + if thunderPunchCount % 2 == 0 then + self:CDBar(args.spellId, 26.0) + else + self:CDBar(args.spellId, 34.0) + end + if self:Tank() then + self:PlaySound(args.spellId, "alarm") + else + self:PlaySound(args.spellId, "alert") + end +end + +do + local prev = 0 + function mod:ShockWaterDamage(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 diff --git a/WarWithin/OperationFloodgate/Options/Colors.lua b/WarWithin/OperationFloodgate/Options/Colors.lua index e554c5f10..3836bb864 100644 --- a/WarWithin/OperationFloodgate/Options/Colors.lua +++ b/WarWithin/OperationFloodgate/Options/Colors.lua @@ -26,6 +26,11 @@ BigWigs:AddColors("Swampface", { }) BigWigs:AddColors("Geezle Gigazap", { + [465463] = "orange", + [466190] = "purple", + [468723] = "blue", + [468813] = "yellow", + [468841] = {"blue","red"}, }) BigWigs:AddColors("Operation: Floodgate Trash", { diff --git a/WarWithin/OperationFloodgate/Options/Sounds.lua b/WarWithin/OperationFloodgate/Options/Sounds.lua index d1acd4364..a7c840000 100644 --- a/WarWithin/OperationFloodgate/Options/Sounds.lua +++ b/WarWithin/OperationFloodgate/Options/Sounds.lua @@ -26,6 +26,11 @@ BigWigs:AddSounds("Swampface", { }) BigWigs:AddSounds("Geezle Gigazap", { + [465463] = "long", + [466190] = {"alarm","alert"}, + [468723] = "underyou", + [468813] = "info", + [468841] = "warning", }) BigWigs:AddSounds("Operation: Floodgate Trash", {