76 lines
4.2 KiB
Lua
76 lines
4.2 KiB
Lua
-- High Priestess Mar'li (Octo BigWigs Raids/ZG/Marli.lua), native server events.
|
|
-- boss_marli.cpp: Charge 22911, Enveloping Webs 24110, Poison Bolt Volley 24099, Drain Life 24300,
|
|
-- Spider Form 24084 / Transform Back 24085 (the phase changes, from the server instead of Octo's 35 s guess),
|
|
-- spawn yell "Aid me my brood!" with Spawn of Mar'li 15041.
|
|
local MARLI, SPAWN = 14510, 15041
|
|
local L = {
|
|
trigger_engage = "Draw me to your web mistress Shadra. Unleash your venom!", trigger_spawn = "Aid me my brood!",
|
|
bar_websCd = "Enveloping Webs CD", bar_chargeCd = "Charge CD", bar_drainLife = "Drain Life", msg_drainLife = "Drain Life - Interrupt/Dispel!",
|
|
bar_spiderPhaseTimer = "Next Troll Phase", bar_trollPhaseTimer = "Next Spider Phase", bar_addsCd = "Spider adds spawn",
|
|
msg_addsDead = "/4 Spiders Dead", msg_spidersSpawn = "Kill the Spider add!", bar_poisonVolleyCd = "Poison Volley CD",
|
|
}
|
|
local timer = {websFirstCd = 5, websCd = {10, 20}, chargeCd = {10, 20}, drainLife = 7, trollPhase = 35, spiderPhase = 35,
|
|
spiderAddCd = 20, poisonVolleyFirstCd = 15, poisonVolleyCd = {10, 19}}
|
|
local icon = {webs = "Spell_Nature_EarthBind", charge = "ability_warrior_charge", drainLife = "spell_shadow_lifedrain02",
|
|
trollPhase = "inv_misc_head_troll_02", spiderPhase = "inv_misc_monsterspidercarapace_01", spiderAdd = "inv_misc_monsterspidercarapace_01",
|
|
poisonVolley = "spell_nature_corrosivebreath"}
|
|
local m = OctoBossMods:NewModule("High Priestess Mar'li", {npcs = {MARLI, SPAWN}, killNpcs = {MARLI},
|
|
displayName = "High Priestess Mar'li", zone = "Zul'Gurub", engageYells = {L.trigger_engage}})
|
|
function m:OnEngage()
|
|
self.addsDead = 0
|
|
self:Bar(L.bar_poisonVolleyCd, timer.poisonVolleyFirstCd, icon.poisonVolley, true, "Green")
|
|
self:Bar(L.bar_addsCd, timer.spiderAddCd, icon.spiderAdd, true, "Black")
|
|
end
|
|
function m:SpiderPhase(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= MARLI or not self:Throttle("spider", 5) then return end
|
|
self:RemoveBar(L.bar_drainLife)
|
|
self:RemoveBar(L.bar_poisonVolleyCd)
|
|
self:RemoveBar(L.bar_trollPhaseTimer)
|
|
self:Bar(L.bar_spiderPhaseTimer, timer.spiderPhase, icon.spiderPhase, true, "White")
|
|
self:Bar(L.bar_websCd, timer.websFirstCd, icon.webs, true, "Blue")
|
|
end
|
|
function m:TrollPhase(_, _, dstGUID)
|
|
if dstGUID and OctoBossMods.NpcId(dstGUID) ~= MARLI then return end
|
|
if not self:Throttle("troll", 5) then return end
|
|
self:RemoveBar(L.bar_websCd)
|
|
self:RemoveBar(L.bar_chargeCd)
|
|
self:RemoveBar(L.bar_spiderPhaseTimer)
|
|
self:Bar(L.bar_trollPhaseTimer, timer.trollPhase, icon.trollPhase, true, "White")
|
|
end
|
|
function m:SpidersSpawn()
|
|
self:RemoveBar(L.bar_addsCd)
|
|
self:Message(L.msg_spidersSpawn, "Attention", false, "BikeHorn")
|
|
end
|
|
function m:Webs()
|
|
if not self:Throttle("webs", 3) then return end
|
|
self:IntervalBar(L.bar_websCd, timer.websCd[1], timer.websCd[2], icon.webs, true, "Blue")
|
|
self:WarningSign(icon.webs, 0.7)
|
|
self:Sound("Info")
|
|
end
|
|
function m:Charge()
|
|
if self:Throttle("charge", 3) then self:IntervalBar(L.bar_chargeCd, timer.chargeCd[1], timer.chargeCd[2], icon.charge, true, "Red") end
|
|
end
|
|
function m:DrainStart()
|
|
self:Bar(L.bar_drainLife, timer.drainLife, icon.drainLife, true, "Red")
|
|
self:Message(L.msg_drainLife, "Attention", false, "Beware")
|
|
self:WarningSign(icon.drainLife, timer.drainLife)
|
|
end
|
|
function m:DrainOver() self:RemoveBar(L.bar_drainLife) self:RemoveWarningSign(icon.drainLife) end
|
|
function m:PoisonVolley()
|
|
if not self:Throttle("volley", 3) then return end
|
|
self:IntervalBar(L.bar_poisonVolleyCd, timer.poisonVolleyCd[1], timer.poisonVolleyCd[2], icon.poisonVolley, true, "Green")
|
|
self:WarningSign(icon.poisonVolley, 0.7)
|
|
end
|
|
function m:OnCombatLog(sub, _, _, dstGUID)
|
|
if sub == "UNIT_DIED" and OctoBossMods.NpcId(dstGUID) == SPAWN then
|
|
self.addsDead = (self.addsDead or 0) + 1
|
|
self:Message(self.addsDead .. L.msg_addsDead, "Positive")
|
|
end
|
|
end
|
|
m.yells = {{L.trigger_spawn, "SpidersSpawn"}}
|
|
m.events = {
|
|
SPELL_AURA_APPLIED = {[24084] = "SpiderPhase", [24110] = "Webs", [24300] = "DrainStart"},
|
|
SPELL_AURA_REMOVED = {[24084] = "TrollPhase", [24300] = "DrainOver"},
|
|
SPELL_CAST_SUCCESS = {[24085] = "TrollPhase", [22911] = "Charge", [24099] = "PoisonVolley", [24110] = "Webs"},
|
|
}
|