This commit is contained in:
Andrew6810
2022-10-21 06:50:13 -07:00
parent 8571e98fb1
commit 39c0ed874e
466 changed files with 52263 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
## Interface: 30300
## Title:|cffffe00a<|r|cffff7d0aDBM|r|cffffe00a>|r |cff69ccf0Onyxia|r
## LoadOnDemand: 1
## RequiredDeps: DBM-Core
## SavedVariablesPerCharacter: DBMOnyxia_SavedVars, DBMOnyxia_SavedStats
## X-DBM-Mod: 1
## X-DBM-Mod-Category: Vanilla
## X-DBM-Mod-Has-Heroic-Mode: 0
## X-DBM-Mod-Sort: 112
## X-DBM-Mod-Name: Onyxia's Lair
## X-DBM-Mod-LoadZone: Onyxia's Lair
localization.en.lua
Onyxia.lua
+158
View File
@@ -0,0 +1,158 @@
local mod = DBM:NewMod("Onyxia", "DBM-Onyxia")
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 3763 $"):sub(12, -3))
mod:SetCreatureID(10184)
mod:RegisterCombat("combat")
mod:RegisterEvents(
"CHAT_MSG_MONSTER_YELL",
"CHAT_MSG_RAID_BOSS_EMOTE",
"SPELL_CAST_START",
"UNIT_HEALTH",
"PLAYER_ALIVE"
)
local warnPhase2 = mod:NewPhaseAnnounce(2)
local warnPhase3 = mod:NewPhaseAnnounce(3)
local warnPhase2Soon = mod:NewAnnounce("Phase 2 Soon", 1)
local warnPhase3Soon = mod:NewAnnounce("Phase 3 Soon", 1)
local warnFireball = mod:NewTargetAnnounce(2105160, 3)
local warnBlastNova = mod:NewCastAnnounce(2105147, 2)
local WarnWhelpsSoon = mod:NewAnnounce("Onyxian Whelps soon", 1)
local specWarnDeepBreath = mod:NewSpecialWarningMove(18609, 2)
local specWarnFireballYou = mod:NewSpecialWarningYou(2105160, 2)
local timerBreath = mod:NewCastTimer(8, 17086)
local timerBlastNova = mod:NewCastTimer(4, 2105147)
local timerBellowingRoar = mod:NewCastTimer(4, 18431)
local timerFireball = mod:NewCastTimer(4, 2105160)
local timerWhelps = mod:NewTimer(95, "Onyxian Whelps", "Interface\\Icons\\INV_Misc_Head_Dragon_Red")
local timerNextDeepBreath = mod:NewCDTimer(75, 17086)--Range from 75-80 seconds in between based on where she moves to.
local timerNextBellowingRoar= mod:NewCDTimer(45, 18431)
local timerNextBlastNova = mod:NewCDTimer(32, 2105147)-- +/- a few seconds as it varies depending on Guard movement.
local timerIntBlastNova = mod:NewCDTimer(40, 2105147)-- Internal CD for a Guard to cast Blast Nova twice
-- local timerIntBlastNova2 = mod:NewCDTimer(40, 2105147)-- second one for secondary add
local lastBlastNova = 0
local prewarnP2
local warnP2
local prewarnP3
local warnP3
mod:AddBoolOption(L.FireballMark)
function mod:preP2()
warnPhase2Soon:Show()
end
function mod:alertP2()
warnPhase2:Show()
end
function mod:preP3()
warnPhase3Soon:Show()
end
function mod:alertP3()
warnPhase3:Show()
end
function mod:WhelpsSpawn()
self:UnscheduleMethod("WhelpsSpawn")
WarnWhelpsSoon:Show()
timerWhelps:Start()
self:ScheduleMethod(95,"WhelpsSpawn")
end
function mod:OnCombatStart(delay)
prewarnP2 = 0
warnP2 = 0
prewarnP3 = 0
warnP3 = 0
end
function mod:CHAT_MSG_MONSTER_YELL(msg)
if msg == L.YellP2 or msg:find(L.YellP2) then
timerNextDeepBreath:Start(77)
timerNextBlastNova:Start()
self:ScheduleMethod(2,"WhelpsSpawn")
elseif msg == L.YellP3 or msg:find(L.YellP3) then
timerNextDeepBreath:Stop()
timerNextBlastNova:Stop()
timerIntBlastNova:Stop()
self:UnscheduleMethod("WhelpsSpawn")
self:ScheduleMethod(2,"WhelpsSpawn")
timerNextBellowingRoar:Start(8)
end
end
function mod:CHAT_MSG_RAID_BOSS_EMOTE(msg)
if msg == L.EmoteDeepBreath or msg:find(L.EmoteDeepBreath) then
specWarnDeepBreath:Show()
timerBreath:Start()
timerNextDeepBreath:Stop()
timerNextDeepBreath:Start()
end
end
function mod:MassiveFireball()
local target = nil
target = mod:GetBossTarget(10184)
local myName = UnitName("player")
if target == myName then
specWarnFireballYou:Show()
else
warnFireball:Show(target)
end
timerFireball:Start(target)
if self.Options.FireballMark then
self:SetIcon(target, 8, 3)
end
end
function mod:SPELL_CAST_START(args)
if args:IsSpellID(2105158, 2105159, 2105160, 2105161) then
self:ScheduleMethod(0.4, "MassiveFireball")
end
if args:IsSpellID(2105145, 2105146, 2105147, 2105148) then
warnBlastNova:Show()
timerBlastNova:Start()
timerNextBlastNova:Start()
if GetTime() - lastBlastNova > 20 then --Trying it to only trigger from new Add Blast Nova.
timerIntBlastNova:Start()
end
lastBlastNova = GetTime()
end
if args:IsSpellID(18431) then
timerBellowingRoar:Start()
timerNextBellowingRoar:Stop()
timerNextBellowingRoar:Start()
end
--if args:IsSpellID(17086, 18351, 18564, 18576) or args:IsSpellID(18584, 18596, 18609, 18617) then -- 1 ID for each direction
-- specWarnDeepBreath:Show() -- potentially deprecated because all new spell IDs
-- timerBreath:Start()
-- timerNextDeepBreath:Stop()
-- timerNextDeepBreath:Start()
--end
end
function mod:UNIT_HEALTH(uId)
if self:GetUnitCreatureId(uId) == 10184 and UnitHealth(uId) / UnitHealthMax(uId) <= 0.90 and prewarnP2 == 0 then
prewarnP2 = 1
self:ScheduleMethod(0, "preP2")
elseif self:GetUnitCreatureId(uId) == 10184 and UnitHealth(uId) / UnitHealthMax(uId) <= 0.85 and warnP2 == 0 then
warnP2 = 1
self:ScheduleMethod(0, "alertP2")
elseif self:GetUnitCreatureId(uId) == 10184 and UnitHealth(uId) / UnitHealthMax(uId) <= 0.40 and prewarnP3 == 0 then
prewarnP3 = 1
self:ScheduleMethod(0, "preP3")
elseif self:GetUnitCreatureId(uId) == 10184 and UnitHealth(uId) / UnitHealthMax(uId) <= 0.35 and warnP3 == 0 then
warnP3 = 1
self:ScheduleMethod(0, "alertP3")
end
end
+36
View File
@@ -0,0 +1,36 @@
local L
--------------
-- Onyxia --
--------------
L = DBM:GetModLocalization("Onyxia")
L:SetGeneralLocalization{
name = "Onyxia"
}
L:SetWarningLocalization{
WarnWhelpsSoon = "Onyxian Whelps soon",
WarnPhase2Soon = "Phase 2 soon",
WarnPhase3Soon = "Phase 3 soon"
}
L:SetTimerLocalization{
TimerWhelpsSoon = "Onyxian Whelps"
}
L:SetOptionLocalization{
WarnWhelpsSoon = "Show pre-warning for Onyxian Whelps",
WarnWhelps ="Show warning for Onyxian Whelps spawning",
SoundWTF = "Play some funny sounds from a legendary classic Onyxia raid",
WarnPhase2Soon = "Show pre-warning for Phase 2 (at ~90%)",
WarnPhase3Soon = "Show pre-warning for Phase 3 (at ~40%)",
FireballMark = DBM_CORE_AUTO_ICONS_OPTION_TEXT:format(2105161)
}
L:SetMiscLocalization{
YellP2 = "This meaningless exertion bores me. I'll incinerate you all from above!",
YellP3 = "It seems you'll need another lesson, mortals!",
EmoteDeepBreath = "%s takes in a deep breath..."
}