Compare with Previous | Blame | View Log
local mod = RW:Boss("Freya", "Ulduar", "The Keepers of Ulduar") local L mod.BossIcon = [[Interface\Icons\achievement_boss_freya_01]] --------------------------- -- Variables local tTremorCD, tTremorCast local wTremor local tUnstableCD, wUnstable local tNatureDur, iNature local wNature local iRoots local tNextAllies local tSimKill local tBerserk --------------------------- -- Init function mod:OnRegister() L = mod:RegisterLocale(self:GetName(), "enUS", true) if L then L.YellPull = "The Conservatory must be protected!" L.YellDeath = "His hold on me dissipates. I can see clearly once more. Thank you, heroes." L.YellTrio = "Children, assist me!" L.nextallies_msg = "Wave %d spawning" L.nextallies_subopt = "Wave count" L.nextallies_opt = "Next Wave bar" L.sim_kill = "Adds revive" end L = mod:GetLocale() self.L = L self:SetTrigger(L.YellPull, 32906) self:SetWin(L.YellDeath, 32906) tTremorCD, tTremorCast = self:CDTimer(28, 62859), self:CastTimer(2, 62859) tUnstableCD, wUnstable = self:CDTimer(25, 62865), self:RunawayWarning(62865) tNatureDur, iNature = self:DurTargetTimer(10, 63571), self:Icon("SKULL", 63571, false, 10) tSimKill = self:DurTimer(12, L.sim_kill, 594, L.sim_kill) tBerserk = self:BerserkTimer(600) wTremor = self:Warning(62859) wNature = self:RunawayWarning(63571) iRoots = self:Icon("MOON", 62861, false, 20, "SQUARE", "CROSS") tNextAllies = self:CustomTimer(60, L.nextallies_msg, L.nextallies_subopt, 33831, L.nextallies_opt) end --------------------------- -- Locals local firstKilled = false local killedCount = 0 local waveCount = 1 local icon = 5 local addsAlive --------------------------- -- Start function mod:OnEngage(trigger) self:Track("GroundTremor", 62859, 62437) self:Track("UnstableEnergy", 62451, 62865) self:Track("IronRoots", 62861, 62438) self:Track("NaturesFury", 62589, 63571) self:Track("SummonAlliesofNature", 62678) self:YellTrack("Trio", L.YellTrio) self:DeathTrack("SimKill", 33202, 32916, 32919) tBerserk:Start() firstKilled = false addsAlive = 0 killedCount = 0 waveCount = 2 icon = 5 end function mod:GroundTremor(event, args) if event == "SPELL_CAST_START" then tTremorCast:Start() wTremor:Show() tTremorCD:Schedule(2) end end function mod:UnstableEnergy(event, args) if event == "SPELL_CAST_SUCCESS" then tUnstableCD:Start() end if event == "SPELL_AURA_APPLIED" then if args:IsPlayer() then wUnstable:Show() end end end function mod:IronRoots(event, args) if event == "SPELL_AURA_APPLIED" then if args.dName == self.pName then SendChatMessage("Roots on me!", "SAY") end iRoots:Show(args.dName) elseif event == "SPELL_AURA_REMOVED" then iRoots:Hide(args.dName) end end function mod:NaturesFury(event, args) if event == "SPELL_AURA_APPLIED" then if args:IsPlayer() then wNature:Show() end tNatureDur:Start(args.dName) iNature:Show(args.dName) end if event == "SPELL_AURA_REMOVED" then iNature:Hide(args.dName) end end function mod:SummonAlliesofNature(event, args) if event == "SPELL_CAST_SUCCESS" then if waveCount < 6 then tNextAllies:Stop() tNextAllies:Start(nil, waveCount) waveCount = waveCount + 1 end end end function mod:Trio(event, msg, name) RW.Callbacks:Fire("MPBHealthByID", 33202) RW.Callbacks:Fire("MPBHealthByID", 32916) RW.Callbacks:Fire("MPBHealthByID", 32919) addsAlive = 3 end function mod:SimKill(cID) addsAlive = addsAlive - 1 if not firstKilled then tSimKill:Start() firstKilled = true end if addsAlive < 1 then RW.Callbacks:Fire("MPBHealthHideByID", 33202) RW.Callbacks:Fire("MPBHealthHideByID", 32916) RW.Callbacks:Fire("MPBHealthHideByID", 32919) tSimKill:Stop() firstKilled = false return end end