task Stage1
{
			PlayMusic(BGM[1]);
			CreateEnemyFromFile(csd~"stage1/LoadEnemy.txt",0,0,0,0,0);
			wait(120);
			Stage1Unit1(1);
			wait(150);
			Stage1Unit1(-1);
			wait(150);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy02.txt",GetCenterX,GetClipMinY,2,90,1);
			Stage1Unit1(1);
			Stage1Unit1(-1);
			wait(240);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX+120,GetClipMinY,1,270,1);
			wait(60);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX-120,GetClipMinY,1,270,1);
			wait(60);
			Stage1Unit2(1,1);
			wait(120);
			Stage1Unit2(-1,2);
			wait(120);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX+80,GetClipMinY,1,270,1);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX-80,GetClipMinY,1,270,1);
			wait(180);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX+120,GetClipMinY,1,270,1);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX,GetClipMinY,1,270,1);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX-120,GetClipMinY,1,270,1);
			wait(300);
			DeleteEnemyShotToItemInCircle(ALL,GetCenterX,GetCenterY,300);
			alternative(SelectedDifficult)
			case("Easy")
			{
				CreateEnemyBossFromFile(csd~"stage1/Stage1MidBossEasy.txt",GetCenterX,GetClipMinY,2,0,0);
			}
			case("Normal")
			{
				CreateEnemyBossFromFile(csd~"stage1/Stage1MidBossNormal.txt",GetCenterX,GetClipMinY,2,0,0);
			}
			case("Hard")
			{
				CreateEnemyBossFromFile(csd~"stage1/Stage1MidBossHard.txt",GetCenterX,GetClipMinY,2,0,0);
			}
			case("Lunatic")
			{
				CreateEnemyBossFromFile(csd~"stage1/Stage1MidBossLunatic.txt",GetCenterX,GetClipMinY,2,0,0);
			}
			WaitForZeroEnemy();
			wait(120);
			Stage1Unit3;
			wait(360);
			Stage1Unit4(1);
			wait(120);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX-80,GetClipMinY,1,270,1);
			wait(60);
			Stage1Unit4(-1);
			wait(120);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX+80,GetClipMinY,1,270,1);
			wait(180);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX+120,GetClipMinY,1,270,1);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX,GetClipMinY,1,270,1);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX-120,GetClipMinY,1,270,1);
			wait(90);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX+80,GetClipMinY,1,270,1);
			CreateEnemyFromFile(csd~"stage1/Stage1Enemy03.txt",GetCenterX-80,GetClipMinY,1,270,1);
			wait(120);
			Stage1Unit5(1,2);
			Stage1Unit5(-1,1);
			wait(600);
			PlayMusic(BGM[2]);
			CreateEnemyFromFile(csd~"stage1/DeleteEnemy.txt",0,0,0,0,0);
			DeleteEnemyShotToItemInCircle(ALL,GetCenterX,GetCenterY,300);
			alternative(SelectedDifficult)
			case("Easy")
			{
				CreateEnemyBossFromFile(csd~"stage1/Stage1BossEasy.txt",GetCenterX,GetClipMinY,2,0,0);
			}
			case("Normal")
			{
				CreateEnemyBossFromFile(csd~"stage1/Stage1BossNormal.txt",GetCenterX,GetClipMinY,2,0,0);
			}
			case("Hard")
			{
				CreateEnemyBossFromFile(csd~"stage1/Stage1BossHard.txt",GetCenterX,GetClipMinY,2,0,0);
			}
			case("Lunatic")
			{
				CreateEnemyBossFromFile(csd~"stage1/Stage1BossLunatic.txt",GetCenterX,GetClipMinY,2,0,0);
			}
			WaitForZeroEnemy();
			wait(60);
			StageProgress=2;
}

task Stage1Unit1(dir)
{
	ascent(let i in 0..8)
	{
		CreateEnemyFromFile(csd~"stage1/Stage1Enemy01.txt",GetCenterX-40*dir-i*15*dir,GetClipMinY,2,90-70*dir,1);
		wait(15);
	}
}

task Stage1Unit2(dir,num)
{
	ascent(let i in 0..10)
	{
		CreateEnemyFromFile(csd~"stage1/Stage1Enemy04.txt",GetCenterX+192*dir,GetCenterY-120+i*15,2,90+90*dir,num);
		wait(30);
	}
}


task Stage1Unit3
{
let dir=1;
	ascent(let i in 0..6)
	{
		CreateEnemyFromFile(csd~"stage1/Stage1Enemy05.txt",GetCenterX+192*dir,GetCenterY-120,2,90+90*dir,1);
		dir=dir*-1;
		wait(60);
	}
}

task Stage1Unit4(dir)
{
	ascent(let i in 0..14)
	{
		CreateEnemyFromFile(csd~"stage1/Stage1Enemy01.txt",GetCenterX-140*dir+i*20*dir,GetClipMinY,2,90-70*dir,1);
		wait(20);
	}
}


task Stage1Unit5(dir,num)
{
	ascent(let i in 0..16)
	{
		CreateEnemyFromFile(csd~"stage1/Stage1Enemy04.txt",GetCenterX+192*dir,GetCenterY-160+i*15,2,90+90*dir,num);
		wait(20);
	}
}