47 lines
2.5 KiB
Lua
47 lines
2.5 KiB
Lua
-- Kruul (Octo BigWigs Raids/KarazhanUpper/Kruul.lua), Turtle Upper Karazhan, native server events.
|
|
-- Mark of the Highlord 51166 (curse: get out), Remorseless Strikes 51164, Wrath of the Highlord 51173 (enrage).
|
|
local L = {
|
|
trigger_engage = "Stepping before the High Lord of the Burning Legion",
|
|
msg_markYou = "Mark of the Highlord on YOU - GET OUT!", msg_markOther = "Mark of the Highlord on %s!",
|
|
msg_wrath = "Kruul is ENRAGED - Good luck!", bar_markExpires = "Mark on YOU! GET OUT!",
|
|
bar_nextCurses = "Next Curses", bar_nextStrikes = "Next Remorseless Strikes",
|
|
}
|
|
local icon = {mark = "Spell_Shadow_AntiShadow", strikes = "Spell_Shadow_RaiseDead"}
|
|
local MARKS = {1, 2, 3, 4, 5, 6}
|
|
local m = OctoBossMods:NewModule("Kruul", {npcs = {59991}, displayName = "Kruul", zone = "Karazhan", engageYells = {L.trigger_engage}})
|
|
function m:OnEngage()
|
|
self.enraged, self.marked, self.nextMark = false, {}, 1
|
|
self:Bar(L.bar_nextCurses, 30, icon.mark, true, "Black")
|
|
self:Bar(L.bar_nextStrikes, 2, icon.strikes, true, "Red")
|
|
end
|
|
function m:Strikes() if self:Throttle("strikes", 1) then self:Bar(L.bar_nextStrikes, 4, icon.strikes, true, "Red") end end
|
|
function m:Wrath(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= 59991 or self.enraged then return end
|
|
self.enraged = true
|
|
self:Message(L.msg_wrath, "Important", true, "Alarm")
|
|
end
|
|
function m:Mark(_, _, dstGUID, dstName)
|
|
if not dstName then return end
|
|
if self:Throttle("curses", 5) then self:Bar(L.bar_nextCurses, self.enraged and 15 or 30, icon.mark, true, "Black") end
|
|
if dstGUID == UnitGUID("player") then
|
|
self:Message(L.msg_markYou, "Important", true, "Beware")
|
|
self:WarningSign(icon.mark, 5, true, "GET OUT")
|
|
self:Bar(L.bar_markExpires, 20, icon.mark, true, "Red")
|
|
else
|
|
self:Message(format(L.msg_markOther, dstName), "Important", false, "Alert")
|
|
end
|
|
self.marked[dstName] = true
|
|
self:SetRaidTargetForPlayer(dstName, MARKS[self.nextMark])
|
|
self.nextMark = self.nextMark % #MARKS + 1
|
|
end
|
|
function m:MarkFade(_, _, dstGUID, dstName)
|
|
if not dstName then return end
|
|
if dstGUID == UnitGUID("player") then self:RemoveBar(L.bar_markExpires) self:RemoveWarningSign(icon.mark) end
|
|
if self.marked[dstName] then self.marked[dstName] = nil self:RestorePreviousRaidTargetForPlayer(dstName) end
|
|
end
|
|
m.events = {
|
|
SPELL_CAST_SUCCESS = {[51164] = "Strikes"}, SPELL_DAMAGE = {[51164] = "Strikes"},
|
|
SPELL_AURA_APPLIED = {[51173] = "Wrath", [51166] = "Mark"},
|
|
SPELL_AURA_REMOVED = {[51166] = "MarkFade"},
|
|
}
|