From ab5341e28ad4ef536aeb6630390aa49c9e900eeb Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Sat, 7 Oct 2023 17:45:15 -0400 Subject: [PATCH] Cataclysm/ThroneTides/Nazjar: High Tide, Shock Blast, Geysers, Focused Tempest, Trident Flurry --- Cataclysm/ThroneTides/Nazjar.lua | 140 +++++++++++++++++++---- Cataclysm/ThroneTides/Options/Colors.lua | 7 +- Cataclysm/ThroneTides/Options/Sounds.lua | 6 + 3 files changed, 131 insertions(+), 22 deletions(-) diff --git a/Cataclysm/ThroneTides/Nazjar.lua b/Cataclysm/ThroneTides/Nazjar.lua index 53085425b..03ab73bd7 100644 --- a/Cataclysm/ThroneTides/Nazjar.lua +++ b/Cataclysm/ThroneTides/Nazjar.lua @@ -1,19 +1,19 @@ - +local isTenDotTwo = select(4, GetBuildInfo()) >= 100200 --- XXX delete when 10.2 is live everywhere -------------------------------------------------------------------------------- --- Module declaration +-- Module Declaration -- local mod, CL = BigWigs:NewBoss("Lady Naz'jar", 643, 101) if not mod then return end mod:RegisterEnableMob(40586) -mod.engageId = 1045 -mod.respawnTime = 30 +mod:SetEncounterID(1045) +mod:SetRespawnTime(30) -------------------------------------------------------------------------------- -- Locals -- -local nextSpoutWarning = 66 +local highTideCount = 1 -------------------------------------------------------------------------------- -- Initialization @@ -21,40 +21,138 @@ local nextSpoutWarning = 66 function mod:GetOptions() return { - 75683, -- Waterspout + -- Lady Naz'jar + 75683, -- High Tide + {428054, "SAY"}, -- Shock Blast + 427771, -- Geysers + {428374, "ME_ONLY_EMPHASIZE"}, -- Focused Tempest + {428263, "OFF"}, -- Water Bolt + -- Naz'jar Honor Guard + 428293, -- Trident Flurry + }, { + [75683] = self.displayName, + [428293] = -2183, -- Naz'jar Honor Guard } end function mod:OnBossEnable() - self:RegisterUnitEvent("UNIT_HEALTH", nil, "boss1") - self:Log("SPELL_AURA_APPLIED", "Waterspout", 75683) - self:Log("SPELL_AURA_REMOVED", "WaterspoutRemoved", 75683) + -- Lady Naz'jar + -- XXX remove this listener from the if block when 10.2 is live everywhere + if isTenDotTwo then + self:Log("SPELL_CAST_START", "HighTideStarting", 75683) + end + self:Log("SPELL_AURA_APPLIED", "HighTide", 75683) + self:Log("SPELL_AURA_REMOVED", "HighTideOver", 75683) + -- XXX remove these listeners from the if block when 10.2 is live everywhere + if isTenDotTwo then + self:Log("SPELL_CAST_START", "ShockBlast", 428054) + self:Log("SPELL_CAST_START", "Geysers", 427771) + self:Log("SPELL_CAST_START", "FocusedTempest", 428374) + self:Log("SPELL_CAST_START", "WaterBolt", 428263) + + -- Naz'jar Honor Guard + self:Log("SPELL_CAST_START", "TridentFlurry", 428293) + self:Death("NazjarHonorGuardDeath", 40633) + end end function mod:OnEngage() - nextSpoutWarning = 66 + highTideCount = 1 + -- XXX remove these timers from the if block when 10.2 is live everywhere + if isTenDotTwo then + self:CDBar(428374, 7.4) -- Focused Tempest + self:CDBar(427771, 16.1) -- Geysers + self:CDBar(428054, 19.7) -- Shock Blast + end +end + +-- XXX delete this entire block below when 10.2 is live everywhere +if not isTenDotTwo then + function mod:GetOptions() + return { + 75683, -- Waterspout + } + end end -------------------------------------------------------------------------------- -- Event Handlers -- -function mod:Waterspout(args) - self:Bar(args.spellId, 60) +-- Lady Naz'jar + +function mod:HighTideStarting(args) + self:StopBar(428374) -- Focused Tempest + self:StopBar(427771) -- Geysers + self:StopBar(428054) -- Shock Blast +end + +function mod:HighTide(args) + local percent = highTideCount == 1 and 60 or 30 + self:Message(args.spellId, "cyan", CL.percent:format(percent, args.spellName)) + self:PlaySound(args.spellId, "long") + highTideCount = highTideCount + 1 +end + +function mod:HighTideOver(args) + self:Message(args.spellId, "cyan", CL.over:format(args.spellName)) + self:PlaySound(args.spellId, "info") + -- XXX remove these timers from the if block when 10.2 is live everywhere + if isTenDotTwo then + self:CDBar(428374, 2.4) -- Focused Tempest + self:CDBar(428054, 24.3) -- Shock Blast + self:CDBar(427771, 28.0) -- Geysers + end +end + +do + local function printTarget(self, player, guid) + if self:Me(guid) then + self:Say(428054) -- Shock Blast + end + end + + function mod:ShockBlast(args) + self:GetBossTarget(printTarget, 0.4, args.sourceGUID) + self:Message(args.spellId, "purple") + self:PlaySound(args.spellId, "alarm") + self:CDBar(args.spellId, 26.7) + end end -function mod:WaterspoutRemoved(args) -- if all 3 adds die, she stops casting - self:StopBar(args.spellId) +function mod:Geysers(args) + self:Message(args.spellId, "orange") + self:PlaySound(args.spellId, "alarm") + self:CDBar(args.spellId, 29.1) end -function mod:UNIT_HEALTH(event, unit) - local hp = self:GetHealth(unit) - if hp < nextSpoutWarning then - self:MessageOld(75683, "yellow", nil, CL.soon:format(self:SpellName(75683)), false) - nextSpoutWarning = nextSpoutWarning - 30 - if nextSpoutWarning < 36 then - self:UnregisterUnitEvent(event, unit) +do + local function printTarget(self, player, guid) + if self:Healer() or self:Me(guid) then + self:TargetMessage(428374, "yellow", player) + self:PlaySound(428374, "alert", nil, player) end end + + function mod:FocusedTempest(args) + self:GetBossTarget(printTarget, 0.4, args.sourceGUID) + self:CDBar(args.spellId, 14.5) + end +end + +function mod:WaterBolt(args) + self:Message(args.spellId, "red", CL.casting:format(args.spellName)) + self:PlaySound(args.spellId, "alert") end +-- Naz'jar Honor Guard + +function mod:TridentFlurry(args) + self:Message(args.spellId, "orange") + self:PlaySound(args.spellId, "alarm") + self:CDBar(args.spellId, 11.9) +end + +function mod:NazjarHonorGuardDeath(args) + self:StopBar(428293) -- Trident Flurry +end diff --git a/Cataclysm/ThroneTides/Options/Colors.lua b/Cataclysm/ThroneTides/Options/Colors.lua index fa05c89da..4fcabe29d 100644 --- a/Cataclysm/ThroneTides/Options/Colors.lua +++ b/Cataclysm/ThroneTides/Options/Colors.lua @@ -1,6 +1,11 @@ BigWigs:AddColors("Lady Naz'jar", { - [75683] = "yellow", + [75683] = "cyan", + [427771] = "orange", + [428054] = "purple", + [428263] = "red", + [428293] = "orange", + [428374] = {"blue","yellow"}, }) BigWigs:AddColors("Commander Ulthok", { diff --git a/Cataclysm/ThroneTides/Options/Sounds.lua b/Cataclysm/ThroneTides/Options/Sounds.lua index 1a5ded0b3..67d05cde9 100644 --- a/Cataclysm/ThroneTides/Options/Sounds.lua +++ b/Cataclysm/ThroneTides/Options/Sounds.lua @@ -1,5 +1,11 @@ BigWigs:AddSounds("Lady Naz'jar", { + [75683] = {"info","long"}, + [427771] = "alarm", + [428054] = "alarm", + [428263] = "alert", + [428293] = "alarm", + [428374] = "alert", }) BigWigs:AddSounds("Commander Ulthok", {