--KyokiShinsa note
--I pulled this file from a Japanese friend a few years ago. I supposed they copied it from Kid.
--Since I never fully studied and understood how everything beneath this line works, I left it all untouched until after line 52.

--TaroNuke's Mod system. Taken from Puuro's 'Hopes And Dreams' file.
--Because I don't know how to program a mods system, and I don't want to right now.
LoadActor("mods-taro.lua") --Load another lua file.
return Def.ActorFrame{
  Name= "actor_d",
  Def.Quad{
    Name= "actor_e",
    OnCommand= cmd(sleep,2000),
  },
  Def.Quad{
    Name= "actor_f",
    InitCommand= cmd(diffusealpha,0;queuecommand,"Start"),
    ShooterCommand= function(self)
            beat = GAMESTATE:GetSongBeat()
            for m, mod in ipairs(mods) do
                if (beat >= mod[1] and last_beat < mod[1]) then
                    --GAMESTATE:ApplyGameCommand('mod, ' .. mod[2])
		    for i=1,2 do
		      taronuke_mods(mod[2],i)
		    end
                elseif (beat < mod[1]) then
                    break
                end
            end
            last_beat = beat
	    if beat >= 1068.500 and zoomcommand == 1 then
	      for i=1,2 do
		if SCREENMAN:GetTopScreen():GetChild('PlayerP'..i) then
		  SCREENMAN:GetTopScreen():GetChild('PlayerP'..i):linear(0.034):zoomz(11);--SM5's pretty silly, ain't it? -Kid
		end
	      end
	      zoomcommand = zoomcommand + 1
	    end
	    if beat >= 1069.667 and zoomcommand == 2 then
	      for i=1,2 do
		if SCREENMAN:GetTopScreen():GetChild('PlayerP'..i) then
		  SCREENMAN:GetTopScreen():GetChild('PlayerP'..i):linear(0.034):zoomz(1);
		end
	      end
	      zoomcommand = zoomcommand + 1
	    end
            self:sleep(0.02)
            self:queuecommand('Shooter')
        end,
    StartCommand= function(self)
            last_beat = 0
	    zoomcommand = 1--Yes, I'm doing this. -Kid
            mods = {
         		{16.000, '*10 50% Stealth'},
			{16.500, '*1 0% Stealth'},
			{32.000, '*10 50% Stealth'},
			{32.500, '*1 0% Stealth'},
			{48.000, '*10 50% Stealth'},
			{48.500, '*1 0% Stealth'},
			{64.000, '*10 50% Stealth'},
			{64.500, '*1 0% Stealth'},
			{80.000, '*0.75 100% Dark'},
			{80.000, '*0.75 100% Stealth'},
			{92.000, '*0.75 0% Dark'},
			{92.000, '*0.75 0% Stealth'},
			{96.000, '*0.75 100% Dark'},
			{96.000, '*0.75 100% Stealth'},
			{100.000, '*0.75 0% Dark'},
			{100.000, '*0.75 0% Stealth'},
			{104.000, '*0.75 100% Dark'},
			{104.000, '*0.75 100% Stealth'},
			{108.000, '*0.75 0% Dark'},
			{108.000, '*0.75 0% Stealth'},
         	}
            self:queuecommand('Shooter')
        end,
  },
}