WoWInterface SVN RaidWatch2

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

Compare with Previous | Blame | View Log

local mod = RW:Boss("Mimiron", "Ulduar", "The Keepers of Ulduar")
local L

mod.BossIcon = [[Interface\Icons\inv_misc_bomb_04]]

---------------------------
-- Variables
local tBerserk
local mPhase
-- Phase 1
local tPlasmaBlastCD, tPlasmaBlastCast, tPlasmaBlastDur, wPlasmaBlast
local tNapalmShellDur, iNapalmShell
local tShockBlastCD, tShockBlastCast, wShockBlast
-- Phase 2
local tLaserBarrageCD, tLaserBarrageCast, tLaserBarrageDur, wLaserBarrage
local wRocketStrike
local tFrostBomb, wFrostBomb
-- Phase 3
local tBombBot, wBombBot
local wDeafeningSiren
local tMagneticCoreDur, wMagneticCore
-- Phase 4


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

function mod:OnRegister()
        L = mod:RegisterLocale(self:GetName(), "enUS", true)
        if L then
                L.YellPullNormal = "We haven't much time, friends! You're going to help me test out my latest and greatest creation. Now, before you change your minds, remember that you kind of owe it to me after the mess you made with the XT-002."
                L.YellPullHeroic = "Now, why would you go and do something like that? Didn't you see the sign that said, \"DO NOT PUSH THIS BUTTON!\"? How will we finish testing with the self-destruct mechanism active?"
                L.YellPhase2 = "WONDERFUL! Positively marvelous results! Hull integrity at 98.9 percent! Barely a dent! Moving right along."
                L.YellPhase3 = "Thank you, friends! Your efforts have yielded some fantastic data! Now, where did I put-- oh, there it is."
                L.YellPhase4 = "Preliminary testing phase complete. Now comes the true test!"
                L.YellDeath = "It would appear that I've made a slight miscalculation. I allowed my mind to be corrupted by the fiend in the prison, overriding my primary directive. All systems seem to be functional now. Clear."
                L.phase_change = "Phase %d starting"
                L.phase_change_opt = "Phase Switch timers"
                L.phase_2 = "Phase 2 timer"
                L.phase_3 = "Phase 3 timer"
                L.phase_4 = "Phase 4 timer"
        end

        L = mod:GetLocale()
        self.L = L
        
        self:SetTrigger(L.YellPullNormal, L.YellPullHeroic, 33432)
        self:SetWin(L.YellDeath, 33432)
        
        --self:AddToCategory("Phase 1", "Phase 2", "Phase 3", "Phase 4")
        self:AddToCategory("Phase 1", 64529, 63666, 63631)
        self:AddToCategory("Phase 2", 63274, 63414, 63041, 64626)
        self:AddToCategory("Phase 3", 63811, 64616, 64444)
        self:AddToCategory("Phase 4", 64383)
        
        tBerserk = self:BerserkTimer(900)
        tP1P2 = self:CustomTimer(40, L.phase_change, L.phase_2, 63131, L.phase_change_opt)
        tP2P3 = self:CustomTimer(25, L.phase_change, L.phase_3, 63132, L.phase_change_opt)
        tP3P4 = self:CustomTimer(25, L.phase_change, L.phase_4, [[Interface\Icons\Achievement_PVP_A_04.blp]], L.phase_change_opt)
        
        mPhase = self:PhaseMessage()
        
-- Phase 1
        tPlasmaBlastCD, tPlasmaBlastCast, tPlasmaBlastDur, wPlasmaBlast = self:CDTimer(21, 64529), self:CastTimer(64529), self:DurTimer(6, 64529), self:CastWarning(64529)
        tNapalmShellDur, iNapalmShell = self:DurTimer(6, 63666), self:Icon("SKULL", 63666, false, 6, "CROSS", "SQUARE", "MOON")
        tShockBlastCD, tShockBlastCast, wShockBlast = self:CDTimer(30, 63631), self:CastTimer(63631), self:RunawayWarning(63631)
-- Phase 2
        tLaserBarrageCD, tLaserBarrageCast, tLaserBarrageDur, wLaserBarrage = self:CDTimer(41, 63274), self:CastTimer(4, 63414), self:DurTimer(10, 63274), self:RunawayWarning(63414)
        wRocketStrike = self:CastWarning(63041)
        tFrostBomb, wFrostBomb = self:DurTimer(14, 64626), self:CastWarning(64626)
-- Phase 3
        tBombBot, wBombBot = self:CastTimer(63811), self:CastWarning(63811)
        wDeafeningSiren = self:Warning(64616)
        tMagneticCoreDur, wMagneticCore = self:DurTimer(20, 64444), self:CastWarning(64444)
-- Phase 4
        tSelfRepairDur = self:DurTimer(15, 64383)

end

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


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

function mod:OnEngage(trigger)
        self:Track("PlasmaBlast", 64529, 62997)
        self:Track("NapalmShell", 63666, 65026)
        self:Track("ShockBlast", 63631)
        
        self:Track("LaserBarrage", 63414)
        self:Track("RocketStrike", 63041)
        self:Track("FrostBomb", 64623, 64627)
        
        self:Track("BombBot", 63811)
        self:Track("DeafeningSiren", 64616)
        self:Track("MagneticCore", 64444)
        
        self:Track("SelfRepair", 64383)
        
        self:YellTrack("Phase2", L.YellPhase2)
        self:YellTrack("Phase3", L.YellPhase3)
        self:YellTrack("Phase4", L.YellPhase4)

        if trigger == L.YellPullHeroic then
                tBerserk:Start(610)
        else
                tBerserk:Start()
        end

        RW.Callbacks:Fire("MPBHealthByID", 33432)
end

---------- Phase 1
function mod:PlasmaBlast(event, args)
        if event == "SPELL_CAST_START" then
                tPlasmaBlastCast:Start()
                wPlasmaBlast:Show()
        end
        if event == "SPELL_AURA_APPLIED" then
                tPlasmaBlastDur:Start()
        end
        if event == "SPELL_AURA_REMOVED" then
                tPlasmaBlastCD:Start()
        end
end

function mod:NapalmShell(event, args)
        if event == "SPELL_AURA_APPLIED" then
                tNapalmShellDur:Start()
                iNapalmShell:Show(args.dName)
        end
end

function mod:ShockBlast(event, args)
        if event == "SPELL_CAST_START" then
                tShockBlastCast:Start()
                wShockBlast:Show()
                tShockBlastCD:Schedule(4)
        end
end     

---------- Phase 2
function mod:Phase2(event, msg, name)
        tPlasmaBlastCD:Stop()
        tShockBlastCD:Stop()
        tP1P2:Start(nil, 2)
        mPhase:Schedule(40, 2)
        
        RW.Callbacks:Fire("MPBHideAll")
        RW.Callbacks:Fire("MPBHealthByID", 33651)
end

function mod:LaserBarrage(event, args)
        if event == "SPELL_CAST_SUCCESS" then
                tLaserBarrageCast:Start()
                tLaserBarrageDur:Schedule(4)
                tLaserBarrageCD:Schedule(14)
                wLaserBarrage:Show()
        end
end

function mod:RocketStrike(event, args)
        if event == "SPELL_CAST_SUCCESS" then
                wRocketStrike:Show()
        end
end

function mod:FrostBomb(event, args)
        if event == "SPELL_CAST_START" then
                tFrostBomb:Start()
                wFrostBomb:Show()
        end
end     

------------ Phase 3
function mod:Phase3(event, msg, name)
        tLaserBarrageCD:Stop()
        tP2P3:Start(nil, 3)
        mPhase:Schedule(25, 3)
        
        RW.Callbacks:Fire("MPBHideAll")
        RW.Callbacks:Fire("MPBHealthByID", 33670)
        SetLootMethod("freeforall")
end

function mod:BombBot(event, args)
        if event == "SPELL_CAST_START" then
                tBombBot:Start()
                wBombBot:Show()
        end
end

function mod:DeafeningSiren(event, args)
        if event == "SPELL_AURA_APPLIED" then
                if args:IsPlayer() then
                        wDeafeningSiren:Show(args.dName)
                end
        end
end

function mod:MagneticCore(event, args)
        if event == "SPELL_CAST_SUCCESS" then
                tMagneticCoreDur:Start()
                wMagneticCore:Show()
        end
end

------------ Phase 4
function mod:Phase4(event, msg, name)
        tP3P4:Start(nil, 4)
        mPhase:Schedule(25, 4)
        SetLootMethod("group")
        RW.Callbacks:Fire("MPBHideAll")
        RW.Callbacks:Fire("MPBHealthByID", 33670)
        RW.Callbacks:Fire("MPBHealthByID", 33651)
        RW.Callbacks:Fire("MPBHealthByID", 33432)
end

function mod:SelfRepair(event, args)
        if event == "SPELL_AURA_APPLIED" then
                tSelfRepairDur:Start()
        end
end

Compare with Previous | Blame