From 69db49cc555496390a38780a340ca17e87eb85c5 Mon Sep 17 00:00:00 2001 From: Albert Date: Mon, 24 Apr 2023 16:07:35 +0200 Subject: [PATCH 1/4] Algalon cancels his phase punch timer and starts a new one of 15s once it reaches last phase, the next phase punches are all on 10s timers. --- Ulduar/Algalon.lua | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Ulduar/Algalon.lua b/Ulduar/Algalon.lua index e455b44..44f6a52 100644 --- a/Ulduar/Algalon.lua +++ b/Ulduar/Algalon.lua @@ -13,6 +13,7 @@ mod:SetEncounterID(mod:Classic() and 757 or 1130) -- local blackholes = 0 +local isPhase2 = false -------------------------------------------------------------------------------- -- Initialization @@ -35,10 +36,12 @@ function mod:OnBossEnable() self:Log("SPELL_CAST_SUCCESS", "CosmicSmash", 62301, 64598) -- Seems to be 62301 (which doens't have an icon) self:Log("SPELL_CAST_SUCCESS", "BlackHoleExplosion", 64122, 65108) -- Seems to be 65108 self:Log("SPELL_CAST_START","BigBang", 64443, 64584) + self:BossYell("phase2", "Behold the tools of creation!") end function mod:OnEngage() blackholes = 0 + isPhase2 = false self:RegisterEvent("UNIT_TARGETABLE_CHANGED") --self:Bar("stages", 8+offset, CL["phase"]:format(1), "INV_Gizmo_01") -- XXX FIXME @@ -58,17 +61,17 @@ function mod:UNIT_TARGETABLE_CHANGED(_, unit) end end -function mod:UNIT_HEALTH(event, unit) - if self:MobId(self:UnitGUID(unit)) ~= 32871 then return end - local hp = self:GetHealth(unit) - if hp < 21 then - self:MessageOld("stages", "green", nil, CL["soon"]:format(CL["phase"]:format(2)), false) - self:UnregisterEvent(event) - end +function mod:phase2(args) + self:Bar(64412, 15) + isPhase2 = true end function mod:PhasePunch(args) - self:Bar(args.spellId, 15) + if isPhase2 then + self:Bar(args.spellId, 10) + else + self:Bar(args.spellId, 15) + end end function mod:PhasePunchCount(args) From 66834970784cbc35424e884ddecb68db8a37837d Mon Sep 17 00:00:00 2001 From: Albert Date: Fri, 28 Apr 2023 16:59:08 +0200 Subject: [PATCH 2/4] Added difficulty check for Algalon --- Ulduar/Algalon.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Ulduar/Algalon.lua b/Ulduar/Algalon.lua index 44f6a52..298dc9e 100644 --- a/Ulduar/Algalon.lua +++ b/Ulduar/Algalon.lua @@ -14,6 +14,7 @@ mod:SetEncounterID(mod:Classic() and 757 or 1130) local blackholes = 0 local isPhase2 = false +local difficulty = GetRaidDifficultyID() -------------------------------------------------------------------------------- -- Initialization @@ -53,7 +54,6 @@ end function mod:UNIT_TARGETABLE_CHANGED(_, unit) if self:MobId(self:UnitGUID(unit)) == 32871 and UnitCanAttack("player", unit) then -- Engage - self:RegisterEvent("UNIT_HEALTH") self:Bar(64443, 98) -- Big Bang self:DelayedMessage(64443, 93, "yellow", CL.soon:format(self:SpellName(64443))) self:Bar(64597, 33) -- Cosmic Smash @@ -62,12 +62,14 @@ function mod:UNIT_TARGETABLE_CHANGED(_, unit) end function mod:phase2(args) - self:Bar(64412, 15) + if difficulty == 4 then + self:Bar(64412, 15) + end isPhase2 = true end function mod:PhasePunch(args) - if isPhase2 then + if isPhase2 and difficulty == 4 then self:Bar(args.spellId, 10) else self:Bar(args.spellId, 15) From 332fbd6e56f7c9c0bf952934dd9ba7e964cb91ca Mon Sep 17 00:00:00 2001 From: Albert Date: Thu, 4 May 2023 23:11:20 +0200 Subject: [PATCH 3/4] added UNIT_HEALTH back --- Ulduar/Algalon.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Ulduar/Algalon.lua b/Ulduar/Algalon.lua index 298dc9e..00f4de4 100644 --- a/Ulduar/Algalon.lua +++ b/Ulduar/Algalon.lua @@ -61,6 +61,15 @@ function mod:UNIT_TARGETABLE_CHANGED(_, unit) end end +function mod:UNIT_HEALTH(event, unit) + if self:MobId(self:UnitGUID(unit)) ~= 32871 then return end + local hp = self:GetHealth(unit) + if hp < 21 then + self:MessageOld("stages", "green", nil, CL["soon"]:format(CL["phase"]:format(2)), false) + self:UnregisterEvent(event) + end +end + function mod:phase2(args) if difficulty == 4 then self:Bar(64412, 15) From b54c3c8add260cf4745b74def1b3d92e09d8bb89 Mon Sep 17 00:00:00 2001 From: Albert Date: Thu, 4 May 2023 23:13:41 +0200 Subject: [PATCH 4/4] added UNIT_HEALTH register event back --- Ulduar/Algalon.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Ulduar/Algalon.lua b/Ulduar/Algalon.lua index 00f4de4..c67d1af 100644 --- a/Ulduar/Algalon.lua +++ b/Ulduar/Algalon.lua @@ -54,6 +54,7 @@ end function mod:UNIT_TARGETABLE_CHANGED(_, unit) if self:MobId(self:UnitGUID(unit)) == 32871 and UnitCanAttack("player", unit) then -- Engage + self:RegisterEvent("UNIT_HEALTH") self:Bar(64443, 98) -- Big Bang self:DelayedMessage(64443, 93, "yellow", CL.soon:format(self:SpellName(64443))) self:Bar(64597, 33) -- Cosmic Smash