		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("SELECTEDDIFFICULT","None")=="Arrange")
			{
				ArrangeExtendSystem;
				ArrangeModeTask;
			}
			else if(GetCommonDataDefault("MSDPlayer",false)==false)
			{
			//	ItemAttract;
				OtherModeItemTask;
			//	BalanceCheckMain;
				SpiritDraw;
				SpiritSystem;
				CheckSpirit;
				SpiritRankDraw
			}
			else if(GetCommonDataDefault("MSDPlayer",false)==true)
			{
				ExtendSystem;
			}

			if(GetCommonDataDefault("MSDPlayer",false)==true)
			{
		//		INEffect;
			}
			else
			{
				StageCheckShot;
			}
			Ah_SlowMoveCheck;
			BorderOfLifeLimit;
			AddBomb(-GetPlayerBomb+InitialBomb);
			SetCommonData("BurstStop",true);

			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;

				if(StagePhaseProgress==0 || !StagePractice)
				{
				if(GetBombCount-UseStageBombCount==0)
				{
					SetCommonDataEx(NsScore,NsAchievement[40],1);
				}

				if(GetMissCount-StageMissCount==0)
				{
					SetCommonDataEx(NsScore,NsAchievement[41],1);
				}
				}

				if(GetBombCount-UseStageBombCount>=15)
				{
					SetCommonDataEx(NsScore,NsAchievement[60],1);
				}

				wait(150);
				FadeOutMusic(BGM[2],20);
				StageIntervalEffect;
				wait(150);
				StageHiscoreSave(1);
				if(StagePractice==true)
				{
					ClearStage;
					while(true){yield;}
				}
				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("STAGEPROGRESS",2);
				SetCommonData("BOSSDEFEAT",false);

				Stage2;
				Stage2End;
				StageChange=true;

				if(StagePhaseProgress==0 || !StagePractice)
				{
				if(GetBombCount-UseStageBombCount==0)
				{
					SetCommonDataEx(NsScore,NsAchievement[42],1);
				}
				if(GetMissCount-StageMissCount==0)
				{
					SetCommonDataEx(NsScore,NsAchievement[43],1);
				}
				}

				if(GetBombCount-UseStageBombCount>=15)
				{
					SetCommonDataEx(NsScore,NsAchievement[60],1);
				}

				wait(150);
				FadeOutMusic(BGM[4],20);
				StageIntervalEffect;
				wait(150);
				StageHiscoreSave(2);
				if(StagePractice==true)
				{
					ClearStage;
					while(true){yield;}
				}
				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("STAGEPROGRESS",3);
				SetCommonData("BOSSDEFEAT",false);
				Stage3;
				Stage3End;
				StageChange=true;

				if(StagePhaseProgress==0 || !StagePractice)
				{
				if(GetBombCount-UseStageBombCount==0)
				{
					SetCommonDataEx(NsScore,NsAchievement[44],1);
				}
				if(GetMissCount-StageMissCount==0)
				{
					SetCommonDataEx(NsScore,NsAchievement[45],1);
				}
				}

				if(GetBombCount-UseStageBombCount>=15)
				{
					SetCommonDataEx(NsScore,NsAchievement[60],1);
				}

				wait(150);
				FadeOutMusic(BGM[6],20);
				StageIntervalEffect;
				wait(150);
				StageHiscoreSave(3);
				if(StagePractice==true)
				{
					ClearStage;
					while(true){yield;}
				}
				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("STAGEPROGRESS",4);
				SetCommonData("BOSSDEFEAT",false);
				Stage4;
				Stage4End;
				StageChange=true;

				if(StagePhaseProgress==0 || !StagePractice)
				{
				if(GetBombCount-UseStageBombCount==0)
				{
					SetCommonDataEx(NsScore,NsAchievement[46],1);
				}
				if(GetMissCount-StageMissCount==0)
				{
					SetCommonDataEx(NsScore,NsAchievement[47],1);
				}
				}

				if(GetBombCount-UseStageBombCount>=15)
				{
					SetCommonDataEx(NsScore,NsAchievement[60],1);
				}

				wait(150);
				FadeOutMusic(BGM[8],20);
				StageIntervalEffect;
				wait(150);
				StageHiscoreSave(4);
				if(StagePractice==true)
				{
					ClearStage;
					while(true){yield;}
				}
				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("STAGEPROGRESS",5);
				SetCommonData("BOSSDEFEAT",false);
				Stage5;
			//	Stage5End;
				StageChange=true;


				if(StagePhaseProgress==0 || !StagePractice)
				{
				if(GetBombCount-UseStageBombCount==0)
				{
					SetCommonDataEx(NsScore,NsAchievement[48],1);
				}
				if(GetMissCount-StageMissCount==0)
				{
					SetCommonDataEx(NsScore,NsAchievement[49],1);
				}
				}

				if(GetBombCount-UseStageBombCount>=15)
				{
					SetCommonDataEx(NsScore,NsAchievement[60],1);
				}

				wait(150);
				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)
			{//通しクリア
				StageAllClearAchievementCheck;
				JudgTimeInitialMAM=true;
				MSDClear=true;
				ClearBonus;
			}

			wait(5);
			ClearStage;
		}