138 lines
7.9 KiB
Lua
138 lines
7.9 KiB
Lua
-- Hakkar (Octo BigWigs Raids/ZG/Hakkar.lua), native server events.
|
|
-- boss_hakkar.cpp: Cause Insanity 24327 (MC), Blood Siphon 24324/24322/24323, Poisonous Blood 24321 (from Sons of Hakkar,
|
|
-- protects against the siphon), Berserk 27680 at 10 min, aspects of the living priests: Jeklik 24687 (silence),
|
|
-- Venoxis 24688 (poison), Mar'li 24686 (stun), Thekal 24689 (frenzy), Arlokk 24690 (gouge/threat drop).
|
|
local HAKKAR = 14834
|
|
local L = {
|
|
trigger_engage = "PRIDE HERALDS THE END OF YOUR WORLD. COME, MORTALS! FACE THE WRATH OF THE SOULFLAYER!",
|
|
bar_enrage = "Enrage", msg_enrage = "Hakkar is Enraged!", msg_enrage60 = "Enrage in 1 minute!", msg_enrage10 = "Enrage in 10 seconds!",
|
|
msg_causeInsanity = " MC", bar_causeInsanity = " MC", bar_causeInsanityCd = "MC CD",
|
|
msg_bloodSiphon30 = "Blood Siphon in 30 seconds!", bar_bloodSiphonDur = "Blood Siphon!", bar_bloodSiphonCd = "Next Blood Siphon",
|
|
msg_poisoned = "Poisonous Blood: %d players protected", msg_notPoisoned = "You are NOT protected by Poisonous Blood!",
|
|
bar_aspectOfJeklikCd = "Silence CD - Jeklik", bar_aspectOfJeklikDur = "Silence! - Jeklik", bar_aspectOfVenoxisCd = "Poison CD - Venoxis",
|
|
bar_aspectOfMarliCd = "Stun & ThreatDrop CD - Mar'li", bar_aspectOfMarliDur = " Stunned - Mar'li",
|
|
bar_aspectOfThekalCd = "Frenzy CD - Thekal", bar_aspectOfThekalDur = "Frenzy! - Thekal", msg_aspectOfThekal = "Frenzy - Tranq!",
|
|
bar_aspectOfArlokkCd = "Stun & ThreatDrop CD - Arlokk", bar_aspectOfArlokkDur = " Stunned - Arlokk",
|
|
}
|
|
local timer = {causeInsanityFirstCd = 17, causeInsanityDur = 10, causeInsanityCd = 11, bloodSiphonCd = 90, bloodSiphonDur = 8,
|
|
enrage = 600, jeklikDur = 5, jeklikCd = 5, venoxisCd = 8, marliDur = 6, marliCd = 4, thekalDur = 8, thekalCd = 15, arlokkDur = 2, arlokkCd = 8}
|
|
local icon = {causeInsanity = "Spell_Shadow_ShadowWordDominate", priestDispel = "spell_holy_dispelmagic", paladinDispel = "spell_holy_renew",
|
|
bloodSiphon = "Spell_Shadow_LifeDrain", enrage = "Spell_Shadow_UnholyFrenzy", jeklik = "spell_shadow_teleport",
|
|
venoxis = "spell_nature_corrosivebreath", marli = "ability_smash", thekal = "ability_druid_challangingroar", arlokk = "ability_vanish",
|
|
poisonousBlood = "spell_nature_regenerate"}
|
|
local m = OctoBossMods:NewModule("Hakkar", {npcs = {HAKKAR}, displayName = "Hakkar", zone = "Zul'Gurub", engageYells = {L.trigger_engage}})
|
|
local function class() local _, c = UnitClass("player") return c end
|
|
|
|
local function siphonCycle(self, seconds)
|
|
self:Bar(L.bar_bloodSiphonCd, seconds, icon.bloodSiphon, true, "White")
|
|
self:DelayedMessage(seconds - 30, L.msg_bloodSiphon30, "Urgent")
|
|
end
|
|
function m:OnEngage()
|
|
self.poisoned, self.mc = {}, nil
|
|
self:Bar(L.bar_enrage, timer.enrage, icon.enrage, true, "White")
|
|
self:DelayedMessage(timer.enrage - 60, L.msg_enrage60, "Urgent")
|
|
self:DelayedMessage(timer.enrage - 10, L.msg_enrage10, "Attention")
|
|
siphonCycle(self, timer.bloodSiphonCd)
|
|
self:Bar(L.bar_causeInsanityCd, timer.causeInsanityFirstCd, icon.causeInsanity, true, "Black")
|
|
end
|
|
function m:CauseInsanity(_, _, _, dstName)
|
|
if not dstName then return end
|
|
self.mc = dstName
|
|
self:RemoveBar(L.bar_causeInsanityCd)
|
|
self:Bar(dstName .. L.bar_causeInsanity, timer.causeInsanityDur, icon.causeInsanity, true, "Magenta")
|
|
self:Message(dstName .. L.msg_causeInsanity, "Attention", false, "Info")
|
|
self:WarningSign(icon.causeInsanity, 0.7)
|
|
self:SetRaidTargetForPlayer(dstName, 8)
|
|
end
|
|
function m:CauseInsanityFade(_, _, _, dstName)
|
|
if not dstName then return end
|
|
self:RemoveBar(dstName .. L.bar_causeInsanity)
|
|
self:RestorePreviousRaidTargetForPlayer(dstName)
|
|
self:Bar(L.bar_causeInsanityCd, timer.causeInsanityCd, icon.causeInsanity, true, "Black")
|
|
end
|
|
-- Cause Insanity on a Grounding Totem: the server reports a miss.
|
|
function m:CauseInsanityMiss()
|
|
self:RemoveBar(L.bar_causeInsanityCd)
|
|
self:Bar("Grounded -" .. L.bar_causeInsanity, timer.causeInsanityDur, icon.causeInsanity, true, "Magenta")
|
|
self:DelayedBar(timer.causeInsanityDur, L.bar_causeInsanityCd, timer.causeInsanityCd, icon.causeInsanity, true, "Black")
|
|
end
|
|
function m:Poisoned(_, _, dstGUID, dstName) if dstName then self.poisoned[dstName] = true end end
|
|
function m:PoisonFade(_, _, _, dstName) if dstName then self.poisoned[dstName] = nil end end
|
|
function m:BloodSiphon()
|
|
if not self:Throttle("siphon", 20) then return end
|
|
self:RemoveBar(L.bar_bloodSiphonCd)
|
|
self:CancelDelayedMessage(L.msg_bloodSiphon30)
|
|
self:Bar(L.bar_bloodSiphonDur, timer.bloodSiphonDur, icon.bloodSiphon, true, "White")
|
|
local n = 0
|
|
for _ in pairs(self.poisoned) do n = n + 1 end
|
|
self:Message(format(L.msg_poisoned, n), "Attention")
|
|
if not self.poisoned[UnitName("player")] then
|
|
self:Message(L.msg_notPoisoned, "Personal", false, "Beware")
|
|
self:WarningSign(icon.poisonousBlood, 2)
|
|
end
|
|
self:ScheduleEvent("siphonCycle", function() siphonCycle(self, timer.bloodSiphonCd - timer.bloodSiphonDur) end, timer.bloodSiphonDur)
|
|
end
|
|
function m:Enrage(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= HAKKAR then return end
|
|
self:RemoveBar(L.bar_enrage)
|
|
self:Message(L.msg_enrage, "Urgent", false, "Beware")
|
|
self:WarningSign(icon.enrage, 1)
|
|
end
|
|
function m:AspectJeklik()
|
|
if not self:Throttle("jeklik", 3) then return end
|
|
self:RemoveBar(L.bar_aspectOfJeklikCd)
|
|
self:Bar(L.bar_aspectOfJeklikDur, timer.jeklikDur, icon.jeklik, true, "Blue")
|
|
self:DelayedBar(timer.jeklikDur, L.bar_aspectOfJeklikCd, timer.jeklikCd, icon.jeklik, true, "Blue")
|
|
local c = class()
|
|
if c ~= "WARRIOR" and c ~= "ROGUE" then self:WarningSign(icon.jeklik, 0.7) end
|
|
end
|
|
function m:AspectVenoxis()
|
|
if self:Throttle("venoxis", 3) then self:Bar(L.bar_aspectOfVenoxisCd, timer.venoxisCd, icon.venoxis, true, "Green") end
|
|
end
|
|
function m:AspectMarli(_, _, _, dstName)
|
|
if not dstName then return end
|
|
self:RemoveBar(L.bar_aspectOfMarliCd)
|
|
self:Bar(dstName .. L.bar_aspectOfMarliDur, timer.marliDur, icon.marli, true, "Black")
|
|
end
|
|
function m:AspectMarliFade(_, _, _, dstName)
|
|
if not dstName then return end
|
|
self:RemoveBar(dstName .. L.bar_aspectOfMarliDur)
|
|
self:Bar(L.bar_aspectOfMarliCd, timer.marliCd, icon.marli, true, "Black")
|
|
end
|
|
function m:AspectThekal(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= HAKKAR then return end
|
|
self:RemoveBar(L.bar_aspectOfThekalCd)
|
|
self.thekalStart = GetTime()
|
|
self:Bar(L.bar_aspectOfThekalDur, timer.thekalDur, icon.thekal, true, "Red")
|
|
if class() == "HUNTER" then
|
|
self:Message(L.msg_aspectOfThekal, "Important", false, "Info")
|
|
self:WarningSign(icon.thekal, 1)
|
|
end
|
|
end
|
|
function m:AspectThekalFade(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= HAKKAR then return end
|
|
self:RemoveBar(L.bar_aspectOfThekalDur)
|
|
self:RemoveWarningSign(icon.thekal)
|
|
local left = timer.thekalCd - (GetTime() - (self.thekalStart or GetTime()))
|
|
if left > 0 then self:Bar(L.bar_aspectOfThekalCd, left, icon.thekal, true, "Red") end
|
|
end
|
|
function m:AspectArlokk(_, _, _, dstName)
|
|
if not dstName then return end
|
|
self:RemoveBar(L.bar_aspectOfArlokkCd)
|
|
self:Bar(dstName .. L.bar_aspectOfArlokkDur, timer.arlokkDur, icon.arlokk, true, "Black")
|
|
end
|
|
function m:AspectArlokkFade(_, _, _, dstName)
|
|
if not dstName then return end
|
|
self:RemoveBar(dstName .. L.bar_aspectOfArlokkDur)
|
|
self:Bar(L.bar_aspectOfArlokkCd, timer.arlokkCd, icon.arlokk, true, "Black")
|
|
end
|
|
m.events = {
|
|
SPELL_AURA_APPLIED = {[24327] = "CauseInsanity", [24321] = "Poisoned", [27680] = "Enrage", [24687] = "AspectJeklik",
|
|
[24686] = "AspectMarli", [24689] = "AspectThekal", [24690] = "AspectArlokk", [24324] = "BloodSiphon", [24322] = "BloodSiphon"},
|
|
SPELL_AURA_REMOVED = {[24327] = "CauseInsanityFade", [24321] = "PoisonFade", [24686] = "AspectMarliFade",
|
|
[24689] = "AspectThekalFade", [24690] = "AspectArlokkFade"},
|
|
SPELL_MISSED = {[24327] = "CauseInsanityMiss"},
|
|
SPELL_CAST_SUCCESS = {[24324] = "BloodSiphon", [24688] = "AspectVenoxis", [24687] = "AspectJeklik"},
|
|
SPELL_DAMAGE = {[24688] = "AspectVenoxis"},
|
|
}
|