Skip to content

Commit

Permalink
Dragonflight/DawnOfTheInfinite/BlightOfGalakrond: Timer updates (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
Causese authored Oct 22, 2023
1 parent 97283ad commit d822f65
Showing 1 changed file with 64 additions and 20 deletions.
84 changes: 64 additions & 20 deletions Dragonflight/DawnOfTheInfinite/BlightOfGalakrond.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ mod:SetEncounterID(2668)
mod:SetRespawnTime(30)
mod:SetStage(1)

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

local corrosiveInfusionCount = 1
local incineratingBlightbreathCount = 1
local necrofrostCount = 1

--------------------------------------------------------------------------------
-- Timers
--

local timers = {
[408141] = {22.3, 16.8, 17.4, 29.2, 16.6, 18.4, 24.8, 16.8, 17.2}, -- Incinerating Blightbreath
}

--------------------------------------------------------------------------------
-- Initialization
--
Expand Down Expand Up @@ -48,6 +64,7 @@ end
function mod:OnBossEnable()
-- Stages
self:Log("SPELL_AURA_APPLIED", "MalignantTransferal", 415097, 415114) -- Stage 2, Stage 3
self:Log("SPELL_AURA_REMOVED", "MalignantTransferalOver", 415097, 415114) -- Stage 2, Stage 3

-- Blight of Galakrond
self:Log("SPELL_CAST_START", "CorrosiveInfusion", 406886)
Expand All @@ -69,8 +86,11 @@ function mod:OnBossEnable()
end

function mod:OnEngage()
corrosiveInfusionCount = 1
incineratingBlightbreathCount = 1
necrofrostCount = 1
self:SetStage(1)
self:CDBar(406886, 4.9) -- Corrosive Infusion
self:CDBar(406886, 4.8) -- Corrosive Infusion
self:CDBar(407159, 14.6) -- Blight Reclamation
end

Expand All @@ -85,20 +105,29 @@ function mod:MalignantTransferal(args)
self:SetStage(2)
self:Message("stages", "cyan", CL.percent:format(80, CL.stage:format(2)), args.spellId)
self:PlaySound("stages", "long")
-- TODO boss moves to a specific location before transforming, is it better to
-- use StopBar here and trigger these timers off something else?
self:CDBar(407159, 9.7) -- Blight Reclamation
self:CDBar(406886, 18.1) -- Corrosive Infusion
self:CDBar(407978, 27.8) -- Necrotic Winds
self:StopBar(406886) -- Corrosive Infusion
self:StopBar(407159) -- Blight Reclamation
else -- 415114, Stage 3
corrosiveInfusionCount = 1
self:SetStage(3)
self:Message("stages", "cyan", CL.percent:format(50, CL.stage:format(3)), args.spellId)
self:PlaySound("stages", "long")
self:StopBar(406886) -- Corrosive Infusion
self:StopBar(407159) -- Blight Reclamation
self:StopBar(407978) -- Necrotic Winds
self:CDBar(407159, 12.4) -- Blight Reclamation
self:CDBar(408141, 17.2) -- Incinerating Blightbreath
self:CDBar(406886, 24.2) -- Corrosive Infusion
self:CDBar(408029, 41.2) -- Necrofrost
end
end

function mod:MalignantTransferalOver(args)
if args.spellId == 415097 then -- Stage 2
self:CDBar(407159, 30.4) -- Blight Reclamation
self:CDBar(406886, 6.9) -- Corrosive Infusion
self:CDBar(407978, 16.8) -- Necrotic Winds
else -- 415114, Stage 3
self:CDBar(407159, 63.8) -- Blight Reclamation
self:CDBar(408141, timers[408141][incineratingBlightbreathCount]) -- Incinerating Blightbreath
self:CDBar(406886, 15) -- Corrosive Infusion
self:CDBar(408029, 31.2) -- Necrofrost
end
end

Expand All @@ -108,11 +137,21 @@ function mod:CorrosiveInfusion(args)
self:Message(args.spellId, "orange")
self:PlaySound(args.spellId, "alert")
if self:GetStage() == 1 then
self:CDBar(args.spellId, 15.7)
self:CDBar(args.spellId, 17)
elseif self:GetStage() == 2 then
self:CDBar(args.spellId, 31.6)
corrosiveInfusionCount = corrosiveInfusionCount + 1
if corrosiveInfusionCount == 2 then
self:CDBar(args.spellId, 34)
else
self:CDBar(args.spellId, 31.6)
end
else -- Stage 3
self:CDBar(args.spellId, 32.8)
corrosiveInfusionCount = corrosiveInfusionCount + 1
if corrosiveInfusionCount == 2 then
self:CDBar(args.spellId, 62)
else
self:CDBar(args.spellId, 60)
end
end
end

Expand Down Expand Up @@ -150,13 +189,12 @@ end
function mod:BlightReclamation(args)
self:Message(args.spellId, "purple")
self:PlaySound(args.spellId, "alarm")
-- TODO these need to be revisited
if self:GetStage() == 1 then
self:CDBar(args.spellId, 15.7)
self:CDBar(args.spellId, 17)
elseif self:GetStage() == 2 then
self:CDBar(args.spellId, 31.6)
else -- Stage 3
self:CDBar(args.spellId, 32.7)
self:CDBar(args.spellId, 60)
end
end

Expand Down Expand Up @@ -186,7 +224,14 @@ do
function mod:Necrofrost(args)
self:GetBossTarget(printTarget, 0.3, args.sourceGUID)
-- pull:133.9, 19.4, 42.5
self:CDBar(args.spellId, 19.4)
necrofrostCount = necrofrostCount + 1
if necrofrostCount == 3 then
self:CDBar(args.spellId, 42.5)
elseif necrofrostCount % 2 == 0 then
self:CDBar(args.spellId, 19.4)
else
self:CDBar(args.spellId, 40)
end
end
end

Expand Down Expand Up @@ -232,7 +277,6 @@ function mod:IncineratingBlightbreath(args)
if self:Me(guid) then
self:Say(args.spellId)
end
-- TODO pattern? pull:227.2, 18.2, 14.7, 16.9, 15.5, 18.5, 14.4
-- pull:126.0, 17.6, 18.3, 26.3
self:CDBar(args.spellId, 14.4)
incineratingBlightbreathCount = incineratingBlightbreathCount + 1
self:CDBar(args.spellId, timers[args.spellId][incineratingBlightbreathCount] or 17) -- might need more timers?
end

0 comments on commit d822f65

Please sign in to comment.