119 lines
6.7 KiB
Lua
119 lines
6.7 KiB
Lua
-- Vaelastrasz the Corrupt (Octo BigWigs Raids/BWL/Vaelastrasz.lua r30085), native events.
|
|
-- boss_vaelastrasz.cpp: Essence of the Red 23513, Flame Breath 23461, Fire Nova 23462, Tail Sweep 15847,
|
|
-- Burning Adrenaline 23620 (+ 23478/23644/24701).
|
|
local L = {
|
|
bar_gossip = "Engage", msg_gossip = "Vaelastrasz Event Started!",
|
|
bar_adrenalineCd = "Burning Adrenaline CD", bar_adrenalineDur = " Burning!", msg_adrenaline = " has Burning Adrenaline",
|
|
bar_flameBreathCd = "Flame Breath CD", bar_flameBreathCast = "Casting Flame Breath!", bar_flameBreathDot = " Flame Breath DoT",
|
|
bar_fireNova = "Fire Nova CD", msg_tailSweep = "Tail Sweep hits behind the boss for 30 yards.",
|
|
msg_parryYou = "Vaelastrasz the Corrupt Parried your attack - Stop killing the tank you idiot!",
|
|
}
|
|
local timer = {gossip1 = 36, gossip2 = 26, gossip3 = 10, adrenalineCd = 15, adrenalineDur = 20, flameBreathCd = {5, 10},
|
|
flameBreathCast = 2, flameBreathDot = 15, fireNovaCd = {2, 4}}
|
|
local icon = {gossip = "inv_misc_head_dragon_01", adrenaline = "INV_Gauntlets_03", adrenalineDur = "spell_shadow_mindbomb",
|
|
flameBreath = "spell_fire_fire", flameBreathDot = "spell_fire_incinerate", tailSweep = "inv_misc_monsterscales_05",
|
|
fireNova = "spell_fire_sealoffire", parry = "ability_parry"}
|
|
local color = {gossip = "White", adrenalineCd = "Orange", adrenalineDur = "Red", flameBreathCd = "Cyan", flameBreathCast = "Blue",
|
|
flameBreathDot = "Magenta", fireNovaCd = "Black"}
|
|
local VAEL = 13020
|
|
|
|
local m = OctoBossMods:NewModule("Vaelastrasz the Corrupt", {npcs = {VAEL}, displayName = "Vaelastrasz the Corrupt", zone = "Blackwing Lair"})
|
|
|
|
local function gossip(seconds, announce)
|
|
return function(self)
|
|
self:Bar(L.bar_gossip, seconds, icon.gossip, true, color.gossip)
|
|
if announce then self:Message(L.msg_gossip, "Attention") end
|
|
end
|
|
end
|
|
m.idleYells = {{"Too late, friends", gossip(timer.gossip1, true)}, {"I beg you, mortals", gossip(timer.gossip2)},
|
|
{"FLAME! DEATH! DESTRUCTION!", gossip(timer.gossip3)}}
|
|
|
|
function m:OnEngage()
|
|
self.adrenalineCount, self.adrenaline, self.breath = 1, {}, {}
|
|
self:RemoveBar(L.bar_gossip)
|
|
self:Bar(L.bar_adrenalineCd, timer.adrenalineCd, icon.adrenaline, true, color.adrenalineCd)
|
|
self:IntervalBar(L.bar_flameBreathCd, timer.flameBreathCd[1], timer.flameBreathCd[2], icon.flameBreath, true, color.flameBreathCd)
|
|
self:IntervalBar(L.bar_fireNova, timer.fireNovaCd[1], timer.fireNovaCd[2], icon.fireNova, true, color.fireNovaCd)
|
|
end
|
|
function m:Adrenaline(_, _, dstGUID, dstName)
|
|
if not dstName or self.adrenaline[dstName] then return end
|
|
self.adrenaline[dstName] = true
|
|
self:Bar(dstName .. L.bar_adrenalineDur, timer.adrenalineDur, icon.adrenalineDur, true, color.adrenalineDur)
|
|
self:Message(dstName .. L.msg_adrenaline, "Urgent")
|
|
if dstGUID == UnitGUID("player") then
|
|
SendChatMessage(UnitName("player") .. " has Burning Adrenaline!", "SAY")
|
|
self:WarningSign(icon.adrenaline, 1)
|
|
self:Sound("RunAway")
|
|
end
|
|
-- Octo: square on the tank (Vaelastrasz's current target), skull on everyone else.
|
|
local unit = OctoBossMods:UnitByName(dstName)
|
|
if unit and (UnitIsGroupLeader("player") or UnitIsGroupAssistant("player")) then
|
|
local tank = OctoBossMods.NpcId(UnitGUID(unit .. "target")) == VAEL and UnitIsUnit(unit .. "targettarget", unit)
|
|
SetRaidTarget(unit, tank and 6 or 8)
|
|
end
|
|
self:RemoveBar(L.bar_adrenalineCd)
|
|
self:RemoveBar("2x " .. L.bar_adrenalineCd)
|
|
self.adrenalineCount = self.adrenalineCount + 1
|
|
local double = self.adrenalineCount % 3 == 0 and self.adrenalineCount <= 18
|
|
self:Bar((double and "2x " or "") .. L.bar_adrenalineCd, timer.adrenalineCd, icon.adrenaline, true, color.adrenalineCd)
|
|
end
|
|
function m:AdrenalineFade(_, _, dstGUID, dstName)
|
|
if not dstName or not self.adrenaline[dstName] then return end
|
|
self.adrenaline[dstName] = nil
|
|
self:RemoveBar(dstName .. L.bar_adrenalineDur)
|
|
if dstGUID == UnitGUID("player") then self:RemoveWarningSign(icon.adrenaline) end
|
|
local unit = OctoBossMods:UnitByName(dstName)
|
|
if unit and (UnitIsGroupLeader("player") or UnitIsGroupAssistant("player")) then SetRaidTarget(unit, 0) end
|
|
end
|
|
function m:FlameBreath()
|
|
if not self:Throttle("breath", 1.5) then return end
|
|
self:RemoveBar(L.bar_flameBreathCd)
|
|
self:Bar(L.bar_flameBreathCast, timer.flameBreathCast, icon.flameBreath, true, color.flameBreathCast)
|
|
self:ScheduleEvent("breathcd", function()
|
|
self:IntervalBar(L.bar_flameBreathCd, timer.flameBreathCd[1], timer.flameBreathCd[2], icon.flameBreath, true, color.flameBreathCd)
|
|
end, timer.flameBreathCast)
|
|
end
|
|
function m:FlameBreathDot(_, _, _, dstName, _, _, _, _, amount)
|
|
amount = amount or 1
|
|
if not dstName or amount < 3 then return end
|
|
if self.breath[dstName] then self:RemoveBar(self.breath[dstName]) end
|
|
self.breath[dstName] = dstName .. " " .. amount .. L.bar_flameBreathDot
|
|
self:Bar(self.breath[dstName], timer.flameBreathDot, icon.flameBreathDot, true, color.flameBreathDot)
|
|
end
|
|
function m:FlameBreathDotFade(_, _, _, dstName)
|
|
if dstName and self.breath[dstName] then self:RemoveBar(self.breath[dstName]) self.breath[dstName] = nil end
|
|
end
|
|
function m:FireNova()
|
|
if not self:Throttle("nova", 1) then return end
|
|
self:IntervalBar(L.bar_fireNova, timer.fireNovaCd[1], timer.fireNovaCd[2], icon.fireNova, true, color.fireNovaCd)
|
|
end
|
|
function m:TailSweep(_, _, dstGUID)
|
|
if dstGUID ~= UnitGUID("player") then return end
|
|
self:Message(L.msg_tailSweep, "Personal")
|
|
self:WarningSign(icon.tailSweep, 1)
|
|
end
|
|
function m:OnCombatLog(sub, srcGUID, _, dstGUID, dstName, missType)
|
|
if sub == "UNIT_DIED" and dstName then self:AdrenalineFade(nil, nil, dstGUID, dstName) return end
|
|
-- Parry from Vaelastrasz on your own swing while someone else tanks (Octo "parry" warning).
|
|
if sub == "SWING_MISSED" and srcGUID == UnitGUID("player") and OctoBossMods.NpcId(dstGUID) == VAEL and missType == "PARRY" and
|
|
not UnitIsUnit("targettarget", "player") and self:Throttle("parry", 1) then
|
|
self:WarningSign(icon.parry, 0.7)
|
|
self:Message(L.msg_parryYou, "Personal")
|
|
self:Sound("Info")
|
|
end
|
|
end
|
|
local adrenalineIds = {23620, 23478, 23644, 24701}
|
|
m.events = {
|
|
SPELL_CAST_START = {[23461] = "FlameBreath"},
|
|
SPELL_AURA_APPLIED = {[23461] = "FlameBreathDot"},
|
|
SPELL_AURA_APPLIED_DOSE = {[23461] = "FlameBreathDot"},
|
|
SPELL_AURA_REMOVED = {[23461] = "FlameBreathDotFade"},
|
|
SPELL_DAMAGE = {[23462] = "FireNova", [15847] = "TailSweep"},
|
|
SPELL_CAST_SUCCESS = {[23462] = "FireNova"},
|
|
}
|
|
for _, id in ipairs(adrenalineIds) do
|
|
m.events.SPELL_AURA_APPLIED[id] = "Adrenaline"
|
|
m.events.SPELL_AURA_REMOVED = m.events.SPELL_AURA_REMOVED or {}
|
|
m.events.SPELL_AURA_REMOVED[id] = "AdrenalineFade"
|
|
end
|