177 lines
9.4 KiB
Lua
177 lines
9.4 KiB
Lua
-- Razorgore the Untamed (Octo BigWigs Raids/BWL/Razorgore.lua r30141), native server events.
|
|
-- boss_razorgore.cpp: Destroy Egg 19873, Fireball Volley 22425, Conflagration 23023, War Stomp 24375,
|
|
-- Possess 23014 (orb control on Razorgore). Grethok the Controller (creature_spells 125570): Greater Polymorph 22274,
|
|
-- Slow 13747. Mind Exhaustion 23958 marks the orb user. Dominate Mind 14515 is kept from the Octo module.
|
|
-- The orb controller is named by Mind Exhaustion instead of Octo's 0.5 s raid-pet polling and syncs.
|
|
local EGGS = 20
|
|
local L = {
|
|
bar_poly = " Polymorph", msg_poly = " Polymorphed - Dispel!",
|
|
bar_mc = " MC", msg_mc = " MC - Dispel!",
|
|
bar_slow = "Slowed", msg_slow = "Slow - Dispel!",
|
|
bar_mobsSpawn = "Mobs Spawn",
|
|
bar_destroyEggCast = "Destroying Egg", bar_destroyEggCd = "Destroy Egg CD",
|
|
msg_eggCounter = "/" .. EGGS .. " Eggs Destroyed",
|
|
bar_mindExhaustion = " Mind Exhaustion",
|
|
bar_orb = " Orb Control", msg_orb = " is Controlling Razorgore", msg_orbFade = "Razorgore is loose!",
|
|
trigger_phase3 = "troops flee as the power of the controlling power of the orb is drained.",
|
|
msg_phase3 = "All Eggs are Destroyed - Phase 3 - Razorgore is free!",
|
|
bar_volleyCd = "Fireball Volley CD", bar_volleyCast = "Casting Fireball Volley", msg_volley = "Fireball Volley - Hide!",
|
|
bar_conflagrationCd = "Conflagration CD", bar_conflagrationDur = " Conflagration", msg_conflagration = " Conflagration",
|
|
msg_conflagHitYou = "Move away from Conflag'd person you idiot!!!",
|
|
bar_warStompDur = "War Stomped", bar_warStompCd = "War Stomp CD",
|
|
}
|
|
local timer = {polymorph = 20, mc = 15, slow = 10, mobSpawn = 46, orb = 90, mindExhaustion = 60, eggCast = 3, eggCd = 7,
|
|
volleyFirstCd = 10, volleyCd = {14, 16.5}, volleyCast = 2, conflagrationCd = {5, 9}, conflagrationDur = 10,
|
|
warStompFirstCd = 9, warStompCd = 25, warStompDur = 5}
|
|
local icon = {polymorph = "spell_nature_polymorph", mc = "spell_shadow_shadowworddominate", slow = "spell_nature_slow",
|
|
mobSpawn = "spell_holy_prayerofspirit", orb = "INV_Misc_Gem_Pearl_03", mindExhaustion = "spell_shadow_teleport",
|
|
egg = "inv_egg_03", volley = "Spell_Fire_FlameBolt", conflagration = "spell_fire_incinerate", warStomp = "ability_warstomp"}
|
|
local color = {polymorph = "Blue", mc = "Black", slow = "Yellow", mobSpawn = "White", orb = "Cyan", mindExhaustion = "Black",
|
|
eggCast = "Green", eggCd = "Yellow", volleyCd = "Cyan", volleyCast = "Blue", conflagrationCd = "Orange",
|
|
conflagrationDur = "Red", warStompCd = "Magenta", warStompDur = "Black"}
|
|
|
|
local m = OctoBossMods:NewModule("Razorgore the Untamed", {npcs = {12435, 12557}, killNpcs = {12435},
|
|
displayName = "Razorgore the Untamed", zone = "Blackwing Lair", engageYells = {"Intruders have breached the hatchery!"}})
|
|
|
|
local function dispeller()
|
|
local _, class = UnitClass("player")
|
|
return class == "PRIEST" or class == "PALADIN"
|
|
end
|
|
|
|
function m:OnEngage()
|
|
self.phase, self.eggs, self.orbController, self.exhausted = 1, 0, nil, {}
|
|
self:Bar(L.bar_mobsSpawn, timer.mobSpawn, icon.mobSpawn, true, color.mobSpawn)
|
|
end
|
|
|
|
-- Phase 1: Grethok's crowd control.
|
|
local function cc(self, dstName, bar, msg, seconds, ic, col)
|
|
if not dstName then return end
|
|
self:Bar(dstName .. bar, seconds, ic, true, col)
|
|
if dispeller() then
|
|
self:Message(dstName .. msg, "Important", false, "Info")
|
|
self:WarningSign(ic, 1)
|
|
end
|
|
end
|
|
function m:Polymorph(_, _, _, dstName) cc(self, dstName, L.bar_poly, L.msg_poly, timer.polymorph, icon.polymorph, color.polymorph) end
|
|
function m:PolymorphFade(_, _, _, dstName) if dstName then self:RemoveBar(dstName .. L.bar_poly) self:RemoveWarningSign(icon.polymorph) end end
|
|
function m:Mc(_, _, _, dstName) cc(self, dstName, L.bar_mc, L.msg_mc, timer.mc, icon.mc, color.mc) end
|
|
function m:McFade(_, _, _, dstName) if dstName then self:RemoveBar(dstName .. L.bar_mc) self:RemoveWarningSign(icon.mc) end end
|
|
function m:Slow(_, _, _, dstName)
|
|
if not dstName or not self:Throttle("slow", 2) then return end
|
|
self:Bar(L.bar_slow, timer.slow, icon.slow, true, color.slow)
|
|
if dispeller() then
|
|
self:Message(L.msg_slow, "Important", false, "Info")
|
|
self:WarningSign(icon.slow, 1)
|
|
end
|
|
end
|
|
|
|
-- Orb: the player who takes Mind Exhaustion is the one now controlling Razorgore.
|
|
local function stopPhase3Timers(self)
|
|
self:RemoveBar(L.bar_volleyCast)
|
|
self:RemoveWarningSign(icon.volley)
|
|
self:CancelDelayedBar(L.bar_volleyCd)
|
|
self:RemoveBar(L.bar_volleyCd)
|
|
self:RemoveBar(L.bar_warStompDur)
|
|
self:CancelDelayedBar(L.bar_warStompCd)
|
|
self:RemoveBar(L.bar_warStompCd)
|
|
self:CancelDelayedBar(L.bar_conflagrationCd)
|
|
self:RemoveBar(L.bar_conflagrationCd)
|
|
end
|
|
function m:MindExhaustion(_, _, _, dstName)
|
|
if not dstName then return end
|
|
self:Bar(dstName .. L.bar_mindExhaustion, timer.mindExhaustion, icon.mindExhaustion, true, color.mindExhaustion)
|
|
self.exhausted[dstName] = true
|
|
stopPhase3Timers(self) -- Volley, War Stomp and Conflagration stop while the orb holds him.
|
|
if self.phase < 3 then
|
|
if self.orbController then self:RemoveBar(self.orbController .. L.bar_orb) end
|
|
self.orbController = dstName
|
|
self:RemoveWarningSign(icon.orb)
|
|
self:Bar(dstName .. L.bar_orb, timer.orb, icon.orb, true, color.orb)
|
|
self:Message(dstName .. L.msg_orb, "Positive")
|
|
end
|
|
end
|
|
function m:MindExhaustionFade(_, _, _, dstName)
|
|
if dstName then self:RemoveBar(dstName .. L.bar_mindExhaustion) self.exhausted[dstName] = nil end
|
|
end
|
|
function m:OrbFade(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= 12435 then return end
|
|
if self.orbController then self:RemoveBar(self.orbController .. L.bar_orb) end
|
|
self.orbController = nil
|
|
if self.phase < 3 then
|
|
self:Message(L.msg_orbFade, "Urgent", false, "Beware")
|
|
self:WarningSign(icon.orb, 1)
|
|
end
|
|
end
|
|
|
|
-- Eggs: Destroy Egg (3 s cast, then the egg breaks on the spell's GO).
|
|
function m:DestroyEggCast()
|
|
self:CancelDelayedBar(L.bar_destroyEggCd)
|
|
self:RemoveBar(L.bar_destroyEggCd)
|
|
self:Bar(L.bar_destroyEggCast, timer.eggCast, icon.egg, true, color.eggCast)
|
|
end
|
|
function m:EggDestroyed()
|
|
self:RemoveBar(L.bar_destroyEggCast)
|
|
self:Bar(L.bar_destroyEggCd, timer.eggCd, icon.egg, true, color.eggCd)
|
|
self.eggs = math.min(EGGS, (self.eggs or 0) + 1)
|
|
self:Message(self.eggs .. L.msg_eggCounter, "Attention")
|
|
end
|
|
|
|
-- Phase 3: the orb's power is drained and Razorgore is free.
|
|
function m:Phase3()
|
|
if self.phase == 3 then return end
|
|
self.phase = 3
|
|
if self.orbController then self:RemoveBar(self.orbController .. L.bar_orb) end
|
|
for name in pairs(self.exhausted) do self:RemoveBar(name .. L.bar_mindExhaustion) end
|
|
self.exhausted = {}
|
|
self:CancelDelayedBar(L.bar_destroyEggCd)
|
|
self:RemoveBar(L.bar_destroyEggCd)
|
|
self:RemoveBar(L.bar_destroyEggCast)
|
|
self:Message(L.msg_phase3, "Important", false, "Long")
|
|
self:Bar(L.bar_volleyCd, timer.volleyFirstCd, icon.volley, true, color.volleyCd)
|
|
self:IntervalBar(L.bar_conflagrationCd, timer.conflagrationCd[1], timer.conflagrationCd[2], icon.conflagration, true, color.conflagrationCd)
|
|
self:Bar(L.bar_warStompCd, timer.warStompFirstCd, icon.warStomp, true, color.warStompCd)
|
|
end
|
|
function m:Volley()
|
|
if not self:Throttle("volley", 2) then return end
|
|
self:RemoveBar(L.bar_volleyCd)
|
|
self:Bar(L.bar_volleyCast, timer.volleyCast, icon.volley, true, color.volleyCast)
|
|
self:Message(L.msg_volley, "Important", false, "Alarm")
|
|
self:WarningSign(icon.volley, timer.volleyCast)
|
|
self:ScheduleEvent("volleyCd", function()
|
|
self:IntervalBar(L.bar_volleyCd, timer.volleyCd[1], timer.volleyCd[2], icon.volley, true, color.volleyCd)
|
|
end, timer.volleyCast)
|
|
end
|
|
function m:Conflagration(_, _, _, dstName)
|
|
if not dstName then return end
|
|
self:RemoveBar(L.bar_conflagrationCd)
|
|
self:Bar(dstName .. L.bar_conflagrationDur, timer.conflagrationDur, icon.conflagration, true, color.conflagrationDur)
|
|
self:Message(dstName .. L.msg_conflagration, "Urgent")
|
|
self:ScheduleEvent("conflagCd", function()
|
|
self:IntervalBar(L.bar_conflagrationCd, timer.conflagrationCd[1], timer.conflagrationCd[2], icon.conflagration, true, color.conflagrationCd)
|
|
end, timer.conflagrationDur)
|
|
end
|
|
function m:ConflagrationFade(_, _, _, dstName) if dstName then self:RemoveBar(dstName .. L.bar_conflagrationDur) end end
|
|
function m:ConflagrationHit(_, _, dstGUID)
|
|
-- The burning player's splash: tell the others standing next to them.
|
|
if dstGUID ~= UnitGUID("player") or not self:Throttle("conflaghit", 2) then return end
|
|
self:Message(L.msg_conflagHitYou, "Personal", false, "Info")
|
|
self:WarningSign(icon.conflagration, 0.7)
|
|
end
|
|
function m:WarStomp()
|
|
if not self:Throttle("stomp", 3) then return end
|
|
self:RemoveBar(L.bar_warStompCd)
|
|
self:Bar(L.bar_warStompDur, timer.warStompDur, icon.warStomp, true, color.warStompDur)
|
|
self:DelayedBar(timer.warStompDur, L.bar_warStompCd, timer.warStompCd, icon.warStomp, true, color.warStompCd)
|
|
end
|
|
|
|
m.emotes = {{L.trigger_phase3, "Phase3"}}
|
|
m.events = {
|
|
SPELL_AURA_APPLIED = {[22274] = "Polymorph", [14515] = "Mc", [13747] = "Slow", [23958] = "MindExhaustion",
|
|
[23023] = "Conflagration"},
|
|
SPELL_AURA_REMOVED = {[22274] = "PolymorphFade", [14515] = "McFade", [23958] = "MindExhaustionFade",
|
|
[23014] = "OrbFade", [23023] = "ConflagrationFade"},
|
|
SPELL_CAST_START = {[19873] = "DestroyEggCast", [22425] = "Volley"},
|
|
SPELL_CAST_SUCCESS = {[19873] = "EggDestroyed", [24375] = "WarStomp"},
|
|
SPELL_DAMAGE = {[23023] = "ConflagrationHit"},
|
|
}
|