forked from BigWigsMods/BigWigs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLordsOfDread.lua
More file actions
338 lines (300 loc) · 12.3 KB
/
Copy pathLordsOfDread.lua
File metadata and controls
338 lines (300 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Lords of Dread", 2481, 2457)
if not mod then return end
mod:RegisterEnableMob(181398, 181399) -- Mal'Ganis, Kin'tessa
mod:SetEncounterID(2543)
mod:SetRespawnTime(30)
--------------------------------------------------------------------------------
-- Locals
--
local untoDarknessCount = 1
local cloudOfCarrionCount = 1
local manifestShadowsCount = 1
local infiltrationOfDreadCount = 1
local fearfulTrepidationCount = 1
local slumberCloudCount = 1
local tankList = {}
local fearTimers = {27.2, 53.5, 29.0, 12.0, 29.2, 49.9, 29.1, 22.1, 58.5, 29.2, 12.8, 29.1, 49.8, 29.2, 23.7} -- 4, 8, 11, 15 are timers from Among Us _End
--------------------------------------------------------------------------------
-- Localization
--
local L = mod:GetLocale()
if L then
L.unto_darkness = "AoE Phase"-- Unto Darkness
L.cloud_of_carrion = "Carrion" -- Cloud of Carrion
L.manifest_shadows = "Adds" -- Manifest Shadows
L.leeching_claws = "Frontal (M)" -- Leeching Claws
L.infiltration_of_dread = "Among Us" -- Infiltration of Dread
L.fearful_trepidation = "Fears" -- Fearful Trepidation
L.slumber_cloud = "Clouds" -- Slumber Cloud
L.anguishing_strike = "Frontal (K)" -- Anguishing Strike
end
--------------------------------------------------------------------------------
-- Initialization
--
-- MARK 183138 XXX
local fearfulTrepidationMarker = mod:AddMarkerOption(false, "player", 8, 361745, 1, 2) -- Fearful Trepidation
function mod:GetOptions()
return {
360374, -- Rampaging Swarm
"berserk",
-- Mal'Ganis
360319, -- Unto Darkness
360012, -- Cloud of Carrion
361913, -- Manifest Shadows
--361923, -- Ravenous Hunger
361934, -- Incomplete Form
{359960, "TANK"}, -- Leeching Claws
359963, -- Opened Veins
-- Kin'tessa
360717, -- Infiltration of Dread
{360146, "SAY", "SAY_COUNTDOWN"}, -- Fearful Trepidation
fearfulTrepidationMarker,
360229, -- Slumber Cloud
{360284, "TANK"}, -- Anguishing Strike
},{
[360374] = "general",
[360319] = -23927, -- Mal'Ganis
[360417] = -23929, -- Kin'tessa
},{
[360319] = L.unto_darkness, -- Unto Darkness
[366574] = L.cloud_of_carrion, -- Cloud of Carrion
[361913] = L.manifest_shadows, -- Manifest Shadows
[359960] = L.leeching_claws, -- Leeching Claws
[360417] = L.infiltration_of_dread, -- Infiltration of Dread
[360146] = L.fearful_trepidation, -- Fearful Trepidation
[360229] = L.slumber_cloud, -- Slumber Cloud
[360284] = L.anguishing_strike, -- Anguishing Strike
}
end
function mod:OnBossEnable()
-- Mal'Ganis
self:Log("SPELL_CAST_START", "SwarmOfDecay", 360300)
self:Log("SPELL_CAST_START", "CloudOfCarrion", 360006)
self:Log("SPELL_AURA_APPLIED", "CloudOfCarrionApplied", 360012)
self:Log("SPELL_AURA_REMOVED", "CloudOfCarrionRemoved", 360012)
self:Log("SPELL_CAST_START", "ManifestShadows", 361913)
--self:Log("SPELL_CAST_START", "RavenousHunger", 361923)
self:Log("SPELL_AURA_REMOVED", "IncompleteFormRemoved", 361934)
self:Log("SPELL_CAST_START", "LeechingClaws", 359960)
self:Log("SPELL_AURA_APPLIED", "OpenedVeinsApplied", 359963)
self:Log("SPELL_CAST_SUCCESS", "RampagingSwarm", 360374)
-- Kin'tessa
self:Log("SPELL_CAST_SUCCESS", "InfiltrationOfDread", 360717)
self:Log("SPELL_AURA_REMOVED", "InfiltrationOfDreadOver", 360418) -- Paranoia
self:Log("SPELL_CAST_SUCCESS", "FearfulTrepidation", 360145)
self:Log("SPELL_AURA_APPLIED", "FearfulTrepidationApplied", 360146)
self:Log("SPELL_AURA_REMOVED", "FearfulTrepidationRemoved", 360146)
self:Log("SPELL_CAST_START", "SlumberCloud", 360229)
self:Log("SPELL_CAST_START", "AnguishingStrike", 360284)
self:Log("SPELL_AURA_APPLIED", "AnguishingStrikeApplied", 360287)
self:Log("SPELL_AURA_APPLIED_DOSE", "AnguishingStrikeApplied", 360287)
self:RegisterEvent("GROUP_ROSTER_UPDATE")
self:GROUP_ROSTER_UPDATE()
end
function mod:OnEngage()
untoDarknessCount = 1
cloudOfCarrionCount = 1
manifestShadowsCount = 1
infiltrationOfDreadCount = 1
fearfulTrepidationCount = 1
slumberCloudCount = 1
self:Bar(360012, 6, CL.count:format(L.cloud_of_carrion, cloudOfCarrionCount)) -- Cloud of Carrion
self:Bar(361913, 12, CL.count:format(L.manifest_shadows, manifestShadowsCount)) -- Manifest Shadows
self:Bar(359960, 15.5, L.leeching_claws) -- Leeching Claws
self:Bar(360319, 51, CL.count:format(L.unto_darkness, untoDarknessCount)) -- Unto Darkness
self:Bar(360284, 8.5, L.anguishing_strike) -- Anguishing Strike
self:Bar(360229, 12, CL.count:format(L.slumber_cloud, slumberCloudCount)) -- Slumber Cloud
self:Bar(360146, 25.1, CL.count:format(L.fearful_trepidation, fearfulTrepidationCount)) -- Fearful Trepidation
self:Bar(360717, 124, CL.count:format(L.infiltration_of_dread, infiltrationOfDreadCount)) -- Infiltration of Dread
self:Berserk(600)
end
--------------------------------------------------------------------------------
-- Event Handlers
--
function mod:GROUP_ROSTER_UPDATE() -- Compensate for quitters (LFR)
tankList = {}
for unit in self:IterateGroup() do
if self:Tank(unit) then
tankList[#tankList+1] = unit
end
end
end
function mod:RampagingSwarm(args)
self:Message(args.spellId, "red")
self:PlaySound(args.spellId, "long")
end
-- Mal'Ganis
function mod:SwarmOfDecay()
self:StopBar(CL.count:format(L.unto_darkness, untoDarknessCount))
self:Message(360319, "yellow", CL.count:format(L.unto_darkness, untoDarknessCount))
self:PlaySound(360319, "alert")
untoDarknessCount = untoDarknessCount + 1
end
do
local playerList = {}
local prev = 0
function mod:CloudOfCarrion(args)
self:StopBar(CL.count:format(L.cloud_of_carrion, cloudOfCarrionCount))
playerList = {}
prev = args.time
cloudOfCarrionCount = cloudOfCarrionCount + 1
if cloudOfCarrionCount % 4 ~= 1 then -- Skip 5, 9, 13...
self:Bar(360012, cloudOfCarrionCount % 2 == 1 and 51.5 or 21.8, CL.count:format(L.cloud_of_carrion, cloudOfCarrionCount))
end
end
function mod:CloudOfCarrionApplied(args)
if args.time-prev < 3 then
playerList[#playerList+1] = args.destName
if self:Me(args.destGUID) then
self:PlaySound(args.spellId, "warning")
end
self:NewTargetsMessage(args.spellId, "cyan", playerList, nil, CL.count:format(L.cloud_of_carrion, cloudOfCarrionCount-1))
else -- Personal warnings only
if self:Me(args.destGUID) then
self:PersonalMessage(args.spellId)
self:PlaySound(args.spellId, "warning")
end
end
end
function mod:CloudOfCarrionRemoved(args)
if self:Me(args.destGUID) then
self:Message(args.spellId, "green", CL.removed:format(args.spellName))
self:PlaySound(args.spellId, "info")
end
end
end
function mod:ManifestShadows(args)
self:StopBar(CL.count:format(L.manifest_shadows, manifestShadowsCount))
self:Message(args.spellId, "yellow", CL.count:format(L.manifest_shadows, manifestShadowsCount))
self:PlaySound(args.spellId, "alert")
manifestShadowsCount = manifestShadowsCount + 1
if manifestShadowsCount % 2 == 0 then -- Only start a bar for even casts
self:Bar(args.spellId, 72.5, CL.count:format(L.manifest_shadows, manifestShadowsCount))
end
end
-- function mod:RavenousHunger(args)
-- local canDo, ready = self:Interrupter(args.sourceGUID)
-- if canDo then
-- self:Message(args.spellId, "yellow")
-- if ready then
-- self:PlaySound(args.spellId, "alert")
-- end
-- end
-- end
function mod:IncompleteFormRemoved(args)
self:Message(args.spellId, "cyan", CL.removed:format(args.spellName))
self:PlaySound(args.spellId, "info")
end
function mod:LeechingClaws(args)
local bossUnit = self:GetBossId(args.sourceGUID)
for i = 1, #tankList do
local unit = tankList[i]
if bossUnit and self:Tanking(bossUnit, unit) then
self:TargetMessage(args.spellId, "yellow", self:UnitName(unit), CL.casting:format(L.leeching_claws))
break
elseif i == #tankList then
self:Message(args.spellId, "yellow", CL.casting:format(L.leeching_claws))
end
end
self:PlaySound(args.spellId, "alarm")
-- XXX Fix timers around specials
self:CDBar(args.spellId, 17, L.leeching_claws)
end
function mod:OpenedVeinsApplied(args)
if self:Tank() and self:Tank(args.destName) then
self:TargetMessage(args.spellId, "purple", args.destName)
self:PlaySound(args.spellId, "warning") -- You should swap, prolly.
elseif self:Me(args.destGUID) then -- Not a tank
self:PersonalMessage(args.spellId)
self:PlaySound(args.spellId, "warning")
end
end
-- Kin'tessa
function mod:InfiltrationOfDread(args)
if self:MobId(args.sourceGUID) == 181399 then -- Kin'tessa
self:StopBar(CL.count:format(L.infiltration_of_dread, infiltrationOfDreadCount))
self:Message(args.spellId, "yellow", CL.count:format(L.infiltration_of_dread, infiltrationOfDreadCount))
self:PlaySound(args.spellId, "alert")
infiltrationOfDreadCount = infiltrationOfDreadCount + 1
end
end
do
local prev = 0
function mod:InfiltrationOfDreadOver(args)
if args.time - 10 > prev then
prev = args.time
self:Message(360717, "green", CL.over:format(CL.count:format(L.infiltration_of_dread, infiltrationOfDreadCount-1)))
self:PlaySound(360717, "long")
self:CDBar(359960, 5, L.leeching_claws) -- Leeching Claws
self:CDBar(360012, 7.5, CL.count:format(L.cloud_of_carrion, cloudOfCarrionCount)) -- Cloud of Carrion
self:CDBar(361913, 10, CL.count:format(L.manifest_shadows, manifestShadowsCount)) -- Manifest Shadows
self:CDBar(360319, 51, CL.count:format(L.unto_darkness, untoDarknessCount)) -- Unto Darkness
self:Bar(360229, 5, CL.count:format(L.slumber_cloud, slumberCloudCount)) -- Slumber Cloud
self:Bar(360284, 8, L.anguishing_strike) -- Anguishing Strike
self:Bar(360146, fearTimers[fearfulTrepidationCount], CL.count:format(L.fearful_trepidation, fearfulTrepidationCount)) -- Fearful Trepidation
self:Bar(360717, 124, CL.count:format(L.infiltration_of_dread, infiltrationOfDreadCount)) -- Infiltration of Dread
end
end
end
do
local playerList = {}
local prev = 0
function mod:FearfulTrepidation(args)
playerList = {}
self:StopBar(CL.count:format(L.fearful_trepidation, fearfulTrepidationCount))
self:Message(360146, "yellow", CL.count:format(L.fearful_trepidation, fearfulTrepidationCount))
self:PlaySound(360146, "alert")
fearfulTrepidationCount = fearfulTrepidationCount + 1
if fearfulTrepidationCount ~= 4 and fearfulTrepidationCount ~= 8 and fearfulTrepidationCount ~= 11 and fearfulTrepidationCount ~= 15 then
self:Bar(360146, fearfulTrepidationCount % 2 == 0 and 50 or 30, CL.count:format(L.fearful_trepidation, fearfulTrepidationCount))
end
end
function mod:FearfulTrepidationApplied(args)
local count = #playerList+1
local icon = count
playerList[count] = args.destName
playerList[args.destName] = count -- Set raid marker
if self:Me(args.destGUID)then
self:Say(args.spellId, CL.count_rticon:format(L.fearful_trepidation, icon, icon))
self:SayCountdown(args.spellId, 8, icon)
end
self:NewTargetsMessage(args.spellId, "orange", playerList, nil, CL.count:format(L.fearful_trepidation, fearfulTrepidationCount-1))
self:CustomIcon(fearfulTrepidationMarker, args.destName, icon)
end
function mod:FearfulTrepidationRemoved(args)
if self:Me(args.destGUID) then
self:CancelSayCountdown(args.spellId)
end
self:CustomIcon(fearfulTrepidationMarker, args.destName)
end
end
function mod:SlumberCloud(args)
self:StopBar(CL.count:format(L.slumber_cloud, slumberCloudCount))
self:Message(args.spellId, "yellow", CL.count:format(L.slumber_cloud, slumberCloudCount))
self:PlaySound(args.spellId, "alert")
slumberCloudCount = slumberCloudCount + 1
if slumberCloudCount % 2 == 0 then -- Only start a bar for even casts
local cd = slumberCloudCount == 2 and 69.3 or slumberCloudCount == 4 and 73 or slumberCloudCount == 6 and 75 or slumberCloudCount == 8 and 73
self:Bar(args.spellId, 72, CL.count:format(L.slumber_cloud, slumberCloudCount))
end
end
function mod:AnguishingStrike(args)
local bossUnit = self:GetBossId(args.sourceGUID)
self:Message(args.spellId, "purple", CL.casting:format(L.anguishing_strike))
if self:Tanking(bossUnit) then
self:PlaySound(args.spellId, "alert")
end
-- Stop around specials?
self:Bar(args.spellId, 9.7, L.anguishing_strike)
end
function mod:AnguishingStrikeApplied(args)
local bossUnit = self:GetBossId(args.sourceGUID)
local amount = args.amount or 1
self:NewStackMessage(360284, "purple", args.destName, amount, 3)
if amount > 2 and not self:Tanking(bossUnit) then -- Maybe swap?
self:PlaySound(360284, "alarm")
end
end