136 lines
8.2 KiB
Lua
136 lines
8.2 KiB
Lua
-- High Priest Thekal (Octo BigWigs Raids/ZG/Thekal.lua), native server events.
|
|
-- boss_thekal.cpp: phase 1 Thekal 14509 with Zealot Zath 11348 and Zealot Lor'Khan 11347: Great Heal 24208,
|
|
-- Silence 22666, Disarm 22691, Blind 21060, Gouge 24698, Mortal Cleave 22859, Bloodlust 24185; the three fake-die and
|
|
-- rise together ("is resurrected by a nearby ally!") unless all are down within 10 s. Phase 2 starts on the yell:
|
|
-- Force Punch 24189, Charge 24408, Frenzy 24185, Enrage 8269, Summon Tigers 24183 (Zulian Tiger 11361 / Guardian 15068).
|
|
-- Octo's health bars are replaced by the resurrect timer; the kill is the final yell (he fake-dies once).
|
|
local THEKAL, ZATH, LORKHAN, TIGER, GUARDIAN = 14509, 11348, 11347, 11361, 15068
|
|
local L = {
|
|
msg_heal = "Zealot Lor'Khan is Healing - Interrupt!", bar_heal = "Casting Heal",
|
|
bar_silence = " Silenced", msg_silence = " Silenced - Dispel!", bar_disarm = " Disarmed", bar_blind = " Blinded",
|
|
bar_gouge = " Gouged", bar_mortalCleave = " Mortal Cleave", bar_bloodlust = " Bloodlust", msg_bloodlust = " Bloodlust - Dispel!",
|
|
bar_rezTimer = "Resurrect", trigger_resurrection = "is resurrected by a nearby ally!",
|
|
trigger_phase2 = "Shirvallah, fill me with your RAGE!", bar_phase2 = "Tiger Phase", msg_phase2 = "Phase 2 - Tiger Phase",
|
|
bar_forcePunch = "Force Punch CD", bar_charge = "Charge CD", msg_frenzy = "Frenzy - Tranq!", bar_frenzy = "Frenzy",
|
|
msg_enrage = "High Priest Thekal is Enraged!", bar_tigersCd = "Tigers Spawn CD", msg_tigers = "Tiger adds Spawned!",
|
|
msg_addDead = "/2 Tiger Adds Dead", trigger_bossDead = "Hakkar binds me no more! Peace at last!",
|
|
}
|
|
local timer = {heal = 4, silence = 6, disarm = 6, blind = 10, gouge = 4, mortalCleave = 5, bloodlust = 30, rezTimer = 10,
|
|
phase2 = 15, forcePunchFirst = 5, forcePunch = {12, 18}, charge = {12, 18}, frenzy = 10, addsFirst = 25, adds = 20}
|
|
local icon = {heal = "Spell_Holy_Heal", silence = "Spell_Holy_Silence", disarm = "Ability_Warrior_Disarm", blind = "spell_shadow_mindsteal",
|
|
gouge = "ability_gouge", mortalCleave = "Ability_Warrior_SavageBlow", bloodlust = "Spell_Nature_BloodLust", rezTimer = "Spell_Holy_Resurrection",
|
|
phase = "Ability_Druid_TigersFury", forcePunch = "INV_Gauntlets_31", charge = "Ability_Warrior_Charge", frenzy = "Ability_Druid_ChallangingRoar",
|
|
enrage = "Spell_Shadow_UnholyFrenzy", adds = "Ability_Hunter_Pet_Cat"}
|
|
local TRIO = {[THEKAL] = "High Priest Thekal", [ZATH] = "Zealot Zath", [LORKHAN] = "Zealot Lor'Khan"}
|
|
local m = OctoBossMods:NewModule("High Priest Thekal", {npcs = {THEKAL, ZATH, LORKHAN, 14599, TIGER, GUARDIAN},
|
|
displayName = "High Priest Thekal", zone = "Zul'Gurub", manualKill = true})
|
|
local function class() local _, c = UnitClass("player") return c end
|
|
local function dispeller() local c = class() return c == "PRIEST" or c == "PALADIN" end
|
|
|
|
function m:OnEngage() self.phase, self.down, self.adds = 1, {}, 0 end
|
|
local function ccBar(self, dstName, suffix, seconds, ic, col) if dstName then self:Bar(dstName .. suffix, seconds, ic, true, col) end end
|
|
function m:Heal(srcGUID)
|
|
if OctoBossMods.NpcId(srcGUID) ~= LORKHAN then return end
|
|
self:Bar(L.bar_heal, timer.heal, icon.heal, true, "Green")
|
|
self:Message(L.msg_heal, "Important", false, "Alarm")
|
|
end
|
|
function m:HealOver() self:RemoveBar(L.bar_heal) end
|
|
function m:Silence(_, _, dstGUID, dstName)
|
|
if not dstName or OctoBossMods.NpcId(dstGUID) then return end
|
|
ccBar(self, dstName, L.bar_silence, timer.silence, icon.silence, "Blue")
|
|
if dispeller() then self:Message(dstName .. L.msg_silence, "Attention") end
|
|
end
|
|
function m:Disarm(_, _, _, dstName) ccBar(self, dstName, L.bar_disarm, timer.disarm, icon.disarm, "Yellow") end
|
|
function m:Blind(_, _, _, dstName) ccBar(self, dstName, L.bar_blind, timer.blind, icon.blind, "Black") end
|
|
function m:Gouge(_, _, _, dstName) ccBar(self, dstName, L.bar_gouge, timer.gouge, icon.gouge, "Red") end
|
|
function m:MortalCleave(_, _, _, dstName) ccBar(self, dstName, L.bar_mortalCleave, timer.mortalCleave, icon.mortalCleave, "Orange") end
|
|
function m:CcFade(_, _, _, dstName, spellId)
|
|
if not dstName then return end
|
|
local suffix = ({[22666] = L.bar_silence, [22691] = L.bar_disarm, [21060] = L.bar_blind, [24698] = L.bar_gouge, [22859] = L.bar_mortalCleave})[spellId]
|
|
if suffix then self:RemoveBar(dstName .. suffix) end
|
|
end
|
|
-- 24185 is Bloodlust on the zealots in phase 1 and Thekal's Frenzy in phase 2.
|
|
function m:Lust(_, _, dstGUID, dstName)
|
|
local id = OctoBossMods.NpcId(dstGUID)
|
|
if self.phase == 2 and (id == THEKAL or id == 14599) then
|
|
self:Bar(L.bar_frenzy, timer.frenzy, icon.frenzy, true, "Red")
|
|
if class() == "HUNTER" then
|
|
self:Message(L.msg_frenzy, "Personal", false, "Info")
|
|
self:WarningSign(icon.frenzy, 1)
|
|
end
|
|
elseif TRIO[id or 0] then
|
|
self:Bar(TRIO[id] .. L.bar_bloodlust, timer.bloodlust, icon.bloodlust, true, "Cyan")
|
|
local c = class()
|
|
if c == "PRIEST" or c == "SHAMAN" then self:Message(TRIO[id] .. L.msg_bloodlust, "Attention") end
|
|
end
|
|
end
|
|
function m:LustFade(_, _, dstGUID)
|
|
local id = OctoBossMods.NpcId(dstGUID)
|
|
if self.phase == 2 then self:RemoveBar(L.bar_frenzy) self:RemoveWarningSign(icon.frenzy)
|
|
elseif TRIO[id or 0] then self:RemoveBar(TRIO[id] .. L.bar_bloodlust) end
|
|
end
|
|
function m:OnCombatLog(sub, _, _, dstGUID)
|
|
if sub ~= "UNIT_DIED" then return end
|
|
local id = OctoBossMods.NpcId(dstGUID)
|
|
if self.phase == 1 and TRIO[id or 0] then
|
|
if not next(self.down) then self:Bar(L.bar_rezTimer, timer.rezTimer, icon.rezTimer, true, "White") end
|
|
self.down[id] = true
|
|
self:RemoveBar(TRIO[id] .. L.bar_bloodlust)
|
|
if id == LORKHAN then self:RemoveBar(L.bar_heal) end
|
|
if self.down[THEKAL] and self.down[ZATH] and self.down[LORKHAN] then
|
|
self:RemoveBar(L.bar_rezTimer)
|
|
self.phase = 1.5
|
|
self:Bar(L.bar_phase2, timer.phase2, icon.phase, true, "White")
|
|
self:Message(L.msg_phase2, "Attention")
|
|
end
|
|
elseif self.phase == 2 and (id == TIGER or id == GUARDIAN) then
|
|
self.adds = (self.adds or 0) + 1
|
|
if self.adds <= 2 then self:Message(self.adds .. L.msg_addDead, "Positive") end
|
|
end
|
|
end
|
|
function m:Resurrected()
|
|
if self.phase ~= 1 then return end
|
|
self.down = {}
|
|
self:RemoveBar(L.bar_rezTimer)
|
|
end
|
|
function m:Phase2()
|
|
if self.phase == 2 then return end
|
|
self.phase, self.adds = 2, 0
|
|
self:RemoveBar(L.bar_phase2)
|
|
self:RemoveBar(L.bar_rezTimer)
|
|
self:RemoveBar(L.bar_heal)
|
|
for _, name in pairs(TRIO) do self:RemoveBar(name .. L.bar_bloodlust) end
|
|
self:Bar(L.bar_forcePunch, timer.forcePunchFirst, icon.forcePunch, true, "Blue")
|
|
self:IntervalBar(L.bar_charge, timer.charge[1], timer.charge[2], icon.charge, true, "White")
|
|
self:Bar(L.bar_tigersCd, timer.addsFirst, icon.adds, true, "Black")
|
|
end
|
|
function m:ForcePunch()
|
|
if self:Throttle("punch", 3) then self:IntervalBar(L.bar_forcePunch, timer.forcePunch[1], timer.forcePunch[2], icon.forcePunch, true, "Blue") end
|
|
end
|
|
function m:Charge()
|
|
if self.phase == 2 and self:Throttle("charge", 3) then self:IntervalBar(L.bar_charge, timer.charge[1], timer.charge[2], icon.charge, true, "White") end
|
|
end
|
|
function m:Enrage(_, _, dstGUID)
|
|
local id = OctoBossMods.NpcId(dstGUID)
|
|
if (id == THEKAL or id == 14599) and self:Throttle("enrage", 10) then
|
|
self:Message(L.msg_enrage, "Attention", false, "Beware")
|
|
self:WarningSign(icon.enrage, 0.7)
|
|
end
|
|
end
|
|
function m:Tigers()
|
|
if not self:Throttle("tigers", 5) then return end
|
|
self.adds = 0
|
|
self:Message(L.msg_tigers, "Attention")
|
|
self:Bar(L.bar_tigersCd, timer.adds, icon.adds, true, "Black")
|
|
end
|
|
function m:Dead() OctoBossMods:Victory(self) end
|
|
m.emotes = {{L.trigger_resurrection, "Resurrected"}}
|
|
m.yells = {{L.trigger_phase2, "Phase2"}, {L.trigger_bossDead, "Dead"}}
|
|
m.events = {
|
|
SPELL_CAST_START = {[24208] = "Heal"},
|
|
SPELL_CAST_SUCCESS = {[24208] = "HealOver", [24189] = "ForcePunch", [24408] = "Charge", [24183] = "Tigers"},
|
|
SPELL_AURA_APPLIED = {[22666] = "Silence", [22691] = "Disarm", [21060] = "Blind", [24698] = "Gouge", [22859] = "MortalCleave",
|
|
[24185] = "Lust", [8269] = "Enrage", [24169] = "Phase2"},
|
|
SPELL_AURA_REMOVED = {[22666] = "CcFade", [22691] = "CcFade", [21060] = "CcFade", [24698] = "CcFade", [22859] = "CcFade", [24185] = "LustFade"},
|
|
}
|