Skip to content

Commit

Permalink
Also modernize both bosses in throne of the four winds
Browse files Browse the repository at this point in the history
Also made change to conclave to always start timers instead bad way it was done before (only starting if targeting caster). this boss will be redone with distance filters (if possible) when cata launches
  • Loading branch information
MysticalOS committed Apr 11, 2024
1 parent 7885891 commit e1008bb
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 158 deletions.
85 changes: 44 additions & 41 deletions DBM-Raids-Cata/ThroneFourWinds/AlAkir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,30 @@ mod:SetUsedIcons(8)
mod:RegisterCombat("combat")

mod:RegisterEventsInCombat(
"SPELL_AURA_APPLIED",
"SPELL_AURA_APPLIED_DOSE",
"SPELL_AURA_REMOVED",
"SPELL_CAST_START",
"SPELL_CAST_START 87770",
"SPELL_AURA_APPLIED 87904 89668 88301",
"SPELL_AURA_APPLIED_DOSE 88301",
"SPELL_AURA_REMOVED 89668",
"UNIT_SPELLCAST_SUCCEEDED boss1"
)

--Classes that can drop stacks of acid rain, but only if they can time AMS/bubble right, they use it wrong and they do no good.
local isDKorPaly = select(2, UnitClass("player")) == "DEATHKNIGHT"
or select(2, UnitClass("player")) == "PALADIN"

local warnPhase = mod:NewPhaseChangeAnnounce(2, 2, nil, nil, nil, nil, nil, 2)
local warnIceStorm = mod:NewSpellAnnounce(88239, 3)
local warnSquallLine = mod:NewSpellAnnounce(91129, 4)
local warnWindBurst = mod:NewSpellAnnounce(87770, 3)
local warnAdd = mod:NewSpellAnnounce(88272, 2)
local warnPhase2 = mod:NewPhaseAnnounce(2)
local warnAcidRain = mod:NewCountAnnounce(88301, 2, nil, false)
local warnFeedback = mod:NewStackAnnounce(87904, 2)
local warnPhase3 = mod:NewPhaseAnnounce(3)
local warnCloud = mod:NewSpellAnnounce(89588, 3)
local warnLightningRod = mod:NewTargetAnnounce(89668, 4)
local warnLightningRod = mod:NewTargetNoFilterAnnounce(89668, 4)

local specWarnWindBurst = mod:NewSpecialWarningSpell(87770, nil, nil, nil, 2)
local specWarnIceStorm = mod:NewSpecialWarningMove(91020)
local specWarnCloud = mod:NewSpecialWarningMove(89588)
local specWarnLightningRod = mod:NewSpecialWarningMoveAway(89668)
local specWarnWindBurst = mod:NewSpecialWarningSpell(87770, nil, nil, nil, 2, 2)
local specWarnGTFO = mod:NewSpecialWarningGTFO(91020, nil, nil, nil, 1, 8)
local specWarnLightningRod = mod:NewSpecialWarningMoveAway(89668, nil, nil, nil, 1, 2)
local yellLightningRod = mod:NewYell(89668)

local timerWindBurst = mod:NewCastTimer(5, 87770, nil, nil, nil, 2)
Expand All @@ -53,24 +51,21 @@ local berserkTimer = mod:NewBerserkTimer(600)
mod:AddBoolOption("LightningRodIcon")
mod:AddBoolOption("RangeFrame", true)

local phase2Started = false
mod.vb.phase2Started = false

function mod:CloudRepeat()
self:UnscheduleMethod("CloudRepeat")
warnCloud:Show()
if self:IsInCombat() then--Don't schedule if not in combat, prevent an infinite loop from happening if for some reason one got scheduled exactly on boss death.
if self:IsDifficulty("heroic10", "heroic25") then
timerLightningCloudCD:Start(10)
self:ScheduleMethod(10, "CloudRepeat")
else
timerLightningCloudCD:Start()
self:ScheduleMethod(15, "CloudRepeat")
end
local timer = self:IsDifficulty("heroic10", "heroic25") and 10 or 15
timerLightningCloudCD:Start(timer)
self:ScheduleMethod(timer, "CloudRepeat")
end
end

function mod:OnCombatStart(delay)
phase2Started = false
self:SetStage(1)
self.vb.phase2Started = false
berserkTimer:Start(-delay)
timerWindBurstCD:Start(20-delay)
timerIceStormCD:Start(6-delay)
Expand All @@ -88,6 +83,19 @@ function mod:OnCombatEnd()
self:UnregisterShortTermEvents()
end

function mod:SPELL_CAST_START(args)
if args.spellId == 87770 then--Phase 1 wind burst
specWarnWindBurst:Show()
specWarnWindBurst:Play("carefly")
timerWindBurstCD:Start()
if self:IsDifficulty("heroic10", "heroic25") then
timerWindBurst:Start(4)
else
timerWindBurst:Start()
end
end
end

function mod:SPELL_AURA_APPLIED(args)
if args.spellId == 87904 then
warnFeedback:Show(args.destName, args.amount or 1)
Expand All @@ -107,6 +115,7 @@ function mod:SPELL_AURA_APPLIED(args)
timerLightningRodCD:Start()
if args:IsPlayer() then
specWarnLightningRod:Show()
specWarnLightningRod:Play("runout")
yellLightningRod:Yell()
if self.Options.RangeFrame then
DBM.RangeCheck:Show(20)
Expand All @@ -133,39 +142,29 @@ function mod:SPELL_AURA_REMOVED(args)
end
end

function mod:SPELL_CAST_START(args)
if args.spellId == 87770 then--Phase 1 wind burst
specWarnWindBurst:Show()
timerWindBurstCD:Start()
if self:IsDifficulty("heroic10", "heroic25") then
timerWindBurst:Start(4)
else
timerWindBurst:Start()
end
end
end

function mod:SPELL_DAMAGE(_, _, _, _, destGUID, _, _, _, spellId)
function mod:SPELL_DAMAGE(_, _, _, _, destGUID, _, _, _, spellId, spellName)
if spellId == 88858 and self:AntiSpam(5, 1) then--Phase 3 wind burst, does not use cast success
warnWindBurst:Show()
timerWindBurstCD:Start(20)
elseif spellId == 89588 and destGUID == UnitGUID("player") and self:AntiSpam(3, 2) then--Phase 3 Clouds
specWarnCloud:Show()
specWarnGTFO:Show(spellName)
specWarnGTFO:Play("watchfeet")
end
end
mod.SPELL_MISSED = mod.SPELL_DAMAGE

function mod:SPELL_PERIODIC_DAMAGE(_, _, _, _, destGUID, _, _, _, spellId)
function mod:SPELL_PERIODIC_DAMAGE(_, _, _, _, destGUID, _, _, _, spellId, spellName)
if spellId == 91020 and destGUID == UnitGUID("player") and self:AntiSpam(4, 1) then--Phase 1 Ice Storm
specWarnIceStorm:Show()
specWarnGTFO:Show(spellName)
specWarnGTFO:Play("watchfeet")
end
end
mod.SPELL_PERIODIC_MISSED = mod.SPELL_PERIODIC_DAMAGE

function mod:UNIT_SPELLCAST_SUCCEEDED(uId, _, spellId)
if spellId == 91129 and self:AntiSpam(2, 3) then -- Squall Line (Tornados)
warnSquallLine:Show()
if not phase2Started then
if not self.vb.phase2Started then
timerSquallLineCD:Start(30)--Seems like a longer CD in phase 1? That or had some electrocute and windburst delays, need more data.
else
timerSquallLineCD:Start()
Expand All @@ -182,15 +181,19 @@ function mod:UNIT_SPELLCAST_SUCCEEDED(uId, _, spellId)
else
timerAcidRainStack:Start()
end
if not phase2Started then
phase2Started = true
warnPhase2:Show()
if not self.vb.phase2Started then
self:SetStage(2)
self.vb.phase2Started = true
warnPhase:Show()
warnPhase:Play("ptwo")
timerWindBurstCD:Cancel()
timerIceStormCD:Cancel()
self:UnregisterShortTermEvents()
end
elseif spellId == 89528 and self:AntiSpam(2, 6) then -- Relentless Storm Initial Vehicle Ride Trigger (phase 3 start trigger)
warnPhase3:Show()
self:SetStage(3)
warnPhase:Show()
warnPhase:Play("pthree")
timerLightningCloudCD:Start(15.5)
timerWindBurstCD:Start(25)
timerLightningRodCD:Start(20)
Expand Down
Loading

0 comments on commit e1008bb

Please sign in to comment.