72 lines
4.1 KiB
Lua
72 lines
4.1 KiB
Lua
-- Mephistroth (Octo BigWigs Raids/KarazhanUpper/Mephistroth.lua), Turtle Upper Karazhan, native server events.
|
|
-- Shackles of the Legion 51916 (cast: stop moving; aura: shackled), Shackle Shatter 51917 (someone moved),
|
|
-- Doom of Outland 51912/51918/51920 (marked), Shards of Hellfury 51942, Hellfury Convergence 51947 (shard channel).
|
|
local L = {
|
|
trigger_engage = "I foresaw your arrival",
|
|
msg_shacklesCast = "Shackles of the Legion incoming! >>DO NOT MOVE<<", bar_shacklesCast = "Casting Shackles",
|
|
msg_shacklesCastAlert = "Shackles Casting >>STOP MOVING<<", bar_shacklesDebuff = "Shackles of the Legion",
|
|
msg_shacklesDebuffYou = "You are shackled! >>DO NOT MOVE<<", msg_shacklesDebuffOther = "%s is shackled!",
|
|
msg_shackleShatter = " didn't keep still.", bar_shardsChannel = "Shard Enrage", bar_shardsCD = "Next Shards Cast",
|
|
msg_shardsCast = "Hellfire Shards casting, go kill shards!", bar_shacklesCd = "Next Shackles",
|
|
}
|
|
local timer = {shacklesInitialCD = {68, 96}, shacklesCD = {40, 70}, shacklesCast = 2.5, shacklesDebuff = 6, shardsCD = 120,
|
|
shardsCD_bar_delay = 25, shardsChannel = 25}
|
|
local icon = {shackles = "INV_Belt_18", shardsCD = "Spell_Fire_Fire", shardsChannel = "Spell_Fire_SoulBurn", doom = "Spell_Shadow_AuraOfDarkness"}
|
|
local DOOM = {[51912] = true, [51918] = true, [51920] = true}
|
|
local m = OctoBossMods:NewModule("Mephistroth", {npcs = {93333}, displayName = "Mephistroth", zone = "Karazhan", engageYells = {L.trigger_engage}})
|
|
function m:OnEngage()
|
|
self.doomed, self.doomMark = {}, 8
|
|
self:IntervalBar(L.bar_shacklesCd, timer.shacklesInitialCD[1], timer.shacklesInitialCD[2], icon.shackles, true, "White")
|
|
end
|
|
function m:ShacklesCast()
|
|
if not self:Throttle("shackles", 5) then return end
|
|
self:RemoveBar(L.bar_shacklesCd)
|
|
self:Message(L.msg_shacklesCast, "Important", true, "Beware")
|
|
self:WarningSign(icon.shackles, timer.shacklesCast, true, L.msg_shacklesCastAlert)
|
|
self:Bar(L.bar_shacklesCast, timer.shacklesCast, icon.shackles, true, "Red")
|
|
self:IntervalBar(L.bar_shacklesCd, timer.shacklesCD[1], timer.shacklesCD[2], icon.shackles, true, "White")
|
|
end
|
|
function m:Shackled(_, _, dstGUID, dstName)
|
|
if not dstName then return end
|
|
if dstGUID == UnitGUID("player") then
|
|
self:WarningSign(icon.shackles, timer.shacklesDebuff + 0.5, true, L.msg_shacklesDebuffYou)
|
|
self:Sound("Alarm")
|
|
self:Bar(L.bar_shacklesDebuff, timer.shacklesDebuff + 0.5, icon.shackles, true, "Red")
|
|
end
|
|
end
|
|
function m:ShackledFade(_, _, dstGUID)
|
|
if dstGUID == UnitGUID("player") then self:RemoveBar(L.bar_shacklesDebuff) self:RemoveWarningSign(icon.shackles) end
|
|
end
|
|
function m:Shatter(_, srcName)
|
|
if srcName and self:Throttle("shatter" .. srcName, 2) then self:Message(srcName .. L.msg_shackleShatter, "Important") end
|
|
end
|
|
function m:Doom(_, _, _, dstName, spellId)
|
|
if not dstName or not DOOM[spellId] or self.doomed[dstName] then return end
|
|
self.doomed[dstName] = true
|
|
self:SetRaidTargetForPlayer(dstName, self.doomMark)
|
|
self.doomMark = self.doomMark == 8 and 7 or 8
|
|
end
|
|
function m:DoomFade(_, _, _, dstName, spellId)
|
|
if not dstName or not DOOM[spellId] or not self.doomed[dstName] then return end
|
|
self.doomed[dstName] = nil
|
|
self:RestorePreviousRaidTargetForPlayer(dstName)
|
|
end
|
|
function m:Shards()
|
|
if not self:Throttle("shards", 10) then return end
|
|
self:RemoveBar(L.bar_shardsCD)
|
|
self:Message(L.msg_shardsCast, "Important")
|
|
self:DelayedBar(timer.shardsCD_bar_delay, L.bar_shardsCD, timer.shardsCD - timer.shardsCD_bar_delay, icon.shardsCD, true, "Orange")
|
|
end
|
|
function m:ShardsChannel()
|
|
if not self:Throttle("channel", 10) then return end
|
|
self:Sound("Alarm")
|
|
self:Bar(L.bar_shardsChannel, timer.shardsChannel, icon.shardsChannel, true, "Red")
|
|
end
|
|
m.events = {
|
|
SPELL_CAST_START = {[51916] = "ShacklesCast", [51942] = "Shards", [51947] = "ShardsChannel"},
|
|
SPELL_CAST_SUCCESS = {[51917] = "Shatter"},
|
|
SPELL_DAMAGE = {[51917] = "Shatter"},
|
|
SPELL_AURA_APPLIED = {[51916] = "Shackled", [51912] = "Doom", [51918] = "Doom", [51920] = "Doom"},
|
|
SPELL_AURA_REMOVED = {[51916] = "ShackledFade", [51912] = "DoomFade", [51918] = "DoomFade", [51920] = "DoomFade"},
|
|
}
|