Skip to content

Commit

Permalink
VanillaNaxx-Noth: rework adds + berserk + timers
Browse files Browse the repository at this point in the history
  • Loading branch information
Zidras committed Jul 15, 2024
1 parent 4184215 commit d752c38
Showing 1 changed file with 73 additions and 56 deletions.
129 changes: 73 additions & 56 deletions DBM-VanillaNaxx/PlagueQuarter/Noth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ local L = mod:GetLocalizedStrings()

local GetSpellInfo = GetSpellInfo

mod:SetRevision("20240715111906")
mod:SetRevision("20240715212942")
mod:SetCreatureID(15954)

mod:RegisterCombat("combat_yell", L.Pull)

mod:RegisterEvents(
"SPELL_CAST_SUCCESS 29213 54835 29212 29208",
"SPELL_AURA_APPLIED 29208 29209 29210 29211",
"SPELL_CAST_SUCCESS 29213 54835 29212 29208 29209 29210 29211",
"CHAT_MSG_RAID_BOSS_EMOTE", -- 2024/07/14 it was confirmed to be left out of the script on purpose, to keep it Vanilla.
"UNIT_SPELLCAST_SUCCEEDED boss1"
)
Expand All @@ -21,34 +20,35 @@ local warnCurse = mod:NewSpellAnnounce(29213, 2)
local warnBlinkSoon = mod:NewSoonAnnounce(29208, 1)
local warnBlink = mod:NewSpellAnnounce(29208, 3)

local specWarnAdds = mod:NewSpecialWarningAdds(29212, "-Healer", nil, nil, 1, 2)
local specWarnAdds = mod:NewSpecialWarningAdds(29247, "-Healer", nil, nil, 1, 2)

local timerTeleport = mod:NewTimer(90, "TimerTeleport", 46573, nil, nil, 6, nil, nil, nil, nil, nil, nil, nil, 29216)
local timerTeleportBack = mod:NewTimer(70, "TimerTeleportBack", 46573, nil, nil, 6, nil, nil, nil, nil, nil, nil, nil, 29231)
local timerCurseCD = mod:NewCDTimer(50, 29213, nil, nil, nil, 5, nil, DBM_COMMON_L.CURSE_ICON) -- REVIEW! variance? (Onyxia PTR: [2024-07-13]@[13:54:46]) - "Curse of the Plaguebringer-29213-npc:15954-267 = pull:9.98, 50.05, 117.46"
local timerAddsCD = mod:NewAddsTimer(30, 29212, nil, "-Healer")
local timerAddsCD = mod:NewAddsTimer(30, 29247, nil, "-Healer") -- (missing beg) 8.19 > 38.23 > (TP: 68.20) > 70.20 > 100.19 > (TP return: 138.22) > 148.21 > 178.22 > 208.24 > 238.25 > (TP: 248.24) > 250.24 > 295.26 > (TP return:338.26) > 348.26 > 378.26 > 408.26 > 438.29 > 468.30 > 498.29 > (TP: 518.27) > 520.27 > 580.28 > (TP return: 643.28) > 653.29 > 683.29 > 713.31 > 743.31 > 773.32 > 803.31 > (TP: 823.29) > 825.31 > 885.31 > (TP return: 948.30) > 958.32 > 988.35 > 1018.34 > 1048.34 > 1078.35 > 1108.34 > (TP: 1128.33) > 1130.35 > 1190.35
local timerBlink = mod:NewNextTimer(30, 29208) -- No variance (Onyxia PTR: [2024-07-13]@[13:54:46]) - "Blink-npc:15954-267 = pull:22.57, 30.03, 30.03"

local timerBerserk = mod:NewBerserkTimer(665.07) -- spellId = 27680

mod:GroupSpells(29216, 29231) -- Teleport, Teleport Return

mod.vb.teleCount = 0
mod.vb.addsCount = 0
mod.vb.curseCount = 0
mod.vb.blinkCount = 0
local teleported = false
local teleportBalconyName = GetSpellInfo(29216) -- Teleport
local teleportBackName = GetSpellInfo(29231) -- Teleport Return
-- Ground phase
local summonPlaguedWarriorName = GetSpellInfo(29247)
-- Balcony phase, 1st teleport (Champions only)
local summonPlaguedChampionName = GetSpellInfo(29217)
--local summonPlaguedGuardian = GetSpellInfo(29226) -- NYI
local allTimers = {
["normal25"] = {
[1] = {
-- "Summon Plagued Champion-npc:15954-267 = pull:91.98, 30.03"
-- "Summon Plagued Warrior-npc:15954-267 = pull:29.98, 30.05, 109.94"
["adds"] = {30, 30, --[[Balcony-Champion:]]32, 30, --[[Ground-Warrior:]]48}, -- REVIEW! longer fights needed
},
},
}

-- Balcony phase, 2nd teleport (2 Champions and 2 Guardians)
local summonPlaguedGuardianName = GetSpellInfo(29226)
-- Balcony phase, 3rd teleport (3 Guardians + 1 Guardian and Construct)
local summonPlaguedGuardianAndConstructName = GetSpellInfo(29269)
-- Balcony phase, 4st teleport onwards (3 Guardians + 1 Guardian and Construct ; 3 Guardians + 1 Champion and Construct)
local summonPlaguedChampionAndConstructName = GetSpellInfo(29240)

--[[function mod:Balcony()
self.vb.teleCount = self.vb.teleCount + 1
Expand Down Expand Up @@ -94,36 +94,32 @@ function mod:OnCombatStart(delay)
self.vb.teleCount = 0
self.vb.addsCount = 0
self.vb.curseCount = 0
timerAddsCD:Start(30-delay)
self.vb.blinkCount = 0
teleported = false
timerAddsCD:Start(-delay)
timerCurseCD:Start(10-delay)
timerBlink:Start(22.57-delay)
warnBlinkSoon:Schedule(17.57-delay)
timerTeleport:Start(-delay)
warnTeleportSoon:Schedule(80-delay)
-- self:ScheduleMethod(90.8-delay, "Balcony")
timerBerserk:Start(-delay)
end

function mod:SPELL_CAST_SUCCESS(args)
if args:IsSpellID(29213, 54835) then -- Curse of the Plaguebringer
self.vb.curseCount = self.vb.curseCount + 1
warnCurse:Show()
if self.vb.teleCount == 2 and self.vb.curseCount == 2 or self.vb.teleCount == 3 and self.vb.curseCount == 1 then
timerCurseCD:Start(67)--Niche cases it's 67 and not 53-55
elseif self.vb.curseCount < 2 then
timerCurseCD:Start()
end
timerCurseCD:Start()
-- elseif args.spellId == 29212 then--Cripple that's always cast when he teleports away

-- elseif args.spellId == 29208 then
-- warnBlink:Show()
end
end

function mod:SPELL_AURA_APPLIED(args)
if args:IsSpellID(29208, 29209, 29210, 29211) then -- Blink
elseif args:IsSpellID(29208, 29209, 29210, 29211) and args:GetDestCreatureID() == 15954 then -- Blink
self.vb.blinkCount = self.vb.blinkCount + 1
warnBlink:Show()
timerBlink:Start()
warnBlinkSoon:Schedule(25)
if self.vb.blinkCount < 3 then
timerBlink:Start()
warnBlinkSoon:Schedule(25)
end
end
end

Expand All @@ -139,24 +135,23 @@ end

function mod:UNIT_SPELLCAST_SUCCEEDED(_, spellName)
if spellName == teleportBalconyName then -- Teleport
DBM:AddSpecialEventToTranscriptorLog("Teleport")
self.vb.teleCount = self.vb.teleCount + 1
DBM:AddSpecialEventToTranscriptorLog(format("Teleport %d", self.vb.teleCount))
self.vb.addsCount = 0
teleported = true
timerCurseCD:Stop()
-- timerAddsCD:Stop()
timerBlink:Stop()
warnBlinkSoon:Cancel()
local timer
if self.vb.teleCount == 1 then
timer = 70
-- timerAddsCD:Start(5)--Always 5
elseif self.vb.teleCount == 2 then
timer = 97
-- timerAddsCD:Start(5)--Always 5
elseif self.vb.teleCount == 3 then
timer = 126
timer = 90
-- timerAddsCD:Start(5)--Always 5
else
timer = 55
timer = 125
end
timerTeleportBack:Start(timer)
warnTeleportSoon:Schedule(timer - 10)
Expand All @@ -165,40 +160,62 @@ function mod:UNIT_SPELLCAST_SUCCEEDED(_, spellName)
DBM:AddSpecialEventToTranscriptorLog("Teleport Return")
self.vb.addsCount = 0
self.vb.curseCount = 0
teleported = false
-- timerAddsCD:Stop()
local timer
if self.vb.teleCount == 1 then
timer = 109
timer = 110
-- timerAddsCD:Start(10)
elseif self.vb.teleCount == 2 then
timer = 173
-- timerAddsCD:Start(17)
elseif self.vb.teleCount == 3 then
timer = 93
else
timer = 35
timer = 180
end
timerTeleport:Start(timer)
warnTeleportSoon:Schedule(timer - 10)
warnTeleportNow:Show()
if self.vb.teleCount == 4 then--11-12 except after 4th return it's 17
timerCurseCD:Start(17)--verify consistency though
if self.vb.teleCount == 1 then -- REVIEW! More data needed. 5s variance? (Onyxia PTR) - 1: [15.25-16.75]; 2: [12.25-15.83]; 3: [13.45-17.52]; 4: [15.71]
timerCurseCD:Start(15.25)
elseif self.vb.teleCount == 2 then
timerCurseCD:Start(12.25)
elseif self.vb.teleCount == 3 then
timerCurseCD:Start(13.45)
else
timerCurseCD:Start(11)
timerCurseCD:Start(15.71)
end
-- self:ScheduleMethod(timer, "Balcony")
elseif spellName == summonPlaguedWarriorName and self:AntiSpam(2, 1) then
elseif (spellName == summonPlaguedWarriorName or spellName == summonPlaguedChampionName or spellName == summonPlaguedGuardianName or spellName == summonPlaguedGuardianAndConstructName or spellName == summonPlaguedChampionAndConstructName) and self:AntiSpam(2, 1) then
self.vb.addsCount = self.vb.addsCount + 1
specWarnAdds:Show()
specWarnAdds:Play("killmob")
local timer = self:GetFromTimersTable(allTimers, "normal25", 1, "adds", self.vb.addsCount+1) or 30
timerAddsCD:Start(timer)
elseif spellName == summonPlaguedChampionName and self:AntiSpam(2, 2) then -- REVIEW! longer fights needed
self.vb.addsCount = self.vb.addsCount + 1
specWarnAdds:Show()
specWarnAdds:Play("killmob")
local timer = self:GetFromTimersTable(allTimers, "normal25", 1, "adds", self.vb.addsCount+1) or 30
timerAddsCD:Start(timer)
local teleportRemainingTimer = timerTeleport:GetRemaining()
local teleportBackRemainingTimer = timerTeleportBack:GetRemaining()
if not teleported then
if teleportRemainingTimer > 30 then -- Check if teleport will happen before next Warriors summon
timerAddsCD:Start() -- always 30s on Warriors
else
timerAddsCD:Start(teleportRemainingTimer+2) -- always 2s after teleport to balcony
end
else
-- Check teleport counter, since timing changes with each teleport
if self.vb.teleCount == 1 then
if self.vb.addsCount == 1 then
timerAddsCD:Start(30) -- always 30s on Champions in 1st teleport
else
timerAddsCD:Start(teleportBackRemainingTimer+10) -- always 10s after teleport back, regardless of teleport counter
end
elseif self.vb.teleCount == 2 then
if self.vb.addsCount == 1 then
timerAddsCD:Start(45) -- always 45s on Guardians in 2nd teleport
else
timerAddsCD:Start(teleportBackRemainingTimer+10) -- always 10s after teleport back, regardless of teleport counter
end
elseif self.vb.teleCount >= 3 then
if self.vb.addsCount == 1 then
timerAddsCD:Start(60) -- always 60s on Constructs in 3rd teleport
else
timerAddsCD:Start(teleportBackRemainingTimer+10) -- always 10s after teleport back, regardless of teleport counter
end
end
end
end
end

Expand Down

0 comments on commit d752c38

Please sign in to comment.