local cond_gkc_result= GAMESTATE:IsPlayerEnabled(PLAYER_1)

local cond_hkc_result= GAMESTATE:IsPlayerEnabled(PLAYER_2)

local function optional_actor(cond, actor)
	if cond then return actor end
	return Def.Actor{}
end

return Def.ActorFrame{
  Name= "actor_ikc",
  Def.ActorFrame{
    Name= "actor_jkc",--No, this was already done by the main lua. -Kid
    --OnCommand= cmd(zoomx,SCREEN_WIDTH/640;zoomy,SCREEN_HEIGHT/480),
    Def.Quad{
      Name= "actor_kkc",
      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_sans_held = {0,0,0,0,0,0,0,0};
			
			mawaru_sans_player = {};
			mawaru_sans_wasinvin = {false,false}
			mawaru_sans_invin = {0,0}
			
			mawaru_sans_isblue = false;
			mawaru_sans_heartspd = 3;
			mawaru_sans_grav = {0,0}
			mawaru_sans_fallspd = 0.2;
			mawaru_sans_maxfall = 5;
			mawaru_sans_jumpheight = 6;
			mawaru_sans_lastjump = {0,0}
			
			mawaru_sans_removeall = false;
			
			mawaru_sans_cur = 1;
			mawaru_sans_proj = {{},{},{},{},{},{}}
			
			for i=1,20 do--SCREEN_WIDTH -> 640. -Kid
				table.insert(mawaru_sans_proj[1],{0.3+i/10,0,640+20,360+28+35*math.sin(i/3.3),0,-7,1,1})
				table.insert(mawaru_sans_proj[1],{0.3+i/10,0,640+20,360-48+35*math.sin(i/3.3),0,-7,1,-1})
				table.insert(mawaru_sans_proj[2],{0.3+i/10,0,640+20,360+24+38*math.sin(i/3.2),0,-7,1,1})
				table.insert(mawaru_sans_proj[2],{0.3+i/10,0,640+20,360-44+38*math.sin(i/3.2),0,-7,1,-1})
				table.insert(mawaru_sans_proj[3],{0.3+i/10,0,640+20,360+22+40*math.sin(i/3),0,-7,1,1})
				table.insert(mawaru_sans_proj[3],{0.3+i/10,0,640+20,360-42+40*math.sin(i/3),0,-7,1,-1})
				table.insert(mawaru_sans_proj[4],{0.3+i/10,0,640+20,360+20+45*math.sin(i/2.7),0,-7,1,1})
				table.insert(mawaru_sans_proj[4],{0.3+i/10,0,640+20,360-40+45*math.sin(i/2.7),0,-7,1,-1})
				table.insert(mawaru_sans_proj[5],{0.3+i/10,0,640+20,360+18+48*math.sin(i/2.4),0,-7,1,1})
				table.insert(mawaru_sans_proj[5],{0.3+i/10,0,640+20,360-38+48*math.sin(i/2.4),0,-7,1,-1})
				table.insert(mawaru_sans_proj[6],{0.3+i/10,0,640+20,360+16+50*math.sin(i/2.1),0,-7,1,1})
				table.insert(mawaru_sans_proj[6],{0.3+i/10,0,640+20,360-36+50*math.sin(i/2.1),0,-7,1,-1})
			end
			
			mawaru_sans_dead = {false,false}
			
			mawaru_sans_boxwid = 100;
			
			mawaru_sans_bones = {{},{}}
			mawaru_sans_bptr = {1,1};
			
			mawaru_sans_timer = 0;
			
			--beat,rotation,x,y,color(0=normal,1=blue),spd,which,top/bottom
			function mawaru_sans_spawnbone(rot,x,y,color,spd,which,dir)
				local a = mawaru_sans_bones[which][mawaru_sans_bptr[which] ]
				
				if a then
					a:visible(true);
					if rot == 0 then
						a:vertalign('top');
						a:zoomy(dir);
						if dir == 1 then
							a:cropbottom(((y-360)+(256-100))/256)
						else
							a:cropbottom((-(y-360)+(256-100))/256)
						end
					else
						a:rotationz(90)
						a:vertalign('middle');
						a:zoomy(1);
						a:cropbottom(0)
					end
					a:x(x);
					a:y(y);
					a:zoomz(spd);
					
					if color == 1 then
						a:diffuse(0,.8,1,1);
					else
						a:diffuse(1,1,1,1);
					end
					a:aux(color+1);
					
				end
				
				mawaru_sans_bptr[which] = mawaru_sans_bptr[which]+1
				if mawaru_sans_bptr[which] > table.getn(mawaru_sans_bones[which]) then
					mawaru_sans_bptr[which] = 1
				end
			end
			
		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_sans_lockinput = {.3,.3};
			
			char_sans:playcommand('SpawnQ');
			char_sans:x(320);
			char_sans:y(150);
			char_sans:basezoomy(0.9);
			
			self:sleep(0.02);
			self:queuecommand('Update');

		end,
      UpdateCommand= function(self)
		
			mawaru_sans_timer = mawaru_sans_timer +0.02;
			
			local chart = mawaru_sans_proj[ mawaru_maxdifficulty+1 ]
	
			if mawaru_sans_cur <= table.getn(chart) and mawaru_sans_timer > chart[mawaru_sans_cur][1] then
				--Trace('spawn');
				if mawaru_sans_timer < chart[mawaru_sans_cur][1]+1 then
					local t = chart[mawaru_sans_cur]
					--beat,rotation,x,y,color(0=normal,1=blue),spd,which,top/bottom
					if t[2] == 0 then
						mawaru_sans_spawnbone(t[2],t[3],t[4],t[5],t[6],t[7],t[8]);
						--Trace('spawn');
					end
				end
				mawaru_sans_cur = mawaru_sans_cur+1;
			end
			
			local j = 1
			for i=1,table.getn(mawaru_sans_bones[j]) do
				if mawaru_sans_bones[j][i]:getaux() > 0 then
					
					local spd = mawaru_sans_bones[j][i]:GetZoomZ();
					mawaru_sans_bones[j][i]:addx(spd);
					--SCREEN_WIDTH -> 640; SCREEN_HEIGHT -> 480. -Kid
					if mawaru_sans_bones[j][i]:GetX() > 320+640*0.7 or mawaru_sans_bones[j][i]:GetX() < 320+640*-0.7
						or mawaru_sans_bones[j][i]:GetY() > 480*1.2 or mawaru_sans_bones[j][i]:GetY() < 480*-0.2 or j==1 and mawaru_sans_removeall then
						
						mawaru_sans_bones[j][i]:aux(0);
						mawaru_sans_bones[j][i]:visible(false);
						
					end
					
				end
			end
			
			--game logic
			
			for pn=1,2 do
				
				if GAMESTATE:IsPlayerEnabled(pn-1) then
					if mawaru_sans_lockinput[pn]>0 then
						mawaru_sans_lockinput[pn] = mawaru_sans_lockinput[pn]-0.02
					end
					
					if mawaru_sans_invin[pn]>0 then
						mawaru_sans_invin[pn] = mawaru_sans_invin[pn]-0.02
						if not mawaru_sans_wasinvin[pn] then
							--diffuseshift
							mawaru_sans_player[pn]:diffuseshift();
							mawaru_sans_player[pn]:effectperiod(0.3);
							mawaru_sans_player[pn]:effectcolor1(1,1,1,0.6);
							mawaru_sans_player[pn]:effectcolor2(1,1,1,0.3);
							mawaru_sans_wasinvin[pn] = true;
						end
					else
						if mawaru_sans_wasinvin[pn] then
							mawaru_sans_player[pn]:stopeffect();
							mawaru_sans_wasinvin[pn] = false;
						end
					end
					
					local bpn = pn-1;
					
					local thismoving = false;
						
					if mawaru_sans_lockinput[pn] <= 0 and not mawaru_sans_dead[pn] then
						
						--controls
						if mawaru_keys[1+(bpn*4)] == 1 and mawaru_sans_player[pn]:GetX() > sw/2-mawaru_sans_boxwid+15 then
							mawaru_sans_player[pn]:addx(-mawaru_sans_heartspd);
						end
						if mawaru_keys[4+(bpn*4)] == 1 and mawaru_sans_player[pn]:GetX() < sw/2+mawaru_sans_boxwid-15 then
							mawaru_sans_player[pn]:addx(mawaru_sans_heartspd);
						end
						if mawaru_keys[3+(bpn*4)] == 1 and mawaru_sans_player[pn]:GetY() > 360-mawaru_sans_boxwid+15 then
							mawaru_sans_player[pn]:addy(-mawaru_sans_heartspd);
						end
						if mawaru_keys[2+(bpn*4)] == 1 and mawaru_sans_player[pn]:GetY() < 360+mawaru_sans_boxwid-15 then
							mawaru_sans_player[pn]:addy(mawaru_sans_heartspd);
						end
						
						if mawaru_keys[1+(bpn*4)] == 1 and mawaru_keys[4+(bpn*4)] == 0 then
							thismoving = true;
						end
						if mawaru_keys[2+(bpn*4)] == 1 and mawaru_keys[3+(bpn*4)] == 0 then
							thismoving = true;
						end
						if mawaru_keys[4+(bpn*4)] == 1 and mawaru_keys[1+(bpn*4)] == 0 then
							thismoving = true;
						end
						if mawaru_keys[3+(bpn*4)] == 1 and mawaru_keys[2+(bpn*4)] == 0 then
							thismoving = true;
						end
						
					end
					
					for i=1,table.getn(mawaru_sans_bones[1]) do
						if mawaru_sans_bones[1][i]:getaux() == 1 or mawaru_sans_bones[1][i]:getaux() == 2 and thismoving then
							local ax = mawaru_sans_bones[1][i]:GetX()
							local ay = mawaru_sans_bones[1][i]:GetY()+128*mawaru_sans_bones[1][i]:GetZoomY()
							if mawaru_hittest(ax,ay,4,246,mawaru_sans_player[pn]:GetX(),mawaru_sans_player[pn]:GetY(),20,20) then
								if not mawaru_sans_dead[pn] then
									mawaru_sans_dead[pn] = true;
									mawaru_sans_player[pn]:setstate((pn*2)-1)
									Sound('heartdie');
								end
							end
						end
					end
					
				end
					
			end
			
			self:sleep(0.02);
			if mawaru_curgame == 17 and mawaru_gamestate == 1 then
				self:queuecommand('Update');
			end
			
		end,
    },
    Def.Quad{
      Name= "actor_lkc",--Reverse-converted x & y pos. -Kid
      OnCommand= cmd(stretchto,0,0,640,480;diffuse,color('0,0,0,1')),
    },
    LoadActor('chara') .. {
      Name= "actor_mkc",
      File= "chara",
    },
    Def.Quad{
      Name= "actor_nkc",--Reverse-converted x & y pos. -Kid
      OnCommand= cmd(stretchto,640/2-(mawaru_sans_boxwid+4),480/2-(mawaru_sans_boxwid+4)+120,640/2+(mawaru_sans_boxwid+4),480/2+(mawaru_sans_boxwid+4)+120;diffuse,color('1,1,1,1')),
    },
    Def.Quad{
      Name= "actor_okc",--Reverse-converted x & y pos. -Kid
      OnCommand= cmd(stretchto,640/2-(mawaru_sans_boxwid),480/2-(mawaru_sans_boxwid)+120,640/2+(mawaru_sans_boxwid),480/2+(mawaru_sans_boxwid)+120;diffuse,color('0,0,0,1')),
    },
    Def.Sprite{
      Name= "actor_pkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_qkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_rkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_skc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_tkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_ukc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_vkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_wkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_xkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_ykc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_zkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Akc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Bkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Ckc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Dkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Ekc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Fkc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_alc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_blc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_clc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_dlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_elc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_flc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_glc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_hlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_ilc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_jlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_klc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_llc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_mlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_nlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_olc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_plc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_qlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_rlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_slc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_tlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_ulc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_vlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_wlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_xlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_ylc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_zlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Alc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Blc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Clc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Dlc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Elc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_Flc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_amc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_bmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_cmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_dmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_emc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_fmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_gmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_hmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_imc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_jmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_kmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_lmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_mmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_nmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_omc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[1],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_pmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[2],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_qmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[2],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_rmc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[2],self) end,
      Texture= "bone.png",
    },
    Def.Sprite{
      Name= "actor_smc",
      OnCommand= cmd(visible,false;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_bones[2],self) end,
      Texture= "bone.png",
    },
    optional_actor(cond_gkc_result,
    Def.Sprite{
      Name= "actor_tmc",
      OnCommand= cmd(animate,0;zoom,0.75;setstate,0;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_player,self); self:x(280); self:y(360) end,
      Texture= "heartred 2x2.png",
    }),
    optional_actor(cond_hkc_result,
    Def.Sprite{
      Name= "actor_umc",
      OnCommand= cmd(animate,0;zoom,0.75;setstate,2;sleep,0.02;queuecommand,"SetMe"),
      SetMeCommand= function(self) table.insert(mawaru_sans_player,self); self:x(360); self:y(360) end,
      Texture= "heartred 2x2.png",
    }),
    Def.Quad{
      Name= "actor_vmc",
      InitCommand= function(self) mawaru_sans_controller = self end,
    },
  },
}
