Files
2026-11-23 03:28:32 +02:00

73 lines
4.4 KiB
Lua

-- Chess event / King (Octo BigWigs Raids/KarazhanUpper/ChessFight.lua), Turtle Upper Karazhan, native server events.
-- Queen: Dark Subservience 41647 (go bow), Charming Presence 41644; King: Blunder 52667 (void zone on target),
-- King's Fury 51229, King's Curse 51231; Rook: Shield Bash 51219. The Bishop's Curse of Tongues (1714/11719) is
-- tracked from its aura on the Bishop instead of Octo's 5 s debuff-texture scan. Click-to-decurse bars are not ported
-- (protected casts); the decurse reminder is a plain bar.
local L = {
msg_voidzone = "Void Zone MOVE!", bar_shieldbash = "Shield Bash",
msg_subservienceYou = "YOU need to go Bow to the Queen!", msg_subservienceOther = "%s needs to go Bow!",
msg_queenCasting = "Queen began casting on %s!", msg_totem = "Totem ate cast instead of %s!",
msg_kingCastFury = "King begins to cast King's Fury!", bar_subservience = "Go right in front of Queen and Bow!",
bar_kingsfury = "King's Fury - Hide!", bar_charmingpresence = "Next Charming Presence", bar_decursebow = "Decurse %s",
warning_bow = "BOW TO THE QUEEN!", msg_tongues = "Bishop needs Curse of Tongues!",
}
local icon = {subservience = "Spell_BrokenHeart", kingsfury = "Spell_Holy_HolyNova", charmingpresence = "Spell_Shadow_ShadowWordDominate",
kingscurse = "Spell_Shadow_GrimWard", voidzone = "Spell_Shadow_AntiShadow", shieldbash = "Ability_Warrior_ShieldBash"}
local BISHOP = {[59813] = true, [59971] = true}
local m = OctoBossMods:NewModule("King", {npcs = {59812, 59967, 59810, 59953, 59811, 59968, 59813, 59971, 59814, 59970},
killNpcs = {59812, 59967}, displayName = "Chess Event", zone = "Karazhan"})
local function decurser() local _, c = UnitClass("player") return c == "MAGE" or c == "DRUID" end
function m:OnEngage()
self.cursed = {}
self:Bar(L.bar_shieldbash, 11, icon.shieldbash, true, "White")
end
function m:ShieldBash() if self:Throttle("bash", 3) then self:Bar(L.bar_shieldbash, 11, icon.shieldbash, true, "White") end end
function m:QueenCasting(_, _, _, dstName)
if dstName then self:Message(format(L.msg_queenCasting, dstName), "Attention", false, "Info") end
end
function m:Grounded(_, _, _, dstName)
if dstName then self:Message(format(L.msg_totem, dstName), "Positive") end
end
function m:Subservience(_, _, dstGUID, dstName)
if not dstName then return end
if dstGUID == UnitGUID("player") then
self:Message(L.msg_subservienceYou, "Important", true, "Alarm")
self:WarningSign(icon.subservience, 8, true, L.warning_bow)
self:Bar(L.bar_subservience, 8, icon.subservience, true, "Red")
else
self:Message(format(L.msg_subservienceOther, dstName), "Important")
if self.cursed[dstName] and decurser() then
self:Bar(format(L.bar_decursebow, dstName), 8, icon.kingscurse, true, "Magenta")
end
end
end
function m:SubservienceFade(_, _, dstGUID, dstName)
if not dstName then return end
if dstGUID == UnitGUID("player") then self:RemoveBar(L.bar_subservience) self:RemoveWarningSign(icon.subservience) end
self:RemoveBar(format(L.bar_decursebow, dstName))
end
function m:Curse(_, _, _, dstName) if dstName then self.cursed[dstName] = true end end
function m:CurseFade(_, _, _, dstName) if dstName then self.cursed[dstName] = nil self:RemoveBar(format(L.bar_decursebow, dstName)) end end
function m:Charming() if self:Throttle("charm", 3) then self:Bar(L.bar_charmingpresence, 12, icon.charmingpresence, true, "Black") end end
function m:Fury()
self:Message(L.msg_kingCastFury, "Attention", false, "Info")
self:Bar(L.bar_kingsfury, 5, icon.kingsfury, true, "Red")
end
function m:Blunder(_, _, dstGUID)
if dstGUID ~= UnitGUID("player") then return end
self:Message(L.msg_voidzone, "Important", false, "Alarm")
self:WarningSign(icon.voidzone, 2, true, L.msg_voidzone)
end
function m:TonguesFade(_, _, dstGUID)
if not BISHOP[OctoBossMods.NpcId(dstGUID)] then return end
local _, c = UnitClass("player")
if c == "WARLOCK" then self:Message(L.msg_tongues, "Important", false, "Alert") end
end
m.events = {
SPELL_CAST_START = {[41647] = "QueenCasting", [51229] = "Fury"},
SPELL_CAST_SUCCESS = {[41644] = "Charming", [52667] = "Blunder", [51219] = "ShieldBash"},
SPELL_MISSED = {[41647] = "Grounded"},
SPELL_AURA_APPLIED = {[41647] = "Subservience", [51231] = "Curse"},
SPELL_AURA_REMOVED = {[41647] = "SubservienceFade", [51231] = "CurseFade", [1714] = "TonguesFade", [11719] = "TonguesFade"},
}