Skip to content

Commit

Permalink
Classic/DireMaul/Lethtendris: Add boss module (#1222)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Dec 1, 2024
1 parent a7e5509 commit 99c9c76
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 6 deletions.
121 changes: 115 additions & 6 deletions Classic/DireMaul/Lethtendris.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod:RegisterEnableMob(
14349 -- Pimgib
)
mod:SetEncounterID(345)
--mod:SetRespawnTime(0)
--mod:SetRespawnTime(0) resets, doesn't respawn

--------------------------------------------------------------------------------
-- Localization
Expand All @@ -26,25 +26,134 @@ end

function mod:GetOptions()
return {

-- Lethtendris
17228, -- Shadow Bolt Volley
{13338, "DISPEL"}, -- Curse of Thorns
{16247, "DISPEL"}, -- Curse of Tongues
11962, -- Immolate
{22710, "DISPEL"}, -- Enlarge
-- Pimgib
15744, -- Blast Wave
{22713, "DISPEL"}, -- Flame Buffet
}, {
[17228] = self.displayName, -- Lethtendris
[15744] = L.pimgib,
}
end

function mod:OnBossEnable()
-- Lethtendris
self:Log("SPELL_CAST_START", "ShadowBoltVolley", 17228)
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
-- Curse of Thorns is instant cast on Retail
self:Log("SPELL_AURA_APPLIED", "CurseOfThornsApplied", 450864)
else -- Classic
self:Log("SPELL_CAST_START", "CurseOfThorns", 13338)
self:Log("SPELL_AURA_APPLIED", "CurseOfThornsApplied", 13338)
end
self:Log("SPELL_AURA_APPLIED", "CurseOfTonguesApplied", 16247)
self:Log("SPELL_CAST_START", "Immolate", 11962)
self:Log("SPELL_CAST_SUCCESS", "Enlarge", 22710)
self:Log("SPELL_AURA_APPLIED", "EnlargeApplied", 22710)

-- Pimgib
self:Log("SPELL_CAST_START", "BlastWave", 15744)
self:Log("SPELL_CAST_SUCCESS", "FlameBuffet", 22713)
self:Log("SPELL_AURA_APPLIED_DOSE", "FlameBuffetApplied", 22713)
self:Death("PimgibDeath", 14349)

if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 14327)
end
end

function mod:OnEngage()
self:CDBar(11962, 3.1) -- Immolate
if self:Dispeller("magic", nil, 22713) then
self:CDBar(22713, 7.2) -- Flame Buffet
end
self:CDBar(15744, 9.7) -- Blast Wave
if self:Dispeller("magic", true, 22710) then
self:CDBar(22710, 17.7) -- Enlarge
end
self:CDBar(17228, 18.1) -- Shadow Bolt Volley
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
-- Lethtendris

function mod:ShadowBoltVolley(args)
if self:MobId(args.sourceGUID) == 14327 then -- Lethtendris
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 17.0)
self:PlaySound(args.spellId, "alert")
end
end

function mod:CurseOfThorns(args)
self:Message(args.spellId, "yellow", CL.casting:format(args.spellName))
self:PlaySound(args.spellId, "alert")
end

function mod:CurseOfThornsApplied(args)
if self:Me(args.destGUID) or self:Dispeller("curse", nil, 13338) then
self:TargetMessage(13338, "yellow", args.destName)
self:PlaySound(13338, "alert", nil, args.destName)
end
end

function mod:CurseOfTonguesApplied(args)
if (self:Me(args.destGUID) or self:Dispeller("curse", nil, args.spellId)) and self:MobId(args.sourceGUID) == 14327 then -- Lethtendris
self:TargetMessage(args.spellId, "yellow", args.destName)
self:PlaySound(args.spellId, "alert", nil, args.destName)
end
end

function mod:Immolate(args)
self:Message(args.spellId, "orange", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 14.5)
self:PlaySound(args.spellId, "alert")
end

function mod:Enlarge(args)
if self:Dispeller("magic", true, args.spellId) then
self:CDBar(args.spellId, 32.8)
end
end

function mod:EnlargeApplied(args)
if self:Dispeller("magic", true, args.spellId) and not self:Friendly(args.destFlags) then
self:Message(args.spellId, "yellow", CL.on:format(args.spellName, args.destName))
self:PlaySound(args.spellId, "alert")
end
end

-- Pimgib

function mod:BlastWave(args)
self:Message(args.spellId, "yellow", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 18.2)
self:PlaySound(args.spellId, "alert")
end

function mod:FlameBuffet(args)
if self:Dispeller("magic", nil, args.spellId) then
self:CDBar(args.spellId, 6.1)
end
end

function mod:FlameBuffetApplied(args)
if args.amount % 2 == 0 and self:Dispeller("magic", nil, args.spellId) then
self:StackMessage(args.spellId, "orange", args.destName, args.amount, 4)
self:PlaySound(args.spellId, "alert", nil, args.destName)
end
end

function mod:PimgibDeath()
self:StopBar(15744) -- Blast Wave
self:StopBar(22713) -- Flame Buffet
end
7 changes: 7 additions & 0 deletions Classic/DireMaul/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ BigWigs:AddColors("King Gordok", {
})

BigWigs:AddColors("Lethtendris", {
[11962] = "orange",
[13338] = {"blue","yellow"},
[15744] = "yellow",
[16247] = {"blue","yellow"},
[17228] = "red",
[22710] = "yellow",
[22713] = {"blue","orange"},
})

BigWigs:AddColors("Hydrospawn", {
Expand Down
7 changes: 7 additions & 0 deletions Classic/DireMaul/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ BigWigs:AddSounds("King Gordok", {
})

BigWigs:AddSounds("Lethtendris", {
[11962] = "alert",
[13338] = "alert",
[15744] = "alert",
[16247] = "alert",
[17228] = "alert",
[22710] = "alert",
[22713] = "alert",
})

BigWigs:AddSounds("Hydrospawn", {
Expand Down

0 comments on commit 99c9c76

Please sign in to comment.