72 lines
3.7 KiB
Lua
72 lines
3.7 KiB
Lua
-- Golemagg the Incinerator (Octo BigWigs Raids/MC/Golemagg.lua), native server events.
|
|
-- boss_golemagg.cpp: Magma Splash 13879/13880 (stacking), Earthquake 19798, Enrage 19953; Turtle Ragers Unchained 45998.
|
|
-- Thresholds from Octo's kill logs: Ragers Unchained at ~60%, Enrage at ~25%.
|
|
local GOLEMAGG = 11988
|
|
local L = {
|
|
msg_enrage = "Golemagg is Enraged - Casting Earthquakes!", msg_enrageSoon = "Enrage Soon (at 25%) - Earthquake Soon",
|
|
msg_ragersSoon = "Ragers Unchained Soon (at 60%)", msg_ragersUnchained = "Ragers Unchained - Core Ragers drop threat every 6 sec!",
|
|
bar_threatDrop = "Core Rager threat drop", bar_earthquake = "Earthquake", msg_magmaSplash = "Warning - High Magma Splash Stacks: ",
|
|
}
|
|
local timer = {earthquake = 3, threatDropFirst = 6.2, threatDrop = 6}
|
|
local health = {ragersSoon = 65, ragers = 60, enrageSoon = 30, enrage = 25}
|
|
local icon = {enrage = "spell_shadow_unholyfrenzy", earthquake = "spell_nature_earthquake", ragers = "ability_racial_bloodrage",
|
|
threatDrop = "spell_nature_invisibilty", magmaSplash = "spell_fire_immolation"}
|
|
|
|
local m = OctoBossMods:NewModule("Golemagg the Incinerator", {npcs = {GOLEMAGG, 11672}, killNpcs = {GOLEMAGG},
|
|
displayName = "Golemagg the Incinerator", zone = "Molten Core"})
|
|
|
|
function m:OnEngage()
|
|
self.ragersSoon, self.ragers, self.enrageSoon = nil, nil, nil
|
|
self:ScheduleRepeatingEvent("health", function() self:HealthCheck() end, 0.5)
|
|
end
|
|
function m:HealthCheck()
|
|
for _, unit in ipairs({"target", "focus", "mouseover", "targettarget"}) do
|
|
if OctoBossMods.NpcId(UnitGUID(unit)) == GOLEMAGG then
|
|
local ok, pct = pcall(function() return UnitHealth(unit) * 100 / UnitHealthMax(unit) end)
|
|
if not ok then return end
|
|
if pct <= health.ragersSoon and pct > health.ragers and not self.ragersSoon then
|
|
self.ragersSoon = true
|
|
self:Message(L.msg_ragersSoon, "Attention")
|
|
end
|
|
if pct <= health.enrageSoon and pct > health.enrage and not self.enrageSoon then
|
|
self.enrageSoon = true
|
|
self:Message(L.msg_enrageSoon, "Attention")
|
|
end
|
|
return
|
|
end
|
|
end
|
|
end
|
|
function m:RagersUnchained()
|
|
if self.ragers then return end
|
|
self.ragers, self.ragersSoon = true, true
|
|
self:Message(L.msg_ragersUnchained, "Important", false, "Alarm")
|
|
self:WarningSign(icon.ragers, 1)
|
|
self:Bar(L.bar_threatDrop, timer.threatDropFirst, icon.threatDrop, true, "Red")
|
|
self:ScheduleEvent("threatStart", function()
|
|
self:Bar(L.bar_threatDrop, timer.threatDrop, icon.threatDrop, true, "Red")
|
|
self:ScheduleRepeatingEvent("threat", function() self:Bar(L.bar_threatDrop, timer.threatDrop, icon.threatDrop, true, "Red") end, timer.threatDrop)
|
|
end, timer.threatDropFirst)
|
|
end
|
|
function m:Enrage(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= GOLEMAGG or not self:Throttle("enrage", 10) then return end
|
|
self.enrageSoon = true
|
|
self:WarningSign(icon.enrage, 1)
|
|
self:Message(L.msg_enrage, "Urgent", false, "Beware")
|
|
end
|
|
function m:Earthquake()
|
|
if self:Throttle("quake", 1) then self:Bar(L.bar_earthquake, timer.earthquake, icon.earthquake, true, "Orange") end
|
|
end
|
|
function m:MagmaSplash(_, _, dstGUID, _, _, _, _, _, stacks)
|
|
stacks = tonumber(stacks) or 0
|
|
if dstGUID == UnitGUID("player") and stacks >= 12 then
|
|
self:Message(L.msg_magmaSplash .. stacks, "Attention")
|
|
self:WarningSign(icon.magmaSplash, 0.7)
|
|
end
|
|
end
|
|
m.events = {
|
|
SPELL_CAST_SUCCESS = {[45998] = "RagersUnchained", [19798] = "Earthquake"},
|
|
SPELL_AURA_APPLIED = {[45998] = "RagersUnchained", [19953] = "Enrage"},
|
|
SPELL_DAMAGE = {[19798] = "Earthquake"},
|
|
SPELL_AURA_APPLIED_DOSE = {[13879] = "MagmaSplash", [13880] = "MagmaSplash"},
|
|
}
|