Skip to content

Commit

Permalink
Delves/NightfallSanctum/CultLeaders: Add boss module (#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Oct 22, 2024
1 parent be18eb0 commit 8addc79
Show file tree
Hide file tree
Showing 14 changed files with 235 additions and 0 deletions.
152 changes: 152 additions & 0 deletions Delves/NightfallSanctum/CultLeaders.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
--------------------------------------------------------------------------------
-- Module Declaration
--

local mod, CL = BigWigs:NewBoss("Cult Leaders", 2686)
if not mod then return end
mod:RegisterEnableMob(
229854, -- Inquisitor Speaker
229855, -- Shadeguard Speaker
230904 -- Shadeguard Speaker
)
mod:SetEncounterID(3050)
mod:SetRespawnTime(15)
mod:SetAllowWin(true)

--------------------------------------------------------------------------------
-- Locals
--

local bossCollector = {}
local bossesEngaged = 0

--------------------------------------------------------------------------------
-- Localization
--

local L = mod:GetLocale()
if L then
L.cult_leaders = "Cult Leaders"
L.inquisitor_speaker = "Inquisitor Speaker"
L.shadeguard_speaker = "Shadeguard Speaker"
end

--------------------------------------------------------------------------------
-- Initialization
--

function mod:OnRegister()
self.displayName = L.cult_leaders
end

function mod:GetOptions()
return {
-- Inquisitor Speaker
{434740, "NAMEPLATE"}, -- Shadow Barrier
-- Shadeguard Speaker
{458874, "NAMEPLATE"}, -- Shadow Wave
{443482, "DISPEL", "NAMEPLATE"}, -- Blessing of Dusk
}, {
[434740] = L.inquisitor_speaker,
[458874] = L.shadeguard_speaker,
}
end

function mod:OnBossEnable()
-- Inquisitor Speaker
self:Log("SPELL_CAST_START", "ShadowBarrier", 434740)
self:Death("InquisitorSpeakerDeath", 229854)

-- Shadeguard Speaker
self:Log("SPELL_CAST_START", "ShadowWave", 458874)
self:Log("SPELL_CAST_START", "BlessingOfDusk", 443482)
self:Log("SPELL_AURA_APPLIED", "BlessingOfDuskApplied", 443482)
self:Death("ShadeguardSpeakerDeath", 229855, 230904)
end

function mod:OnEngage()
bossCollector = {}
bossesEngaged = 0
-- timers started in IEEU
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT")
end

--------------------------------------------------------------------------------
-- Event Handlers
--

function mod:INSTANCE_ENCOUNTER_ENGAGE_UNIT(event)
for i = 1, 3 do
local guid = self:UnitGUID(("boss%d"):format(i))
if guid and not bossCollector[guid] then
bossCollector[guid] = true
local mobId = self:MobId(guid)
if mobId == 229855 or mobId == 230904 then -- Shadeguard Speaker
bossesEngaged = bossesEngaged + 1
self:Nameplate(458874, 2.4, guid) -- Shadow Wave
self:Nameplate(443482, 10.6, guid) -- Blessing of Dusk
end
if bossesEngaged == 2 then
-- there are 3 bosses but we only need to start timers for the 2 Shadeguard Speakers.
-- Shadow Barrier is cast by the Inquisitor Speaker on pull.
self:UnregisterEvent(event)
break
end
end
end
end

-- Inquisitor Speaker

function mod:ShadowBarrier(args)
-- also cast by trash
if self:MobId(args.sourceGUID) == 229854 then -- Inquisitor Speaker
self:Message(args.spellId, "yellow", CL.casting:format(args.spellName))
self:Nameplate(args.spellId, 24.0, args.sourceGUID)
self:PlaySound(args.spellId, "info")
end
end

function mod:InquisitorSpeakerDeath(args)
self:ClearNameplate(args.destGUID)
end

-- Shadeguard Speaker

function mod:ShadowWave(args)
self:Message(args.spellId, "orange")
self:Nameplate(args.spellId, 12.1, args.sourceGUID)
self:PlaySound(args.spellId, "alarm")
end

do
local prev = 0
function mod:BlessingOfDusk(args)
-- also cast by trash
local mobId = self:MobId(args.sourceGUID)
if mobId == 229855 or mobId == 230904 and args.time - prev > 1.5 then -- Shadeguard Speaker
prev = args.time
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:Nameplate(args.spellId, 25.4, args.sourceGUID)
self:PlaySound(args.spellId, "alert")
end
end
end

do
local prev = 0
function mod:BlessingOfDuskApplied(args)
-- also cast by trash
local mobId = self:MobId(args.destGUID)
if (mobId == 229855 or mobId == 230904) and args.time - prev > 2
and self:Dispeller("magic", true, args.spellId) then -- Shadeguard Speaker
prev = args.time
self:Message(args.spellId, "yellow", CL.on:format(args.spellName, args.destName))
self:PlaySound(args.spellId, "info")
end
end
end

function mod:ShadeguardSpeakerDeath(args)
self:ClearNameplate(args.destGUID)
end
7 changes: 7 additions & 0 deletions Delves/NightfallSanctum/Locales/deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ if L then
L.speaker_davenruth = "Sprecher Davenruth"
L.reformed_fury = "Erneuerter Zorn"
end

L = BigWigs:NewBossLocale("Cult Leaders", "deDE")
if L then
--L.cult_leaders = "Cult Leaders"
--L.inquisitor_speaker = "Inquisitor Speaker"
--L.shadeguard_speaker = "Shadeguard Speaker"
end
7 changes: 7 additions & 0 deletions Delves/NightfallSanctum/Locales/esES.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ if L then
L.speaker_davenruth = "Oradora Davenruth"
L.reformed_fury = "Furia reformada"
end

L = BigWigs:NewBossLocale("Cult Leaders", "esES")
if L then
--L.cult_leaders = "Cult Leaders"
--L.inquisitor_speaker = "Inquisitor Speaker"
--L.shadeguard_speaker = "Shadeguard Speaker"
end
7 changes: 7 additions & 0 deletions Delves/NightfallSanctum/Locales/esMX.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ if L then
L.speaker_davenruth = "Orador Davenruth"
L.reformed_fury = "Furia reformada"
end

L = BigWigs:NewBossLocale("Cult Leaders", "esMX")
if L then
--L.cult_leaders = "Cult Leaders"
--L.inquisitor_speaker = "Inquisitor Speaker"
--L.shadeguard_speaker = "Shadeguard Speaker"
end
7 changes: 7 additions & 0 deletions Delves/NightfallSanctum/Locales/frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ if L then
L.speaker_davenruth = "Mandataire Davenruth"
L.reformed_fury = "Fureur reconstituée"
end

L = BigWigs:NewBossLocale("Cult Leaders", "frFR")
if L then
--L.cult_leaders = "Cult Leaders"
--L.inquisitor_speaker = "Inquisitor Speaker"
--L.shadeguard_speaker = "Shadeguard Speaker"
end
7 changes: 7 additions & 0 deletions Delves/NightfallSanctum/Locales/itIT.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ if L then
L.speaker_davenruth = "Oratore Davenruth"
L.reformed_fury = "Furia Riformata"
end

L = BigWigs:NewBossLocale("Cult Leaders", "itIT")
if L then
--L.cult_leaders = "Cult Leaders"
--L.inquisitor_speaker = "Inquisitor Speaker"
--L.shadeguard_speaker = "Shadeguard Speaker"
end
7 changes: 7 additions & 0 deletions Delves/NightfallSanctum/Locales/koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ if L then
L.speaker_davenruth = "대변자 데이븐루스"
L.reformed_fury = "재형성된 격노"
end

L = BigWigs:NewBossLocale("Cult Leaders", "koKR")
if L then
--L.cult_leaders = "Cult Leaders"
--L.inquisitor_speaker = "Inquisitor Speaker"
--L.shadeguard_speaker = "Shadeguard Speaker"
end
7 changes: 7 additions & 0 deletions Delves/NightfallSanctum/Locales/ptBR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ if L then
L.speaker_davenruth = "Arauto Davenruth"
L.reformed_fury = "Fúria Renovada"
end

L = BigWigs:NewBossLocale("Cult Leaders", "ptBR")
if L then
--L.cult_leaders = "Cult Leaders"
--L.inquisitor_speaker = "Inquisitor Speaker"
--L.shadeguard_speaker = "Shadeguard Speaker"
end
7 changes: 7 additions & 0 deletions Delves/NightfallSanctum/Locales/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ if L then
L.speaker_davenruth = "Глашатай Давенрут"
L.reformed_fury = "Преобразованная ярость"
end

L = BigWigs:NewBossLocale("Cult Leaders", "ruRU")
if L then
--L.cult_leaders = "Cult Leaders"
--L.inquisitor_speaker = "Inquisitor Speaker"
--L.shadeguard_speaker = "Shadeguard Speaker"
end
7 changes: 7 additions & 0 deletions Delves/NightfallSanctum/Locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ if L then
L.speaker_davenruth = "代言人达文鲁兹"
L.reformed_fury = "重塑之怒"
end

L = BigWigs:NewBossLocale("Cult Leaders", "zhCN")
if L then
--L.cult_leaders = "Cult Leaders"
--L.inquisitor_speaker = "Inquisitor Speaker"
--L.shadeguard_speaker = "Shadeguard Speaker"
end
7 changes: 7 additions & 0 deletions Delves/NightfallSanctum/Locales/zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ if L then
--L.speaker_davenruth = "Speaker Davenruth"
L.reformed_fury = "重構怒影"
end

L = BigWigs:NewBossLocale("Cult Leaders", "zhTW")
if L then
L.cult_leaders = "教徒領袖"
--L.inquisitor_speaker = "Inquisitor Speaker"
--L.shadeguard_speaker = "Shadeguard Speaker"
end
6 changes: 6 additions & 0 deletions Delves/NightfallSanctum/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ BigWigs:AddColors("Speaker Halven", {
[443840] = "yellow",
[443908] = "orange",
})

BigWigs:AddColors("Cult Leaders", {
[434740] = "yellow",
[443482] = {"red","yellow"},
[458874] = "orange",
})
6 changes: 6 additions & 0 deletions Delves/NightfallSanctum/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ BigWigs:AddSounds("Speaker Halven", {
[443840] = "long",
[443908] = "alarm",
})

BigWigs:AddSounds("Cult Leaders", {
[434740] = "info",
[443482] = {"alert","info"},
[458874] = "alarm",
})
1 change: 1 addition & 0 deletions Delves/NightfallSanctum/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<Script file="ReformedFury.lua"/>
<Script file="SpeakerHalven.lua"/>
<Script file="CultLeaders.lua"/>

<Include file="Locales\locales.xml"/>
<Include file="Options\options.xml"/>
Expand Down

0 comments on commit 8addc79

Please sign in to comment.