Skip to content

Commit

Permalink
BT - Akama
Browse files Browse the repository at this point in the history
  • Loading branch information
Waini4 committed Jan 25, 2024
1 parent 7feb418 commit 1dba50d
Showing 1 changed file with 75 additions and 17 deletions.
92 changes: 75 additions & 17 deletions DBM-BlackTemple/ShadeOfAkama.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local mod = DBM:NewMod("Akama", "DBM-BlackTemple")
local L = mod:GetLocalizedStrings()

mod:SetRevision("20240117155828")
mod:SetRevision("20240125080528")
mod:SetCreatureID(22841)

mod:SetModelID(21357)
Expand All @@ -10,11 +10,11 @@ mod:RegisterCombat("combat")
--mod:SetWipeTime(50)--Adds come about every 50 seconds, so require at least this long to wipe combat if they die instantly

mod:RegisterEventsInCombat(
"SPELL_AURA_APPLIED 322728 322748 322747 322746 322745 322749 371509",
"SPELL_AURA_APPLIED 322728 322748 322747 322746 322745 322749 371509 322732 322734",
"SPELL_AURA_APPLIED_DOSE",
"SPELL_AURA_REMOVED 322728 371509",
"SPELL_CAST_START 322727 322728 322731 371519",
"SPELL_CAST_SUCCESS 371507",
"SPELL_AURA_REMOVED 322728 371509 322732",
"SPELL_CAST_START 322727 322728 322731 322737 371519",
"SPELL_CAST_SUCCESS 371507 371511",
"SPELL_INTERRUPT ",
"SPELL_SUMMON",
"CHAT_MSG_RAID_BOSS_EMOTE",
Expand All @@ -28,12 +28,18 @@ mod:RegisterEvents(
--local warnPhase2 = mod:NewPhaseAnnounce(2)
--local warnDefender = mod:NewAnnounce("warnAshtongueDefender", 2, 41180)
--local warnSorc = mod:NewAnnounce("warnAshtongueSorcerer", 2, 40520)
local warnPhase = mod:NewPhaseChangeAnnounce(2, nil, nil, nil, nil, nil, 2)


local specWarnShadowclean = mod:NewSpecialWarningInterrupt(322727, "HasInterrupt", nil, nil, 1, 2)
local specWarnDevastating = mod:NewSpecialWarningInterrupt(371519, "HasInterrupt", nil, nil, 1, 2)
local specWarnFadeDebuff = mod:NewSpecialWarningAddsCustom(40476, nil, nil, nil, 1, 2)
local specWarnMind = mod:NewSpecialWarningSpell(322728, nil, nil, nil, 1, 3)
local specWarnWave = mod:NewSpecialWarningSpell(371507, nil, nil, nil, 1, 3)
local specWarnReflect = mod:NewSpecialWarningSpell(371509, nil, nil, nil, 2, 3)
local specWarnReflect = mod:NewSpecialWarningReflect(371509, nil, nil, nil, 2, 3)
--local specWarnClean = mod:NewSpecialWarningSpell(371511, nil, nil, nil, 1, 3)
local specWarnInferno = mod:NewSpecialWarningCast(322737, nil, nil, nil, 1, 2)


local warnDominateMind = mod:NewTargetAnnounce(322728, 3)

Expand All @@ -47,23 +53,28 @@ local timerAddsCD = mod:NewAddsCustomTimer(70, 40474)--NewAddsCustomTimer
local timerPlagueCD = mod:NewCDTimer(32, 322731, nil, nil, nil, 5) --чума (должна диспелится)
local timerDominateMindCD = mod:NewCDTimer(48, 322728, nil, nil, nil, 3)
local timerShadowcleanCD = mod:NewCDTimer(13.5, 322727, nil, nil, nil, 4) --масс диспел
--local timercleanCD = mod:NewCDTimer(15, 371511, nil, nil, nil, 4) --диспел 5 челов

local timerDispelAkama = mod:NewNextCountTimer(45, 322743, nil, nil, nil, 1)
local timerWaveCD = mod:NewCDTimer(7, 371507, nil, nil, nil, 3)
local timerReflect = mod:NewCDTimer(12, 371509, nil, nil, nil, 3)
local timerInferno = mod:NewCDTimer(20, 322737, nil, nil, nil, 3)
local timerReflectBuff = mod:NewBuffActiveTimer(3, 371509, nil, nil, nil, 3)
local berserkTimer = mod:NewBerserkTimer(360)
local berserkTimer = mod:NewBerserkTimer(720)
local Stage2 = mod:NewPhaseTimer(360, nil, "Фаза: %d", nil, nil, 4)

--mod:AddBoolOption("SetNecromancerIcon")
mod:AddNamePlateOption("Nameplate1", 371509, true)
mod:AddNamePlateOption("Nameplate2", 322732, true)
mod:AddSetIconOption("SetIconOnBeacon", 322748, true, true, { 1, 2, 3, 4, 5, 6, 7, 8 })
mod:AddSetIconOption("SetIconOnDominateMind", 322728, true, false, {4, 5, 6})

--mod.vb.NecromancerIcon = 1
mod.vb.NecromancerIcon = 1
mod.vb.AddsWestCount = 0
mod.vb.AddsLoop = 0
mod.vb.ControlAkama = 0
local dominateMindTargets = {}
mod.vb.dominateMindIcon = 6
--mod.vb.dominateMindIcon = 6
--local Adds = {}
--local addsCount = {70, 50}
local addsLoops = {50, 60}
Expand Down Expand Up @@ -142,7 +153,20 @@ local function showDominateMindWarning(self)
end
end


--[[
local function addsWestLoop(self)
self.vb.AddsWestCount = self.vb.AddsWestCount + 1
specWarnAdds:Show(DBM_COMMON_L.WEST)
specWarnAdds:Play("killmob")
specWarnAdds:ScheduleVoice(1, "west")
if self.vb.AddsWestCount == 2 then--Special
self:Schedule(51, addsWestLoop, self)
timerAddsCD:Start(51, DBM_COMMON_L.WEST)
else
self:Schedule(47, addsWestLoop, self)
timerAddsCD:Start(47, DBM_COMMON_L.WEST)
end
end]]

local function addsLoop(self)
self.vb.AddsWestCount = self.vb.AddsWestCount+1
Expand All @@ -161,15 +185,28 @@ local function addsLoop(self)
end
end
end
--[[
local function sorcLoop(self)
warnSorc:Show()
self:Schedule(25, sorcLoop, self)
timerSorcCD:Start(25)
end
local function defenderLoop(self)
warnDefender:Show()
self:Schedule(30, defenderLoop, self)
timerDefenderCD:Start(30)
end]]

function mod:OnCombatStart(delay)
DBM:FireCustomEvent("DBM_EncounterStart", 22841, "Shade of Akama")
self:SetStage(1)
self.vb.AddsWestCount = 0
self.vb.AddsLoop = 0
self.vb.dominateMindIcon = 6
--self.vb.dominateMindIcon = 6
self.vb.ControlAkama = 0
berserkTimer:Start()
Stage2:Start(nil, 2)
timerDispelAkama:Start(nil, self.vb.ControlAkama)
timerDominateMindCD:Start(30)
self:Schedule(10, addsLoop, self)
Expand Down Expand Up @@ -203,13 +240,19 @@ function mod:SPELL_CAST_START(args)
if self:CheckInterruptFilter(args.sourceGUID, false, true) then
specWarnDevastating:Show(args.sourceName)
end
elseif args:IsSpellID(322737) then
specWarnInferno:Show()
timerInferno:Start()
end
end

function mod:SPELL_CAST_SUCCESS(args)
--[[ if args.spellId == 371507 and self:AntiSpam(2,2) then
--[[if args:IsSpellID(371507) and self:AntiSpam(2,2) then
specWarnWave:Show()
timerWaveCD:Start()
if args:IsSpellID(371511) then
specWarnClean:Show()
timercleanCD:Start()
end]]
end

Expand Down Expand Up @@ -263,6 +306,14 @@ function mod:SPELL_AURA_APPLIED(args)
if self.Options.Nameplate1 then
DBM.Nameplate:Show(args.destGUID, 371509, 3)
end
elseif args:IsSpellID(322732) then
if self.Options.Nameplate2 then
DBM.Nameplate:Show(args.destGUID, 322732)
end
elseif args:IsSpellID(322734) then
warnPhase:Show()
timerInferno:Start(15)
self:NextStage()
end
end

Expand All @@ -271,6 +322,7 @@ function mod:SPELL_AURA_REMOVED(args)
local spellId = args.spellId
if spellId == 34189 and args:GetDestCreatureID() == 23191 then--Coming out of stealth (he's been activated)
timerCombatStart:Start()
self:SendSync("StartAkam")
elseif args:IsSpellID(322728) then
if (args.destName == UnitName("player") or args:IsPlayer()) and self.Options.EqUneqWeapons and self:IsDps() then
self:ScheduleMethod(0.1, "EqW")
Expand All @@ -285,6 +337,10 @@ function mod:SPELL_AURA_REMOVED(args)
if self.Options.Nameplate1 then
DBM.Nameplate:Hide(args.destGUID, 320374)
end
elseif args:IsSpellID(322732) then
if self.Options.Nameplate2 then
DBM.Nameplate:Hide(args.destGUID, 322732)
end
end
end

Expand All @@ -296,10 +352,6 @@ function mod:CHAT_MSG_RAID_BOSS_EMOTE(msg, mob)
end
end

--[[
function mod:UNIT_TARGET()
end]]

--[[
function mod:SWING_DAMAGE(_, sourceName)
Expand Down Expand Up @@ -337,4 +389,10 @@ function mod:UNIT_DIED(args)
if self:GetCIDFromGUID(args.destGUID) == 22841 then
DBM:EndCombat(self)
end
end
end

function mod:OnSync(event, args)
if event == "StartAkam" then
timerCombatStart:Start()
end
end

0 comments on commit 1dba50d

Please sign in to comment.