
//////////////////////////////////////////////////////////////////
///STAGE 1
//////////////////////////////////////////////////////////////////


function stageF1C{
		LoadMusic(csd~".\music\Reimu.mp3");
		
	Wait(240);
		PlayMusic(csd~".\music\Reimu.mp3");
	
  Wait(120);
  
  
loop(6){
  Wait(20);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BF1b.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
} 
  Wait(120);

loop(6){
  Wait(20);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BF1.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
}

Wait(120);
loop(10){
  Wait(20);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BYYE2.txt", 0, GetClipMinY+100, 0, 0, 0);
}
  Wait(120);
loop(3){
  Wait(3);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\RF2.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
}
  Wait(120);
loop(4){
  Wait(3);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\RF2.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
}
 
  Wait(200);
loop(10){
  Wait(40);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BYYE.txt", GetClipMinX - 10, GetClipMinY + rand(10,100), 0, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\RYYE.txt", GetClipMaxX + 10, GetClipMinY + rand(10,100), 0, 0, 0);
}

  WaitForZeroEnemy; 
  Wait(70);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 100, GetClipMinY - 10, 0, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 320, GetClipMinY - 10, 0, 0, 0);
  Wait(60);
  loop(6){
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BF1.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
  Wait(60);}
  WaitForZeroEnemy; 
  Wait(200);
  
  
  
  
  
  
  
  
  
  
  Wait(120);
  
  
loop(10){
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BF1b.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
} 
  Wait(120);

loop(10){
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BF1.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
}

Wait(120);
loop(20){
  Wait(12);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BYYE2.txt", 0, GetClipMinY+100, 0, 0, 0);
}
  Wait(120);
loop(6){
  Wait(3);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\RF2.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
}
  Wait(120);
loop(12){
  Wait(3);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\RF2.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
}
 
  Wait(200);
loop(20){
  Wait(20);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BYYE.txt", GetClipMinX - 10, GetClipMinY + rand(10,100), 0, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\RYYE.txt", GetClipMaxX + 10, GetClipMinY + rand(10,100), 0, 0, 0);
}

  WaitForZeroEnemy; 
  Wait(70);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 50, GetClipMinY - 10, 0, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 380, GetClipMinY - 10, 0, 0, 0);
  Wait(90);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 120, GetClipMinY - 10, 0, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 300, GetClipMinY - 10, 0, 0, 0);
  Wait(60);
  loop(12){
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BF1.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
  Wait(40);}
  WaitForZeroEnemy; 
  Wait(200);
  
  
  
  loop(16){
  Wait(7);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BF1b.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
} 
  Wait(120);

loop(16){
  Wait(7);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BF1.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
}

Wait(120);
loop(25){
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BYYE2.txt", 0, GetClipMinY+100, 0, 0, 0);
}
  Wait(120);
loop(8){
  Wait(3);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\RF2.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
}
  Wait(120);
loop(20){
  Wait(5);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\RF2.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
}
 
  Wait(200);
loop(25){
  Wait(16);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BYYE.txt", GetClipMinX - 10, GetClipMinY + rand(10,100), 0, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\RYYE.txt", GetClipMaxX + 10, GetClipMinY + rand(10,100), 0, 0, 0);
}

  WaitForZeroEnemy; 
  Wait(70);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 50, GetClipMinY - 10, 0, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 380, GetClipMinY - 10, 0, 0, 0);
  Wait(90);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 120, GetClipMinY - 10, 0, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 310, GetClipMinY - 10, 0, 0, 0);
  Wait(90);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 190, GetClipMinY - 10, 0, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\PYYE.txt", 240, GetClipMinY - 10, 0, 0, 0);
  Wait(60);
  loop(12){
  CreateEnemyFromFile(GetCurrentScriptDirectory~"Enemy\BF1.txt", rand(GetClipMinX + 10,GetClipMaxX - 10), GetClipMinY - 10, 0, 0, 0);
  Wait(40);}
  WaitForZeroEnemy; 
  Wait(200);
  LoadMusic(csd~".\music\Boss.mp3");
		
	Wait(240);
		PlayMusic(csd~".\music\Boss.mp3");
  
  
  
  
  
  
	CreateEnemyBossFromFile(GetCurrentScriptDirectory~"ReimuPlural.txt",GetCenterX,GetClipMinY-50,0,0,0);
	WaitForZeroEnemy;
	NameOff=1;	
	Wait(240);
}

function stageF1E{
		LoadMusic(csd~".\music\Reimu.mp3");
	Wait(240);
		PlayMusic(csd~".\music\Reimu.mp3");
	CreateEnemyBossFromFile(GetCurrentScriptDirectory~"ReimuPluralE.txt",GetCenterX,GetClipMinY-50,0,0,0);
	WaitForZeroEnemy;
	NameOff=1;	
	Wait(240);
}

function stageF1H{
		LoadMusic(csd~".\music\Reimu.mp3");
	Wait(240);
		PlayMusic(csd~".\music\Reimu.mp3");
	CreateEnemyBossFromFile(GetCurrentScriptDirectory~"ReimuPluralH.txt",GetCenterX,GetClipMinY-50,0,0,0);
	WaitForZeroEnemy;
	NameOff=1;	
	Wait(240);
}

function stageF1L{
		LoadMusic(csd~".\music\Reimu.mp3");
	Wait(240);
		PlayMusic(csd~".\music\Reimu.mp3");
	CreateEnemyBossFromFile(GetCurrentScriptDirectory~"ReimuPluralL.txt",GetCenterX,GetClipMinY-50,0,0,0);
	WaitForZeroEnemy;
	NameOff=1;	
	Wait(240);
}