Skip to content

Commit

Permalink
Cleanup the Emerald Nightmare modules
Browse files Browse the repository at this point in the history
  • Loading branch information
elvador committed Sep 20, 2016
1 parent e40cf2b commit 1a2f985
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 85 deletions.
60 changes: 10 additions & 50 deletions Nightmare/Cenarius.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@

--------------------------------------------------------------------------------
-- TODO List:
-- - Tuning sounds / message colors
-- - Remove alpha engaged message
-- - Fix WaveSpawn and untested funcs if needed
-- WaveSpawn got broken, figure out a new way to do this
-- - Fix untested funcs if needed
-- - WaveSpawn got broken, figure out a new way to do this
-- Wave 1: Wisp, Drake, Treant
-- Wave 2: Wisp, Drake, Sister
-- Wave 3: 2x Sister, Treant
-- Wave 4: 2x Drake, Wisp
-- Wave 5: 2x Treant, Sister
-- Wave 6: 2x Wisp, Sister
-- - NightmareBrambles: can targetscan for initial target - lets hope that there
-- is a debuff on live

--------------------------------------------------------------------------------
-- Module Declaration
Expand Down Expand Up @@ -101,11 +107,6 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "SpearOfNightmares", 214529)
self:Log("SPELL_AURA_APPLIED_DOSE", "SpearOfNightmares", 214529)

self:Log("SPELL_AURA_APPLIED", "WaveSpawn", 212178) -- Wisps
self:Log("SPELL_AURA_APPLIED", "WaveSpawn", 210861) -- Treat
self:Log("SPELL_AURA_APPLIED", "WaveSpawn", 212231) -- Drake
self:Log("SPELL_AURA_APPLIED", "WaveSpawn", 212241) -- Sister

--[[ Malfurion Stormrage ]]--
self:Log("SPELL_AURA_APPLIED", "CleansedGround", 212681)
self:Log("SPELL_AURA_REMOVED", "CleansedGroundRemoved", 212681)
Expand Down Expand Up @@ -253,47 +254,6 @@ function mod:SpearOfNightmares(args)
self:Bar(args.spellId, 15.7)
end

do
local adds = {
[212178] = mod:SpellName(-13348), -- Corrupted Wisp
[210861] = mod:SpellName(-13350), -- Nightmare Treant
[212231] = mod:SpellName(-13354), -- Rotten Drake
[212241] = mod:SpellName(-13357), -- Twisted Sister
}
local spawnString, spawnCount = "", 0
local fallbackTimer = nil

-- XXX TODO this is for mythic testing because i don't know how many adds will
-- spawn at the same time. it's 3 each wave for heroic
-- ideally WaveSpawn() will get called 3 times and fallbackFunc() will announce
-- the wave 0.3 sec after the last call
local function fallbackFunc()
if fallbackTimer then
mod:CancelTimer(fallbackTimer)
end
mod:Message(212726, "Neutral", "Info", spawnString)
spawnCount = 0
spawnString = ""
end

function mod:WaveSpawn(args)
if fallbackTimer then
self:CancelTimer(fallbackTimer)
end

spawnCount = spawnCount + 1
spawnString = spawnString .. (spawnCount == 1 and ("Wave %d: "):format(forcesOfNightmareCount - 1) or ", ") .. adds[args.spellId]

if self:Heroic() and spawnCount == 3 then
self:Message(212726, "Neutral", "Info", spawnString)
spawnCount = 0
spawnString = ""
else
fallbackTimer = self:ScheduleTimer(fallbackFunc, 0.1)
end
end
end

--[[ Malfurion Stormrage ]]--
do
local cleansedGroundCheck, name = nil, mod:SpellName(212681)
Expand Down
6 changes: 2 additions & 4 deletions Nightmare/EleretheRenferal.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

--------------------------------------------------------------------------------
-- TODO List:
-- - Tuning sounds / message colors
-- - Remove beta engaged message
-- - All the timers
-- - Mythic abilitys
-- - 212993 Shimmering Feather is not in the combat log (yet)?
Expand Down Expand Up @@ -167,7 +165,7 @@ do
function mod:NecroticVenomApplied(args)
list[#list+1] = args.destName
if #list == 1 then
self:ScheduleTimer("TargetMessage", 0.5, args.spellId, list, "Urgent", "Alert")
self:ScheduleTimer("TargetMessage", 0.5, args.spellId, list, "Urgent", "Warning")

if timeToTransform() > 26 then -- skips the one before the transformation
self:Bar(args.spellId, 22)
Expand All @@ -188,7 +186,7 @@ do
end

function mod:GatheringCloudsStart(args)
self:Message(args.spellId, "Attention", "Alarm", CL.casting:format(args.spellName))
self:Message(args.spellId, "Attention", "Long", CL.casting:format(args.spellName))
self:Bar(args.spellId, 10.5, CL.cast:format(args.spellName)) -- 2.5s cast + 8s duration = 10.5s total
end

Expand Down
5 changes: 1 addition & 4 deletions Nightmare/Ilgynoth.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@

--------------------------------------------------------------------------------
-- TODO List:
-- - Tuning sounds / message colors
-- - Remove alpha engaged message
-- - p1 proximity range: 5
-- - p1 proximity range: 5?
-- - TouchOfCorruption doesnt stack on normal. Do we need warnings for that?
-- - Add mouseover / nameplate marking for Deathglare Tentacle

--------------------------------------------------------------------------------
-- Module Declaration
Expand Down
11 changes: 5 additions & 6 deletions Nightmare/Nythendra.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

--------------------------------------------------------------------------------
-- TODO List:
-- - Tuning sounds / message colors
-- - Remove beta engaged message
-- - The timers really suck on this fight > only normal testing data (2016-08-11)
-- - Get timers for all difficulties on live
-- - Check if SPELL_CAST_START InfestedBreath (202977) is on live

--------------------------------------------------------------------------------
-- Module Declaration
Expand Down Expand Up @@ -120,7 +119,7 @@ do

playerList[#playerList+1] = args.destName
if #playerList == 1 then
self:ScheduleTimer("TargetMessage", 0.1, args.spellId, playerList, "Important", "Alert")
self:ScheduleTimer("TargetMessage", 0.1, args.spellId, playerList, "Important", "Warning")
rotCount = rotCount + 1

if mod:BarTimeLeft(mod:SpellName(203552)) > 15.9 then -- Heart of the Swarm
Expand Down Expand Up @@ -161,7 +160,7 @@ function mod:VolatileRot(args)
end

function mod:HeartOfTheSwarm(args)
self:Message(args.spellId, "Attention", "Long", CL.casting:format(args.spellName))
self:Message(args.spellId, "Attention", "Info", CL.casting:format(args.spellName))
self:Bar(args.spellId, 23.7, CL.cast:format(args.spellName)) -- 3.7s cast time + 20s channel
-- This is basically a phase, so start timers for next "normal" phase here
self:CDBar(args.spellId, 120)
Expand Down Expand Up @@ -200,6 +199,6 @@ end

function mod:SpreadInfestation(args)
if not self:Me(args.sourceGUID) and mindControlledPlayers < 4 then -- TODO hardcoded anti spam check (for wipes): only warn if max 3 players are mind controlled
self:Message(args.spellId, "Attention", "Alert", CL.other:format(mod:ColorName(args.sourceName), CL.casting:format(args.spellName))) -- Player: Casting Spread Infestation!
self:Message(args.spellId, "Attention", "Long", CL.other:format(mod:ColorName(args.sourceName), CL.casting:format(args.spellName))) -- Player: Casting Spread Infestation!
end
end
6 changes: 2 additions & 4 deletions Nightmare/Ursoc.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

--------------------------------------------------------------------------------
-- TODO List:
-- - Tuning sounds / message colors
-- - Remove beta engaged message

--------------------------------------------------------------------------------
-- Module Declaration
Expand Down Expand Up @@ -104,7 +102,7 @@ end

function mod:Overwhelm(args)
local amount = args.amount or 1
self:StackMessage(args.spellId, args.destName, amount, "Important", amount > 1 and "Warning")
self:StackMessage(args.spellId, args.destName, amount, "Important", amount > 1 and "Alert")
self:Bar(args.spellId, self:LFR() and 20 or 10)
end

Expand Down Expand Up @@ -176,5 +174,5 @@ function mod:UNIT_HEALTH_FREQUENT(unit)
end

function mod:BloodFrenzy(args)
self:Message(args.spellId, "Important", "Alarm")
self:Message(args.spellId, "Urgent", "Long")
end
45 changes: 28 additions & 17 deletions Nightmare/Xavius.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

--------------------------------------------------------------------------------
-- TODO List:
-- - Tuning sounds / message colors
-- - Remove alpha engaged message
-- - Phase 3
-- - Fix all the timers!

--------------------------------------------------------------------------------
-- Module Declaration
Expand Down Expand Up @@ -62,16 +60,18 @@ function mod:GetOptions()
205588, -- Call of Nightmares

--[[ Stage Three: World of Darkness ]]--
226194, -- Writhing Deep
},{
["berserk"] = "general",
[206651] = -12971, -- Stage One: The Decent Into Madness
[209034] = -13152, -- Stage Two: From the Shadows
--[0] = -13160, -- Stage Three: World of Darkness
[226194] = -13160, -- Stage Three: World of Darkness
}
end

function mod:OnBossEnable()
--[[ General ]]--
self:RegisterUnitEvent("UNIT_SPELLCAST_START", nil, "boss1")
self:Log("SPELL_AURA_APPLIED", "DecentIntoMadness", 208431)
self:Log("SPELL_AURA_APPLIED", "Madness", 207409)
self:Log("SPELL_AURA_APPLIED", "DreamSimulacrum", 206005)
Expand All @@ -96,6 +96,7 @@ function mod:OnBossEnable()
self:Log("SPELL_CAST_START", "CallOfNightmares", 205588)

--[[ Stage Three: World of Darkness ]]--
self:Log("SPELL_CAST_SUCCESS", "WrithingDeep", 226194)
end

function mod:OnEngage()
Expand All @@ -111,12 +112,29 @@ end
--

--[[ General ]]--
function mod:UNIT_SPELLCAST_START(unit, spellName, _, _, spellId)
if spellId == 226193 then -- Xavius Energize Phase 2
phase = 2
self:Message("stages", "Neutral", "Long", CL.stage:format(2), false)
self:StopBar(206651) -- Darkening Soul
self:StopBar(211802) -- Nightmare Blades
self:StopBar(210264) -- Manifest Corruption
self:Bar(209034, 7.5) -- Bonds of Terror
self:Bar(209443, 29) -- Nightmare Infusion
self:Bar(205588, 55) -- Call of Nightmares
elseif spellId == 226185 then -- Xavius Energize Phase 3
self:Message("stages", "Neutral", "Long", CL.stage:format(3), false)
phase = 3

end
end

function mod:DecentIntoMadness(args)
self:TargetMessage(args.spellId, args.destName, "Urgent", "Alarm")
self:TargetMessage(args.spellId, args.destName, "Important", "Alarm")
end

function mod:Madness(args)
self:TargetMessage(args.spellId, args.destName, "Urgent", "Alarm", nil, nil, true)
self:TargetMessage(args.spellId, args.destName, "Important", "Alarm", nil, nil, true)
end

function mod:DreamSimulacrum(args)
Expand Down Expand Up @@ -219,17 +237,6 @@ do
end

function mod:BlackeningSoul(args)
if phase == 1 then -- yep, there is no phase transition spell. have to do it here
phase = 2
self:Message("stages", "Neutral", "Long", CL.stage:format(2), false)
self:StopBar(206651) -- Darkening Soul
self:StopBar(211802) -- Nightmare Blades
self:StopBar(210264) -- Manifest Corruption
self:Bar(209034, 7.5) -- Bonds of Terror
self:Bar(209443, 29) -- Nightmare Infusion
self:Bar(205588, 55) -- Call of Nightmares
end

local amount = args.amount or 1
self:StackMessage(args.spellId, args.destName, amount, "Urgent", amount > 2 and "Warning")
self:Bar(args.spellId, 10)
Expand All @@ -246,3 +253,7 @@ function mod:CallOfNightmares(args)
end

--[[ Stage Three: World of Darkness ]]--
function mod:WrithingDeep(args)
self:Message(args.spellId, "Urgent", "Alert")
self:CDBar(args.spellId, 21)
end

0 comments on commit 1a2f985

Please sign in to comment.