		task StageTask
		{
			yield;
		//			let Frequency=GetCommonDataDefaultEx(NsScore,NsFrequencyReimuEEasy,0);
		//			Frequency++;
		//			Frequency++;
		//			SetCommonDataEx(NsScore,NsFrequencyReimuEEasy,Frequency);
			LoadUserShotData(GetCurrentScriptDirectory~".\img\shot_All.txt");
	//TitleImage;
			CheckBMEBN;
			CheckBMEBE;
			CheckExtendItem;
			CheckMagicCircle;

			UpTimeCount;//起動時間,プレイ時間計測
			TotalPlayCalculation;
			StageTitleDisplay;

			if(StagePractice==true)
			{
				SetCommonData("BOSSDEFEAT",true);
			}
			SetCommonData("BalanceBreak",false);
			SetCommonData("ExclusiveBoss",true);

			wait(1);

			StatusDisplay;//文字と残機とボム表示を表示
			ForbidShot(false);
			ForbidBomb(false);
			PlayCharacterAndDifficult;//使用キャラと難易度のプレイ回数の記録
			SetCommonData("SELECTEDDIFFICULT",SelectedDifficult);//選択難易度を受け渡すため保存
			alternative(SelectedDifficult)
			case("Moderate")
			{
				WaitBullet=66;
			}
			case("Extream")
			{
				WaitBullet=66;
			}
			case("Apocalypse")
			{
				WaitBullet=34;
			}
			HiScoreLoad;//ハイスコアをロード
			DifficultDisplay;//難易度を表示
			DisPlayScore;//スコアを表示
//StageStartEffect;

			//StageFrameEffect;
			EnemyLifeDisplay;
			EnemyMagicCircle;
			TimeBonus;
			SpellDrawTask;
			StageRestart;
			if(BGDrawing==1)
			{
				BGGraphicRect;//ステージ背景の矩形処理など
			}
			DeleteUsedFile;

			if(GetCommonDataDefault("MSDPlayer",false)==false)
			{
			//	ItemAttract;
				OtherModeItemTask;
			//	BalanceCheckMain;
				SpiritDraw;
				SpiritSystem;
				CheckSpirit;
				CheckShotItemPoint;
				SpiritRankDraw;
				PurityRateDifine;
				CheckPurityRate;
				PRdraw;
				PRCdraw;
			}
			else if(GetCommonDataDefault("MSDPlayer",false)==true)
			{
				ExtendSystem;
			}

			if(GetCommonDataDefault("MSDPlayer",false)==true)
			{
		//		INEffect;
			}
			else if(GetPlayerType!=USER_PLAYER)
			{
				StageCheckShot;
			}

			BorderOfLifeLimit;
			AddBomb(-GetPlayerBomb+InitialBomb);
			SetCommonData("BurstStop",true);
			PlayerNoticeCheck;
			AchievementOnProgress;

			if(GetCommonDataDefault("MSDPlayer",false)==false)
			{
				FreeScoreAchievementCheck(1,14);
				FreeScoreAchievementCheck(5,15);
				FreeScoreAchievementCheck(10,16);
				FreeScoreAchievementCheck(15,17);
			}
			else
			{
				ScoreAchievementCheck(1,10);
				ScoreAchievementCheck(2,11);
				ScoreAchievementCheck(4,12);
				ScoreAchievementCheck(8,13);
			}
			StageTotalPlayCalculation;
			StageInitializeAchievementCheck;

			if(StageProgress==1)
			{
				SetCommonData("BurstStop",false);
				SubtotalStagescore=0;
				SubtotalStagescore2=0;
				StageMissCount=GetMissCount;
				UseStageBombCount=GetBombCount;
				SetCommonData("STAGEPROGRESS",1);
				wait(1);
				SetCommonData("SPIRALJUDG",1);
				SetCommonData("BOSSDEFEAT",false);
				Stage1;
				Stage1End;
				StageChange=true;
				wait(60);
				if(StagePhaseProgress==0 || !StagePractice)
				{
				if(GetBombCount-UseStageBombCount-GetCommonDataDefault("UseCancelBombForNoBomb",0)==0)
				{
					AchievementNotice(40);
				}

				if(GetMissCount-StageMissCount==0)
				{
					AchievementNotice(41);
				}
				}

				if(GetBombCount-UseStageBombCount>=15)
				{
					AchievementNotice(66);
				}
				wait(90);
				FadeOutMusic(BGM[2],20);
				StageIntervalEffect;
				wait(150);
				if(ScoreNumber2>=20000)
				{
					AchievementNotice(59);
				}
				StageHiscoreSave(1);
				if(StagePractice==true)
				{
					ClearStage;
					while(true){yield;}
				}
				DeleteStagefile(StageProgress);
				SetCommonData("SectionShift",true);
				SetCommonData("SPIRALJUDG",0);
				StageProgress=2;
			//	StageSectionMagicFragment=0;
			//	StageMultiply=0;
				MSDSectionScoreItemCount=0;
			}

			StageChange=false;

			if(StageProgress==2)
			{
				SubtotalStagescore=ScoreNumber1;
				SubtotalStagescore2=ScoreNumber2;
				StageMissCount=GetMissCount;
				UseStageBombCount=GetBombCount;
				SetCommonData("UseCancelBombForNoBomb",0);
				SetCommonData("STAGEPROGRESS",2);
				SetCommonData("BOSSDEFEAT",false);

				Stage2;
				Stage2End;
				StageChange=true;
				wait(60);
				if(StagePhaseProgress==0 || !StagePractice)
				{
				if(GetBombCount-UseStageBombCount-GetCommonDataDefault("UseCancelBombForNoBomb",0)==0)
				{
					AchievementNotice(42);
				}
				if(GetMissCount-StageMissCount==0)
				{
					AchievementNotice(43);
				}
				}

				if(GetBombCount-UseStageBombCount>=15)
				{
					AchievementNotice(66);
				}

				wait(90);
				FadeOutMusic(BGM[4],20);
				StageIntervalEffect;
				wait(150);
				StageHiscoreSave(2);
				if(StagePractice==true)
				{
					ClearStage;
					while(true){yield;}
				}
				DeleteStagefile(StageProgress);
				SetCommonData("SectionShift",true);
				StageProgress=3;
			//	StageSectionMagicFragment=0;
			//	StageMultiply=0;
				MSDSectionScoreItemCount=0;
			}

			StageChange=false;

			if(StageProgress==3)
			{
				SubtotalStagescore=ScoreNumber1;
				SubtotalStagescore2=ScoreNumber2;
				StageMissCount=GetMissCount;
				UseStageBombCount=GetBombCount;
				SetCommonData("UseCancelBombForNoBomb",0);
				SetCommonData("STAGEPROGRESS",3);
				SetCommonData("BOSSDEFEAT",false);
				Stage3;
				Stage3End;
				StageChange=true;
				wait(60);
				if(StagePhaseProgress==0 || !StagePractice)
				{
				if(GetBombCount-UseStageBombCount-GetCommonDataDefault("UseCancelBombForNoBomb",0)==0)
				{
					AchievementNotice(44);
				}
				if(GetMissCount-StageMissCount==0)
				{
					AchievementNotice(45);
				}
				}

				if(GetBombCount-UseStageBombCount>=15)
				{
					AchievementNotice(66);
				}

				wait(90);
				FadeOutMusic(BGM[6],20);
				StageIntervalEffect;
				wait(150);
				StageHiscoreSave(3);
				if(StagePractice==true)
				{
					ClearStage;
					while(true){yield;}
				}
				DeleteStagefile(StageProgress);
				SetCommonData("SectionShift",true);
				StageProgress=4;
			//	StageSectionMagicFragment=0;
			//	StageMultiply=0;
				MSDSectionScoreItemCount=0;
			}

			StageChange=false;

			if(StageProgress==4)
			{
				SubtotalStagescore=ScoreNumber1;
				SubtotalStagescore2=ScoreNumber2;
				StageMissCount=GetMissCount;
				UseStageBombCount=GetBombCount;
				SetCommonData("UseCancelBombForNoBomb",0);
				SetCommonData("STAGEPROGRESS",4);
				SetCommonData("BOSSDEFEAT",false);
				Stage4;
				Stage4End;
				StageChange=true;
				wait(60);
				if(StagePhaseProgress==0 || !StagePractice)
				{
				if(GetBombCount-UseStageBombCount-GetCommonDataDefault("UseCancelBombForNoBomb",0)==0)
				{
					AchievementNotice(46);
				}
				if(GetMissCount-StageMissCount==0)
				{
					AchievementNotice(47);
				}
				}

				if(GetBombCount-UseStageBombCount>=15)
				{
					AchievementNotice(66);
				}

				wait(90);
				FadeOutMusic(BGM[8],20);
				StageIntervalEffect;
				wait(150);
				StageHiscoreSave(4);
				if(StagePractice==true)
				{
					ClearStage;
					while(true){yield;}
				}
				DeleteStagefile(StageProgress);
				SetCommonData("SectionShift",true);
				StageProgress=5;
			//	StageSectionMagicFragment=0;
			//	StageMultiply=0;
				MSDSectionScoreItemCount=0;
			}

			StageChange=false;

			if(StageProgress==5)
			{
				SubtotalStagescore=ScoreNumber1;
				SubtotalStagescore2=ScoreNumber2;
				StageMissCount=GetMissCount;
				UseStageBombCount=GetBombCount;
				SetCommonData("UseCancelBombForNoBomb",0);
				SetCommonData("STAGEPROGRESS",5);
				SetCommonData("BOSSDEFEAT",false);
				Stage5;
			//	Stage5End;
				StageChange=true;

				wait(60);
				if(StagePhaseProgress==0 || !StagePractice)
				{
				if(GetBombCount-UseStageBombCount-GetCommonDataDefault("UseCancelBombForNoBomb",0)==0)
				{
					AchievementNotice(48);
				}
				if(GetMissCount-StageMissCount==0)
				{
					AchievementNotice(49);
				}
				}

				if(GetBombCount-UseStageBombCount>=15)
				{
					AchievementNotice(66);
				}

				wait(90);
				FadeOutMusic(BGM[10],20);
			//	StageIntervalEffect;
				wait(150);
				StageHiscoreSave(5);
				if(StagePractice==true)
				{
					ClearStage;
					while(true){yield;}
				}
			//	SetCommonData("SectionShift",true);
				//StageProgress=5;
			//	StageSectionMagicFragment=0;
			//	StageMultiply=0;
				MSDSectionScoreItemCount=0;
			}

			StageChange=false;

			wait(60);
			if(StagePractice==false)
			{//通しクリア
				JudgTimeInitialMAM=true;
				MSDClear=true;
				ClearBonus;
				StageAllClearAchievementCheck;
			}
			wait(30);
			while(AchievementDrawing>0){
			while(AchievementDrawing>0){yield;}
			yield;
			}
			wait(30);
			ClearStage;
		}