Skip to content

Commit

Permalink
BfA/AtalDazar/Alunza: Spirit of Gold, ability counts, sound updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle committed Oct 1, 2023
1 parent 921aab1 commit 992732a
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 13 deletions.
64 changes: 53 additions & 11 deletions BfA/AtalDazar/Alunza.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,31 @@

local mod, CL = BigWigs:NewBoss("Priestess Alun'za", 1763, 2082)
if not mod then return end
mod:RegisterEnableMob(122967)
mod:RegisterEnableMob(122967) -- Priestess Alun'za
mod:SetEncounterID(2084)
mod:SetRespawnTime(30)

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

local transfusionCount = 1
local spiritOfGoldCount = 1

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

local spiritOfGoldMarker = mod:AddMarkerOption(true, "npc", 8, 259205, 8) -- Spirit of Gold
function mod:GetOptions()
return {
255558, -- Tainted Blood
{255577, "CASTBAR"}, -- Transfusion
{255579, "TANK"}, -- Gilded Claws
255582, -- Molten Gold
277072, -- Corrupted Gold
259205, -- Spirit of Gold
spiritOfGoldMarker,
}
end

Expand All @@ -30,13 +40,16 @@ function mod:OnBossEnable()
self:Log("SPELL_CAST_START", "GildedClaws", 255579)
self:Log("SPELL_AURA_APPLIED", "MoltenGold", 255582)
self:Log("SPELL_AURA_APPLIED", "CorruptedGold", 277072)
-- TODO no event at all for Spirit of Gold
self:Log("SPELL_SUMMON", "SpiritOfGoldSummon", 259209)
end

function mod:OnEngage()
transfusionCount = 1
spiritOfGoldCount = 1
self:CDBar(259205, 9.0, CL.count:format(self:SpellName(259205), spiritOfGoldCount)) -- Spirit of Gold
self:CDBar(255579, 10.7) -- Gilded Claws
self:CDBar(255582, 18.8) -- Molten Gold
self:CDBar(255577, 25.3) -- Transfusion
self:CDBar(255577, 25.3, CL.count:format(self:SpellName(255577), transfusionCount)) -- Transfusion
end

--------------------------------------------------------------------------------
Expand All @@ -46,10 +59,12 @@ end
do
local taintedBloodCheck, name, onMe = nil, mod:SpellName(255558), false

local function checkForTaintedBlood(self)
local function checkForTaintedBlood(self, firstCheck)
if not onMe then
self:Message(255558, "blue", CL.no:format(name))
self:PlaySound(255558, "warning", "runin")
if not firstCheck then -- avoid spamming warning
self:PlaySound(255558, "warning", "runin")
end
taintedBloodCheck = self:ScheduleTimer(checkForTaintedBlood, 1.5, self)
else
self:Message(255558, "green", CL.you:format(name))
Expand All @@ -58,11 +73,13 @@ do
end

function mod:Transfusion(args)
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:StopBar(CL.count:format(args.spellName, transfusionCount))
self:Message(args.spellId, "red", CL.count:format(args.spellName, transfusionCount))
self:PlaySound(args.spellId, "warning") -- voice warning is in the Taunted Blood check if needed
self:CDBar(args.spellId, 34.0)
self:CastBar(args.spellId, 4)
checkForTaintedBlood(self)
transfusionCount = transfusionCount + 1
self:CDBar(args.spellId, 34.0, CL.count:format(args.spellName, transfusionCount))
checkForTaintedBlood(self, true)
end

function mod:TaintedBloodApplied(args)
Expand Down Expand Up @@ -98,9 +115,9 @@ end
function mod:MoltenGold(args)
self:TargetMessage(args.spellId, "orange", args.destName)
if self:Dispeller("magic") then
self:PlaySound(args.spellId, "info", "dispelnow", args.destName)
self:PlaySound(args.spellId, "alert", "dispelnow", args.destName)
elseif self:Me(args.destGUID) then
self:PlaySound(args.spellId, "info", nil, args.destName)
self:PlaySound(args.spellId, "alert", nil, args.destName)
end
self:CDBar(args.spellId, 34.0)
end
Expand All @@ -113,8 +130,33 @@ do
if t - prev > 2 then
prev = t
self:PersonalMessage(args.spellId)
self:PlaySound(args.spellId, "alarm", "gtfo")
self:PlaySound(args.spellId, "underyou", "gtfo")
end
end
end
end

do
local spiritOfGoldGUID = nil

function mod:SpiritOfGoldSummon(args)
self:StopBar(CL.count:format(self:SpellName(259205), spiritOfGoldCount))
self:Message(259205, "cyan", CL.count:format(self:SpellName(259205), spiritOfGoldCount))
self:PlaySound(259205, "info")
spiritOfGoldCount = spiritOfGoldCount + 1
self:CDBar(259205, 34.0, CL.count:format(self:SpellName(259205), spiritOfGoldCount))
-- register events to auto-mark the add
if self:GetOption(spiritOfGoldMarker) then
spiritOfGoldGUID = args.destGUID
self:RegisterTargetEvents("MarkSpiritOfGold")
end
end

function mod:MarkSpiritOfGold(_, unit, guid)
if spiritOfGoldGUID == guid then
spiritOfGoldGUID = nil
self:CustomIcon(spiritOfGoldMarker, unit, 8)
self:UnregisterTargetEvents()
end
end
end
1 change: 1 addition & 0 deletions BfA/AtalDazar/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ BigWigs:AddColors("Priestess Alun'za", {
[255577] = "red",
[255579] = "purple",
[255582] = {"blue","orange"},
[259205] = "cyan",
[277072] = "blue",
})

Expand Down
5 changes: 3 additions & 2 deletions BfA/AtalDazar/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ BigWigs:AddSounds("Priestess Alun'za", {
[255558] = "warning",
[255577] = "warning",
[255579] = "alert",
[255582] = "info",
[277072] = "alarm",
[255582] = "alert",
[259205] = "info",
[277072] = "underyou",
})

BigWigs:AddSounds("Vol'kaal", {
Expand Down

0 comments on commit 992732a

Please sign in to comment.