WoWInterface SVN RaidWatch2

[/] [trunk/] [RaidWatch_Ulduar/] [Algalon.lua] - Rev 22

Compare with Previous | Blame | View Log

local mod = RW:Boss("Algalon the Observer", "Ulduar", "Celestial Planetarium")
local L

mod.BossIcon = [[Interface\Icons\achievement_boss_algalon_01]]
mod.SubCatIcon = [[Interface\Icons\spell_shadow_mindtwisting]]

---------------------------
-- Variables
local tBigBangCD, tBigBangCast, wBigBang
local tSmashCD, tSmashCast, wSmash
local tPunchCD, tPunchDur, mPunch
local tBerserk


---------------------------
-- Init

function mod:OnRegister()
        L = mod:RegisterLocale(self:GetName(), "enUS", true)
        if L then
                L.YellPull = "Your actions are illogical. All possible results for this encounter have been calculated. The Pantheon will receive the Observer's message regardless of outcome."
                L.YellPullFirst = "See your world through my eyes: A universe so vast as to be immeasurable - incomprehensible even to your greatest minds."
                L.YellWin = "I have seen worlds bathed in the Makers' flames."          
        end

        L = mod:GetLocale()
        self.L = L
        
        self:SetTrigger(32871, L.YellPull, L.YellPullFirst)
        self:SetWin(L.YellWin, 32871)

        tBigBangCD              = self:CDTimer(91, 64584)
        tBigBangCast    = self:CastTimer(64584)
        tSmashCD                = self:CDTimer(20.5, 64596)
        tSmashCast              = self:CastTimer(4.5, 64596)
        tPunchCD                = self:CDTimer(16, 64412, nil, nil, false)
        tPunchDur               = self:DurTargetStackTimer(45, 64412, nil, nil, false)
        
        mPunch                  = self:TargetStackMessage(64412)
        
        wSmash                  = self:CastWarning(64596)
        wBigBang                = self:RunawayWarning(64584)

        tBerserk = self:BerserkTimer(367)
end

---------------------------
-- Locals

---------------------------
-- Start

function mod:OnEngage(trigger)
        self:Track("CosmicSmash", 62301, 64598)
        self:Track("BigBang", 64584, 64443)
        self:Track("PhasePunch", 64412)

        self:YellTrack("FirstPull", L.YellPullFirst)    
        
        tBigBangCD:Start(97)
        tSmashCD:Start(32)
        tBerserk:Start()
end

function mod:CosmicSmash(event, args)
        if event == "SPELL_CAST_SUCCESS" then
                tSmashCast:Start()
                tSmashCD:Schedule(4.5)
                wSmash:Show()
        end
end

function mod:BigBang(event, args)
        if event == "SPELL_CAST_START" then
                tBigBangCast:Start()
                wBigBang:Show()
                tBigBangCD:Start()
        end
end

function mod:PhasePunch(event, args)
        if event == "SPELL_AURA_APPLIED" or event == "SPELL_AURA_APPLIED_DOSE" then
                tPunchCD:Start()
                tPunchDur:Start(args.dName, args.amount or 1)
                mPunch:Show(args.dName, args.amount or 1)
        end
end

function mod:FirstPull(event, msg)
        tBigBangCD:Start(101)
        tSmashCD:Start(42)
        tBerserk:Start(377)
end

Compare with Previous | Blame