task WASI{  

                      let gokusi=49;
                      let aaaaa=0;
   
		let cx=GetCenterX();


			function Wait(let frame)
			{//待機関数
				loop(frame){yield};
			}
			function WaitForZeroEnemy()
			{//敵数が0になるまで待機する関数
				while(GetEnemyNum() != 0){yield;}
			}
yield;

Wait(60);
if(GetCommonDataEx("gokusi",myu)==1){PlayMusic("\bgm\x4introx.mid");}
if(GetCommonDataEx("gokusi",myu)==2){PlayMusic("\bgm\zerox4.mid");}
Wait(180);
loop(2){
loop(2){
             loop(3){
                   
			CreateEnemyFromFile("script\某鷲\WASIZAKO01A.TXT",cx,GetClipMinY-90,0,0,0);
                      Wait(80);
               }
         Wait(180);

}
loop(2){
             loop(3){
                    
			CreateEnemyFromFile("script\某鷲\WASIZAKO01.TXT",cx,GetClipMinY-90,0,0,0);

                      Wait(80);
                  }
         Wait(180);

}}

 Wait(720);
loop(3){
             loop(4){
                    
			CreateEnemyFromFile("script\某鷲\WASIZAKO02L.TXT",GetClipMaxX-30,GetClipMinY-30,0,0,0);

                      Wait(30);
                  }
         Wait(180);
             loop(4){
                    
			CreateEnemyFromFile("script\某鷲\WASIZAKO02R.TXT",GetClipMinX+30,GetClipMinY-30,0,0,0);

                      Wait(30);
                  }
         Wait(180);

}
WaitForZeroEnemy();
Wait(120);
was=1;
CreateEnemyBossFromFile("script\某鷲\wasimid1.TXT",GetCenterX,GetClipMinY,0,0,0);
WaitForZeroEnemy();
Wait(120);
was=0;
loop(3){
             loop(2){
                    
			CreateEnemyFromFile("script\某鷲\WASIZAKO01.TXT",cx,GetClipMinY-90,0,0,0);
			CreateEnemyFromFile("script\某鷲\WASIZAKO01A.TXT",cx,GetClipMinY-90,0,0,0);
                      Wait(60);
               }
         Wait(360);

}
 Wait(720);
loop(1){
             loop(4){
                    
			CreateEnemyFromFile("script\某鷲\WASIZAKO02L.TXT",GetClipMaxX-30,GetClipMinY-30,0,0,0);
                         CreateEnemyFromFile("script\某鷲\WASIZAKO02R.TXT",GetClipMinX+30,GetClipMinY-30,0,0,0);
                      Wait(30);
                  }
 
                    
			

         Wait(180);

}
WaitForZeroEnemy();
was=1;
CreateEventFromScript("stage");
loop{yield;if(OnEvent()==false){break;}}
PlayMusic("\bgm\BattleIntro.mid");
Wait(180);
loop(8){
loop(3){
  CreateEnemyFromFile("script\某鷲\WASIZAKO03.TXT",rand(GetClipMinX,GetClipMaxX),GetClipMinY-rand(0,180),0,0,0);
}
 Wait(20);}
Wait(180);
DeleteMusic("\bgm\BattleIntro.mid");
  CreateEnemyFromFile("script\某鷲\ラプターダイブS.TXT",GetClipMaxX+60,GetClipMinY-60,0,0,0);
WaitForZeroEnemy();
ExtendPlayer(1);
AddBomb(30);
Wait(300);
CreateEnemyBossFromFile("script\某鷲\BOSS鷲.txt",GetClipMinX,GetClipMaxY-300,0,0,0);
WaitForZeroEnemy();
DeleteEnemyShot(ALL);
  CreateEventFromScript("STf");
loop{yield;  if(OnEvent()==false){break;}}
                    SetCommonDataEx("gokusi",ST,1);
CreateEventFromScript("Get");
loop{yield;   if(OnEvent()==false){break;}}  
if(GetCommonDataEx("gokusi",ST)+GetCommonDataEx("gokusi",FA)+GetCommonDataEx("gokusi",CM)+GetCommonDataEx("gokusi",OC)+GetCommonDataEx("gokusi",BM)+GetCommonDataEx("gokusi",IC)+GetCommonDataEx("gokusi",EL)+GetCommonDataEx("gokusi",AM)==4){
WaitForZeroEnemy();
ExtendPlayer(1);
AddBomb(30);
Wait(300);
if(GetCommonDataEx("gokusi",50)==1){
CreateEnemyBossFromFile("script\vava\BOSSVAVA1.TXT",GetCenterX,GetClipMinY,0,0,0);
WaitForZeroEnemy();
CreateEventFromScript("VAf");
loop{yield; if(OnEvent()==false){break;}}
}
else{
CreateEnemyBossFromFile("script\某犬\BOSS狼a.TXT",GetCenterX,GetClipMinY,0,0,0);
WaitForZeroEnemy();
CreateEventFromScript("BELaf");
loop{yield;   if(OnEvent()==false){break;}}
}

}
WaitForZeroEnemy();
PlayMusic("\bgm\BattleFinish.mid");
Wait(1220);
SetCommonDataEx("gokusi",TEST,0); 
PlayMusic("\bgm\DrCain.mid");
if(GetCommonDataEx("gokusi",ST)+GetCommonDataEx("gokusi",FA)+GetCommonDataEx("gokusi",CM)+GetCommonDataEx("gokusi",OC)+GetCommonDataEx("gokusi",BM)+GetCommonDataEx("gokusi",IC)+GetCommonDataEx("gokusi",EL)+GetCommonDataEx("gokusi",AM)==4){
CreateEventFromScript("MID");
loop{yield;   if(OnEvent()==false){break;}}
}
if(GetCommonDataEx("gokusi",ST)+GetCommonDataEx("gokusi",FA)+GetCommonDataEx("gokusi",CM)+GetCommonDataEx("gokusi",OC)+GetCommonDataEx("gokusi",BM)+GetCommonDataEx("gokusi",IC)+GetCommonDataEx("gokusi",EL)+GetCommonDataEx("gokusi",AM)==8){
CreateEventFromScript("FINAL");
loop{yield;   if(OnEvent()==false){break;}}
}
ExtendPlayer(1);
AddBomb(-1*GetPlayerBomb);
AddBomb(100);




}
