77 lines
4.0 KiB
Lua
77 lines
4.0 KiB
Lua
-- Baron Geddon (Octo BigWigs Raids/MC/BaronGeddon.lua), native server events.
|
|
-- boss_baron_geddon.cpp: Inferno 19695 (channel; damage ticks 19698), Ignite Mana 19659, Living Bomb 20475, Armageddon 20478.
|
|
local GEDDON = 12056
|
|
local L = {
|
|
bar_bomb = " Bomb!", msg_bomb = " is the Bomb!", bar_infernoCd = "Inferno CD", bar_infernoSoon = "Inferno Soon...",
|
|
bar_infernoChannel = "Inferno!", msg_infernoYou = "Get out of Inferno!", bar_armageddon = "Armageddon!",
|
|
msg_armageddon = "Armageddon - Kill Baron Geddon!", bar_igniteCd = "Ignite Mana CD",
|
|
msg_ignite = "Ignite Mana - Dispel! (Classes with Mana only)",
|
|
}
|
|
local timer = {bomb = 8, infernoFirstCd = 18, infernoFirstSoon = 6, infernoChannel = 8, infernoCd = 10, infernoSoon = 6,
|
|
armageddon = 8, firstIgniteCd = {10, 15}, igniteCd = {20, 30}}
|
|
local icon = {bomb = "inv_enchant_essenceastralsmall", inferno = "Spell_Fire_Incinerate", armageddon = "Spell_Fire_SelfDestruct",
|
|
ignite = "Spell_Fire_Incinerate"}
|
|
local color = {bomb = "Cyan", infernoCd = "Black", infernoSoon = "Orange", infernoChannel = "Red", armageddon = "White", ignite = "Blue"}
|
|
|
|
local m = OctoBossMods:NewModule("Baron Geddon", {npcs = {GEDDON}, displayName = "Baron Geddon", zone = "Molten Core"})
|
|
|
|
function m:OnEngage()
|
|
self:Bar(L.bar_infernoCd, timer.infernoFirstCd, icon.inferno, true, color.infernoCd)
|
|
self:DelayedBar(timer.infernoFirstCd, L.bar_infernoSoon, timer.infernoFirstSoon, icon.inferno, true, color.infernoSoon)
|
|
self:IntervalBar(L.bar_igniteCd, timer.firstIgniteCd[1], timer.firstIgniteCd[2], icon.ignite, true, color.ignite)
|
|
end
|
|
function m:Bomb(_, _, dstGUID, dstName)
|
|
if not dstName then return end
|
|
self:Bar(dstName .. L.bar_bomb, timer.bomb, icon.bomb, true, color.bomb)
|
|
self:Message(dstName .. L.msg_bomb, "Urgent")
|
|
if dstGUID == UnitGUID("player") then
|
|
self:WarningSign(icon.bomb, timer.bomb)
|
|
self:Sound("RunAway")
|
|
end
|
|
self:SetRaidTargetForPlayer(dstName, 8)
|
|
end
|
|
function m:BombFade(_, _, dstGUID, dstName)
|
|
if not dstName then return end
|
|
self:RemoveBar(dstName .. L.bar_bomb)
|
|
if dstGUID == UnitGUID("player") then self:RemoveWarningSign(icon.bomb) end
|
|
self:RestorePreviousRaidTargetForPlayer(dstName)
|
|
end
|
|
function m:Inferno(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= GEDDON then return end
|
|
self:CancelDelayedBar(L.bar_infernoSoon)
|
|
self:RemoveBar(L.bar_infernoSoon)
|
|
self:RemoveBar(L.bar_infernoCd)
|
|
self:Bar(L.bar_infernoChannel, timer.infernoChannel, icon.inferno, true, color.infernoChannel)
|
|
end
|
|
function m:InfernoFade(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= GEDDON then return end
|
|
self:RemoveBar(L.bar_infernoChannel)
|
|
self:Bar(L.bar_infernoCd, timer.infernoCd, icon.inferno, true, color.infernoCd)
|
|
self:DelayedBar(timer.infernoCd, L.bar_infernoSoon, timer.infernoSoon, icon.inferno, true, color.infernoSoon)
|
|
end
|
|
function m:InfernoYou(_, _, dstGUID)
|
|
if dstGUID ~= UnitGUID("player") or not self:Throttle("infernoYou", 2) then return end
|
|
self:Message(L.msg_infernoYou, "Personal", false, "Info")
|
|
self:WarningSign(icon.inferno, 0.7)
|
|
end
|
|
function m:Armageddon()
|
|
if not self:Throttle("armageddon", 10) then return end
|
|
self:Bar(L.bar_armageddon, timer.armageddon, icon.armageddon, true, color.armageddon)
|
|
self:Message(L.msg_armageddon, "Important", false, "Beware")
|
|
end
|
|
function m:Ignite()
|
|
if not self:Throttle("ignite", 5) then return end
|
|
self:IntervalBar(L.bar_igniteCd, timer.igniteCd[1], timer.igniteCd[2], icon.ignite, true, color.ignite)
|
|
local _, class = UnitClass("player")
|
|
if class == "PRIEST" or class == "PALADIN" then
|
|
self:WarningSign(icon.ignite, 0.7)
|
|
self:Message(L.msg_ignite, "Important", false, "Info")
|
|
end
|
|
end
|
|
m.events = {
|
|
SPELL_AURA_APPLIED = {[20475] = "Bomb", [19695] = "Inferno", [20478] = "Armageddon"},
|
|
SPELL_AURA_REMOVED = {[20475] = "BombFade", [19695] = "InfernoFade"},
|
|
SPELL_CAST_SUCCESS = {[19659] = "Ignite", [20478] = "Armageddon"},
|
|
SPELL_DAMAGE = {[19698] = "InfernoYou"},
|
|
}
|