local cond_Ccb_result= not GAMESTATE:IsPlayerEnabled(PLAYER_1)

local cond_Dcb_result= not GAMESTATE:IsPlayerEnabled(PLAYER_2)

local function optional_actor(cond, actor)
	if cond then return actor end
	return Def.Actor{}
end
--Randomly chosen frames. -Kid
local frames = {
    spark1 = 
    {
	{Frame= 0, Delay= 0.04},
	{Frame= 1, Delay= 0.04},
	{Frame= 2, Delay= 0.04},
	{Frame= 3, Delay= 0.04},
	{Frame= 4, Delay= 0.04},
	{Frame= 2, Delay= 0.04},
	{Frame= 0, Delay= 0.04},
	{Frame= 1, Delay= 0.04},
	{Frame= 2, Delay= 0.04},
	{Frame= 3, Delay= 0.04},
	{Frame= 4, Delay= 0.04},
	{Frame= 2, Delay= 0.04},
	{Frame= 0, Delay= 0.04},
	{Frame= 1, Delay= 0.04},
	{Frame= 2, Delay= 0.04},
	{Frame= 3, Delay= 0.04},
	{Frame= 5, Delay= 0.04},
	{Frame= 2, Delay= 0.04},
	{Frame= 0, Delay= 0.04},
	{Frame= 1, Delay= 0.04},
	{Frame= 2, Delay= 0.04},
	{Frame= 3, Delay= 0.04},
	{Frame= 5, Delay= 0.04},
	{Frame= 2, Delay= 0.04},
	{Frame= 0, Delay= 0.04},
	{Frame= 1, Delay= 0.04},
	{Frame= 2, Delay= 0.04},
	{Frame= 3, Delay= 0.04},
	{Frame= 5, Delay= 0.04},
	{Frame= 2, Delay= 0.04},
    },
    spark2 = 
    {
	{Frame= 0, Delay= 0.05},
	{Frame= 1, Delay= 0.05},
	{Frame= 2, Delay= 0.05},
	{Frame= 3, Delay= 0.05},
	{Frame= 4, Delay= 0.05},
	{Frame= 2, Delay= 0.05},
	{Frame= 0, Delay= 0.05},
	{Frame= 1, Delay= 0.05},
	{Frame= 2, Delay= 0.05},
	{Frame= 3, Delay= 0.05},
	{Frame= 5, Delay= 0.05},
	{Frame= 2, Delay= 0.05},
	{Frame= 0, Delay= 0.05},
	{Frame= 1, Delay= 0.05},
	{Frame= 2, Delay= 0.05},
	{Frame= 3, Delay= 0.05},
	{Frame= 5, Delay= 0.05},
	{Frame= 2, Delay= 0.05},
	{Frame= 0, Delay= 0.05},
	{Frame= 1, Delay= 0.05},
	{Frame= 2, Delay= 0.05},
	{Frame= 3, Delay= 0.05},
	{Frame= 5, Delay= 0.05},
	{Frame= 2, Delay= 0.05},
    },
    spark3 = 
    {
	{Frame= 0, Delay= 0.07},
	{Frame= 1, Delay= 0.07},
	{Frame= 2, Delay= 0.07},
	{Frame= 3, Delay= 0.07},
	{Frame= 5, Delay= 0.07},
	{Frame= 2, Delay= 0.07},
	{Frame= 0, Delay= 0.07},
	{Frame= 1, Delay= 0.07},
	{Frame= 2, Delay= 0.07},
	{Frame= 3, Delay= 0.07},
	{Frame= 5, Delay= 0.07},
	{Frame= 2, Delay= 0.07},
	{Frame= 0, Delay= 0.07},
	{Frame= 1, Delay= 0.07},
	{Frame= 2, Delay= 0.07},
	{Frame= 3, Delay= 0.07},
	{Frame= 4, Delay= 0.07},
	{Frame= 2, Delay= 0.07},
    },
}

return Def.ActorFrame{
  Name= "actor_Ecb",
  Def.ActorFrame{
    Name= "actor_Fcb",
    Def.Quad{
      Name= "actor_adb",
      InitCommand= function(self)
		
			--this is where variables go when the simfile starts up
			--function declarations, and things that will never change even
			--if this particular minigame is restarted after being played once before
		
			--for storing if a button is held down
			mawaru_lineac_held = {0,0,0,0,0,0,0,0};
			
			mawaru_lineac_eptr = {1,1}
			mawaru_lineac_enemy = {{},{}}
			
			mawaru_lineac_players = {}
			mawaru_lineac_ammocount = {}
			mawaru_lineac_shotbar = {}
			
			mawaru_lineac_fireang = {0,0}
			
			mawaru_lineac_won = {false,false}
			
			mawaru_lineac_chart = {}
			mawaru_lineac_chart[0] = {
				{240,240,15,80,3},
			}
			mawaru_lineac_chart[1] = {
				{240,240,15,80,5},
				{95,315,0,0,1},
			}
			mawaru_lineac_chart[2] = {
				{140,280,50,10,10},
				{240,240,15,80,8},
				{200,170,5,20,6},
			}
			mawaru_lineac_chart[3] = {
				{140,280,50,10,10},
				{240,240,15,80,8},
				{200,170,5,20,6},
				{95,315,0,0,1},
			}
			mawaru_lineac_chart[4] = {
				{140,280,50,10,8},
				{200,240,80,60,6},
				{260,320,-10,20,4},
				{95,315,0,0,1},
				{80,120,30,-50,7},
			}
			mawaru_lineac_chart[5] = {
				{140,280,50,10,8},
				{200,240,80,60,6},
				{260,320,-10,20,4},
				{120,315,-20,-20,2},
				{80,120,30,-50,7},
				{160,230,150,-150,5},
			}
			
			function mawaru_lineac_linedist(ax, ay, bx, by, px, py)
				local normalLength = math.sqrt((bx-ax)*(bx-ax)+(by-ay)*(by-ay))
				local distance = ((px - ax) * (by-ay) - (py - ay) * (bx - ax)) / normalLength;
				return math.abs(distance);
			end
			
			function mawaru_lineac_fire(pn)
				local ang = mawaru_lineac_fireang[pn]
				local ax = 160+144*math.sin(math.rad(ang))
				local ay = 240-144*math.cos(math.rad(ang))
				local bx = 160+144*math.sin(math.pi+math.rad(ang))
				local by = 240-144*math.cos(math.pi+math.rad(ang))
				
				--[[
				Trace('Dist from test point 1: '..mawaru_lineac_linedist(ax,ay,bx,by,160,240));
				Trace('Dist from test point 2: '..mawaru_lineac_linedist(ax,ay,bx,by,100,240));
				Trace('Dist from test point 3: '..mawaru_lineac_linedist(ax,ay,bx,by,220,240));
				Trace('Dist from test point 4: '..mawaru_lineac_linedist(ax,ay,bx,by,160,180));
				Trace('Dist from test point 5: '..mawaru_lineac_linedist(ax,ay,bx,by,160,300));
				Trace('Dist from test point 6: '..mawaru_lineac_linedist(ax,ay,bx,by,160-45,240-45));
				]]
				
				local chart = mawaru_lineac_chart[mawaru_difficulty[pn]]
				for i=1,table.getn(chart) do
					local a = mawaru_lineac_enemy[pn][i]
					if a and a:getaux() < 2 then
						if mawaru_lineac_linedist(ax,ay,bx,by,a:GetX(),a:GetY()) < 8+12 then
							a:aux(3);
							a:linear(.08)
							a:zoom(0.7);
							a:diffuse(1,0,0,1);
							a:linear(.2);
							a:rotationz(360);
							a:zoom(0);
							Sound('virus');
							mawaru_lineac_score[pn] = mawaru_lineac_score[pn]+1
						end
					end
				end
				
				if mawaru_lineac_score[pn] >= table.getn(chart) then
					mawaru_lineac_won[pn] = true;
				end
				
				Trace('Score: '..mawaru_lineac_score[pn])
				
			end
			
			mawaru_lineac_shotsleft = {3,3}
			mawaru_lineac_shotdelay = 0.6;
			mawaru_lineac_shotwait = {0,0}
			mawaru_lineac_shots = {}
			
			mawaru_lineac_ang = {-30,30}
			mawaru_lineac_accel = .2
			mawaru_lineac_maxspd = 5;
			mawaru_lineac_xspd = {0,0}
			
			mawaru_lineac_score = {0,0}
			
			mawaru_lineac_lastcheck = {false,false}
			
		end,
      KillCommand= function(self)
			--any cleanup, if necessary
		end,
      StartCommand= function(self)
			
			--variables set up when a game is started
			--wait 2 seconds (for the curtain or whatever) before accepting any inputs
			mawaru_lineac_lockinput = {.3,.3};
			
			self:sleep(0.02);
			self:queuecommand('Update');

		end,
      UpdateCommand= function(self)
			
			--game logic
			
			for pn=1,2 do
			
				if GAMESTATE:IsPlayerEnabled(pn-1) then
				
					local beat = GAMESTATE:GetSongBeat()
					
					local chart = mawaru_lineac_chart[mawaru_difficulty[pn]]
					for i=1,table.getn(chart) do
						local a = mawaru_lineac_enemy[pn][i]
						if a and a:getaux() < 2 then
							a:visible(true);
							a:aux(1);
							a:zoom(0.5);
							a:x(chart[i][1]+chart[i][3]*math.sin(beat*math.pi/chart[i][5]))
							a:y(chart[i][2]+chart[i][4]*math.sin(beat*math.pi/chart[i][5]))
						end
					end
					
					if not mawaru_lineac_lastcheck[pn] then
						if mawaru_lineac_score == table.getn(chart) then
							mawaru_score[pn] = mawaru_score[pn]+5;
							mawaru_misc_score[pn] = mawaru_misc_score[pn]+5;
							MESSAGEMAN:Broadcast('MawaRightP'..pn);
							GoodSound()
						end
					end
				
					if mawaru_lineac_lockinput[pn]>0 then
						mawaru_lineac_lockinput[pn] = mawaru_lineac_lockinput[pn]-0.02
					end
					
					if mawaru_lineac_shotwait[pn] > 0 then
						mawaru_lineac_shotwait[pn] = mawaru_lineac_shotwait[pn]-0.02
					end
				
					local bpn = pn-1;
						
					----------------------handle button presses-------------------
					if mawaru_lineac_lockinput[pn] <= 0 then
						if mawaru_keys[3+(bpn*4)] == 1 and mawaru_lineac_held[3+(bpn*4)] == 0 then
							--fire
							if mawaru_lineac_shotsleft[pn] > 0 and mawaru_lineac_shotwait[pn] <= 0 then
								Sound('laser');
								mawaru_lineac_shots[pn]:x(160+144*math.sin(math.rad(mawaru_lineac_ang[pn])))
								mawaru_lineac_shots[pn]:y(240-144*math.cos(math.rad(mawaru_lineac_ang[pn])))
								mawaru_lineac_shots[pn]:rotationz(mawaru_lineac_ang[pn])
								MESSAGEMAN:Broadcast('LinFP'..pn);
								mawaru_lineac_shotwait[pn] = mawaru_lineac_shotdelay;
								mawaru_lineac_shotsleft[pn] = mawaru_lineac_shotsleft[pn]-1;
								
								mawaru_lineac_fireang[pn] = mawaru_lineac_ang[pn]
								
								if mawaru_lineac_shotsleft[pn] == 0 then
									MESSAGEMAN:Broadcast('LinLaughP'..pn);
								end
							else
								Sound('laserfail');
							end
							mawaru_lineac_held[3+(bpn*4)] = 1
						end
						
						if mawaru_keys[1+(bpn*4)] == 1 and mawaru_keys[4+(bpn*4)] == 0 then
							if mawaru_lineac_xspd[pn] > -mawaru_lineac_maxspd then
								mawaru_lineac_xspd[pn] = math.min(mawaru_lineac_xspd[pn]-mawaru_lineac_accel,0)
							end
						elseif mawaru_keys[4+(bpn*4)] == 1 and mawaru_keys[1+(bpn*4)] == 0 then
							if mawaru_lineac_xspd[pn] < mawaru_lineac_maxspd then
								mawaru_lineac_xspd[pn] = math.max(mawaru_lineac_xspd[pn]+mawaru_lineac_accel,0)
							end
						else
							mawaru_lineac_xspd[pn] = 0;
						end
						
					end
					
					if mawaru_lineac_shotwait[pn] > mawaru_lineac_shotdelay - 0.16 then
						mawaru_lineac_fire(pn);
					end
					
					if mawaru_lineac_shotsleft[pn] > 0 then
						mawaru_lineac_shotbar[pn]:zoomto(96*(1-(mawaru_lineac_shotwait[pn]/mawaru_lineac_shotdelay)),14)
						if mawaru_lineac_shotwait[pn] <= 0 then
							mawaru_lineac_shotbar[pn]:diffuse(0,1,0,1);
						else
							mawaru_lineac_shotbar[pn]:diffuse(1,0,0,1);
						end
					else
						mawaru_lineac_shotbar[pn]:zoom(0);
					end
					
					mawaru_lineac_ammocount[pn]:setstate(mawaru_clamp(mawaru_lineac_shotsleft[pn],0,3));
					mawaru_lineac_ang[pn] = mawaru_lineac_ang[pn]+mawaru_lineac_xspd[pn]
					
					if mawaru_lineac_ang[pn] > 360 then
						mawaru_lineac_ang[pn] = mawaru_lineac_ang[pn]-360
					end
					
					mawaru_lineac_players[pn]:x(160+144*math.sin(math.rad(mawaru_lineac_ang[pn])))
					mawaru_lineac_players[pn]:y(240-144*math.cos(math.rad(mawaru_lineac_ang[pn])))
					mawaru_lineac_players[pn]:rotationz(mawaru_lineac_ang[pn])
					
					
					
					----------------------don't touch this------------------------
					--release all buttons - used for detecting if a button is newly pressed, as opposed to held
					if mawaru_keys[3+(bpn*4)] == 0 then
						mawaru_lineac_held[3+(bpn*4)] = 0
					end
					---------------------end don't touch this----------------------
				end
			end
			
			self:sleep(0.02);
			if mawaru_curgame == 13 and mawaru_gamestate == 1 then
				self:queuecommand('Update');
			end
			
		end,
    },
    Def.Quad{
      Name= "actor_bdb",
      InitCommand= function(self) mawaru_lineac_controller = self end,
    },
    Def.Quad{
      Name= "actor_cdb",
      CheckLaughCommand= function(self) if mawaru_lineac_score[1] < table.getn(mawaru_lineac_chart[mawaru_difficulty[1] ])	then Sound('thlaugh'); end end,
      LinLaughP1MessageCommand= cmd(sleep,0.2;queuecommand,"CheckLaugh"),
      OnCommand= cmd(visible,false),
    },
    Def.Quad{
      Name= "actor_ddb",
      CheckLaughCommand= function(self) if mawaru_lineac_score[2] < table.getn(mawaru_lineac_chart[mawaru_difficulty[2] ])	then Sound('thlaugh'); end end,
      LinLaughP2MessageCommand= cmd(sleep,0.2;queuecommand,"CheckLaugh"),
      OnCommand= cmd(visible,false),
    },
    --For all P1 parts, Unconverted x & y pos. -Kid
    Def.Quad{
      Name= "actor_edb",
      OnCommand= cmd(x,320;y,240;zoomto,640,480;diffuse,color('.6,.3,.7,1')),
    },
    Def.ActorFrame{
      Name= "actor_fdb",
      OnCommand= cmd(),
      Def.Sprite{
        Name= "actor_gdb",
        OnCommand= cmd(x,160;y,240),
        Texture= "bg.png",
      },
      Def.Sprite{
        Name= "actor_hdb",
        OnCommand= cmd(x,160+10;y,240-5;pulse;effectmagnitude,1,1,1;effectcolor1,color('.98,1.02,1,1');effectcolor2,color('1.02,.98,1,1');effectperiod,.8),
        Texture= "organ.png",
      },
      Def.Sprite{
        Name= "actor_idb",
        OnCommand= cmd(x,160;y,240),
        Texture= "ring.png",
      },
      Def.ActorFrame{
        Name= "actor_jdb",
        OnCommand= cmd(x,160;y,240;sleep,0.02;queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_shots,self) end,
        Def.Quad{
          Name= "actor_kdb",
          LinFP1MessageCommand= cmd(finishtweening;diffusealpha,1;fadeleft,.4;faderight,.4;accelerate,0.5;diffusealpha,0),
          OnCommand= cmd(blend,"BlendMode_Add";vertalign,top;zoomto,16,296;y,18;diffuse,color('0,1,1,0');fadebottom,0.1),
        },
      },
      Def.ActorFrame{
        Name= "actor_ldb",
        OnCommand= cmd(x,160;y,240;sleep,0.02;queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_players,self) end,
        Def.Sprite{
          Name= "actor_mdb",
          Texture= "laser.png",
        },
        Def.Sprite{
          Name= "actor_ndb",
          OnCommand= cmd(x,-34;rotationz,90;zoom,.45;pulse;effectperiod,1;effectclock,"bgm";effectmagnitude,1,1.1,1),
          Texture= "arrow1.png",
        },
        Def.Sprite{
          Name= "actor_odb",
          OnCommand= cmd(x,34;rotationz,-90;zoom,.45;pulse;effectperiod,1;effectclock,"bgm";effectmagnitude,1,1.1,1),
          Texture= "arrow1.png",
        },
      },
      Def.ActorFrame{
        Name= "actor_pdb",
        OnCommand= cmd(y,32),
        Def.Sprite{
          Name= "actor_qdb",
          OnCommand= cmd(x,160;y,384;zoom,0.6),
          Texture= "shotsleft.png",
        },
        Def.Sprite{
          Name= "actor_rdb",
          InitCommand= function(self) table.insert(mawaru_lineac_ammocount,self) end,
          OnCommand= cmd(x,240;y,384;animate,0;zoom,0.6),
          Texture= "left 1x4.png",
        },
        Def.Quad{
          Name= "actor_sdb",
          OnCommand= cmd(horizalign,left;x,178;y,406;zoomto,100,18;diffuse,color('0,0,0,1');animate,0),
        },
        Def.Quad{
          Name= "actor_tdb",
          InitCommand= function(self) table.insert(mawaru_lineac_shotbar,self) end,
          OnCommand= cmd(horizalign,left;x,180;y,406;zoomto,0,14;diffuse,color('1,1,0,1');animate,0),
        },
      },
      --For all spark: Changed LAER to Sprite and changed File line to correct Texture line. -Kid
      --Then in the OnCommand, we set the frames. -Kid
      Def.Sprite{
        Name= "actor_udb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[1],self) end,
      },
      Def.Sprite{
        Name= "actor_vdb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[1],self) end,
      },
      Def.Sprite{
        Name= "actor_wdb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[1],self) end,
      },
      Def.Sprite{
        Name= "actor_xdb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[1],self) end,
      },
      Def.Sprite{
        Name= "actor_ydb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[1],self) end,
      },
      Def.Sprite{
        Name= "actor_zdb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[1],self) end,
      },
      Def.Sprite{
        Name= "actor_Adb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[1],self) end,
      },
    },
    --For all P2 parts, Unconverted x & y pos. -Kid
    Def.ActorFrame{
      Name= "actor_Bdb",
      OnCommand= cmd(x,320),
      Def.Sprite{
        Name= "actor_Cdb",
        OnCommand= cmd(x,160;y,240),
        Texture= "bg.png",
      },
      Def.Sprite{
        Name= "actor_Ddb",
        OnCommand= cmd(x,160+10;y,240-5;pulse;effectmagnitude,1,1,1;effectcolor1,color('.98,1.02,1,1');effectcolor2,color('1.02,.98,1,1');effectperiod,.8),
        Texture= "organ.png",
      },
      Def.Sprite{
        Name= "actor_Edb",
        OnCommand= cmd(x,160;y,240),
        Texture= "ring.png",
      },
      Def.ActorFrame{
        Name= "actor_Fdb",
        OnCommand= cmd(x,160;y,240;sleep,0.02;queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_shots,self) end,
        Def.Quad{
          Name= "actor_aeb",
          LinFP2MessageCommand= cmd(finishtweening;diffusealpha,1;fadeleft,.4;faderight,.4;accelerate,0.5;diffusealpha,0),
          OnCommand= cmd(blend,"BlendMode_Add";vertalign,top;zoomto,16,296;y,18;diffuse,color('0,1,1,0');fadebottom,0.1),
        },
      },
      Def.ActorFrame{
        Name= "actor_beb",
        OnCommand= cmd(x,160;y,240;sleep,0.02;queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_players,self) end,
        Def.Sprite{
          Name= "actor_ceb",
          Texture= "laser.png",
        },
        Def.Sprite{
          Name= "actor_deb",
          OnCommand= cmd(x,-34;rotationz,90;zoom,.45;pulse;effectperiod,1;effectclock,"bgm";effectmagnitude,1,1.1,1),
          Texture= "arrow1.png",
        },
        Def.Sprite{
          Name= "actor_eeb",
          OnCommand= cmd(x,34;rotationz,-90;zoom,.45;pulse;effectperiod,1;effectclock,"bgm";effectmagnitude,1,1.1,1),
          Texture= "arrow1.png",
        },
      },
      Def.ActorFrame{
        Name= "actor_feb",
        OnCommand= cmd(y,32),
        Def.Sprite{
          Name= "actor_geb",
          OnCommand= cmd(x,160;y,384;zoom,0.6),
          Texture= "shotsleft.png",
        },
        Def.Sprite{
          Name= "actor_heb",
          InitCommand= function(self) table.insert(mawaru_lineac_ammocount,self) end,
          OnCommand= cmd(x,240;y,384;animate,0;zoom,0.6),
          Texture= "left 1x4.png",
        },
        Def.Quad{
          Name= "actor_ieb",
          OnCommand= cmd(horizalign,left;x,178;y,406;zoomto,100,18;diffuse,color('0,0,0,1');animate,0),
        },
        Def.Quad{
          Name= "actor_jeb",
          InitCommand= function(self) table.insert(mawaru_lineac_shotbar,self) end,
          OnCommand= cmd(horizalign,left;x,180;y,406;zoomto,0,14;diffuse,color('1,1,0,1');animate,0),
        },
      },
	    --For all spark: Changed LAER to Sprite and changed File line to correct Texture line. -Kid
      --Then in the OnCommand, we set the frames. -Kid
      Def.Sprite{
        Name= "actor_keb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[2],self) end,
      },
      Def.Sprite{
        Name= "actor_leb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[2],self) end,
      },
      Def.Sprite{
        Name= "actor_meb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[2],self) end,
      },
      Def.Sprite{
        Name= "actor_neb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[2],self) end,
      },
      Def.Sprite{
        Name= "actor_oeb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[2],self) end,
      },
      Def.Sprite{
        Name= "actor_peb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[2],self) end,
      },
      Def.Sprite{
        Name= "actor_qeb",
        Texture = "energite 3x2.png",
        OnCommand= cmd(visible,false;sleep,0.02;SetStateProperties,frames['spark'..math.random(1,3)];queuecommand,"SetMe"),
        SetMeCommand= function(self) table.insert(mawaru_lineac_enemy[2],self) end,
      },
    },
    Def.Quad{
      Name= "actor_reb",--Unconverted x & y pos. -Kid
      OnCommand= cmd(x,320;y,240;zoomto,6,480;diffuse,color('0,0,0,1')),
    },
    optional_actor(cond_Ccb_result,
    Def.Quad{
      Name= "actor_seb",--Unconverted x & y pos. -Kid
      OnCommand= cmd(x,640*0.25;y,240;zoomto,640/2,480;diffuse,color('0,0,0,1')),
    }),
    optional_actor(cond_Dcb_result,
    Def.Quad{
      Name= "actor_teb",--Unconverted x & y pos. -Kid
      OnCommand= cmd(x,640*0.75;y,240;zoomto,640/2,480;diffuse,color('0,0,0,1')),
    }),
  },
}
