Skip to content

Commit

Permalink
AQ20 Trash: Add various warnings for gtfo/dodge events
Browse files Browse the repository at this point in the history
  • Loading branch information
emmericp committed Dec 9, 2024
1 parent 7f546cc commit e68f733
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
41 changes: 40 additions & 1 deletion DBM-Raids-Vanilla/AQ20/AQ20Trash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,31 @@ mod:SetZone(509)
mod:RegisterZoneCombat(509)

mod.isTrashMod = true
mod.isTrashModBossFightAllowed = true -- Toxic Pool also shows up during boss fights

mod:RegisterEvents(
"SPELL_AURA_APPLIED 22997 25698 26079",
"SPELL_AURA_APPLIED 22997 25698 26079 1215202",
"SPELL_CAST_SUCCESS 26586",
"SPELL_AURA_REMOVED 22997",
"SPELL_MISSED"
)

mod:AddRangeFrameOption(10, 22997)

-- Toxic Pool
mod:NewGtfo{spell = "1215421"}

--local eventsRegistered = false

local warnPlague = mod:NewTargetAnnounce(22997, 2)
local warnCauseInsanity = mod:NewTargetNoFilterAnnounce(26079, 2)
local warnExplosion = mod:NewAnnounce("WarnExplosion")
local timerExplosion = mod:NewCastTimer(5, 1214871, DBM_COMMON_L.AOEDAMAGE)

local specWarnPlague = mod:NewSpecialWarningMoveAway(22997, nil, nil, nil, 1, 2)
local specWarnBurst = mod:NewSpecialWarningDodge(1215202, nil, nil, nil, 2, 2)
local yellPlague = mod:NewYell(22997)
local yellBurst = mod:NewIconTargetYell(1215202)
local specWarnExplode = mod:NewSpecialWarningRun(25698, "Melee", nil, 3, 4, 2)
local specWarnShadowFrostReflect = mod:NewSpecialWarningReflect(19595, nil, nil, nil, 1, 2)
local specWarnFireArcaneReflect = mod:NewSpecialWarningReflect(13022, nil, nil, nil, 1, 2)
Expand All @@ -59,6 +68,28 @@ function mod:SPELL_AURA_APPLIED(args)
specWarnExplode:Play("justrun")
elseif args:IsSpell(26079) then
warnCauseInsanity:CombinedShow(0.75, args.destName)
elseif args:IsSpell(1215202) then
if args:IsPlayer() and self:AntiSpam(2, "BurstYell") then -- Event can trigger multiple times you are next to multiple people
yellBurst:Show()
end
-- It's cast on a single player and then spreads from there, let's handle 3 different cases
-- Shared AntiSpam between the warning types because it spreads so often pretty much immediately
-- that we don't want to spam players with multiple instructions if multiple of these cases happen
if args:IsPlayer() and args:IsPlayerSource() and self:AntiSpam(3, "Burst") then
-- You are the primary target --> Run out
-- Maybe it's a bit bugged because it seems to spread immediately from the first player?
specWarnBurst:Show()
specWarnBurst:Play("runout")
elseif args:IsPlayer() and not args:IsPlayerSource() and self:AntiSpam(3, "Burst") then
-- You are a target, but it spread from someone else, say to spread instead of just running out
specWarnBurst:Show()
specWarnBurst:Play("scatter")
elseif args.sourceGUID ~= args.destGUID and self:AntiSpam(3, "Burst") then
-- It's spreading between other players but not (yet) to you, you are likely good, but be careful
specWarnBurst:Show()
specWarnBurst:Play("watchstep")
-- else: someone else is the primary target, you shouldn't be doing anything yet, they should run out
end
end
end

Expand All @@ -70,6 +101,14 @@ function mod:SPELL_AURA_REMOVED(args)
end
end

function mod:SPELL_CAST_SUCCESS(args)
-- 26586 (Birth) is used by a lot, here it indicates the spawned Eye Tentacle goes boom after 5 seconds
if args:IsSpell(26586) and DBM:GetCIDFromGUID(args.sourceGUID) == 235668 and self:AntiSpam(5, "EyeTentacleExplosion") then
warnExplosion:Show()
timerExplosion:Start()
end
end

local playerGUID = UnitGUID("player")
function mod:SPELL_MISSED(sourceGUID, _, _, _, destGUID, destName, _, _, _, _, spellSchool, missType)
if (missType == "REFLECT" or missType == "DEFLECT") and sourceGUID == playerGUID and not self:IsTrivial() then
Expand Down
7 changes: 7 additions & 0 deletions DBM-Raids-Vanilla/localization.en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ L:SetGeneralLocalization{
name = "AQ20 Trash"
}

L:SetWarningLocalization{
WarnExplosion = "Explosion in 5 sec"
}
L:SetOptionLocalization{
WarnExplosion = "Show announce for $spell:1214871 (Eye Tentacle AoE)"
}

-----------------
-- Razorgore --
-----------------
Expand Down

0 comments on commit e68f733

Please sign in to comment.