if(phase==10 && stagephase==2){
	DeleteEnemyShot(ALL);
	if(enemiescalled<1){
		if(GetCommonData("Difficulty")==1){ CreateEnemyBossFromFile("script\Events\Stage 6\Boss Easy.txt",cx,cy,0,0,NULL); }
		if(GetCommonData("Difficulty")==2){ CreateEnemyBossFromFile("script\Events\Stage 6\Boss Normal.txt",cx,cy,0,0,NULL); }
		if(GetCommonData("Difficulty")==3){ CreateEnemyBossFromFile("script\Events\Stage 6\Boss Hard.txt",cx,cy,0,0,NULL); }
		if(GetCommonData("Difficulty")==4){ CreateEnemyBossFromFile("script\Events\Stage 6\Boss Lunatic.txt",cx,cy,0,0,NULL); }
		}
	enemiescalled++;
	if(enemiescalled==1){ nextphase=1; }
}

//Legit
if(phase==11 && stagephase==2 && Continued==false && GetCommonDataDefault("InStagePractise",0)==0){
	if(GetCommonData("Conversation")==1){
	CreateEnemyFromFile("script\Events\Stage 6\Dialogue PostBoss.txt",cx,cy,0,0,NULL);
	SetCommonData("Conversation",0);
	}
	if(GetCommonData("Conversation")==2){
		if(Continued==false){
			if(GetCommonData("Difficulty")==1 && GetCommonData("HighScoreEasy")[6]<(GetScore-oldscore)){
				let scorearray=GetCommonData("HighScoreEasy");
				scorearray[6]=GetScore-oldscore;
				SetCommonData("HighScoreEasy",scorearray);
			}
			if(GetCommonData("Difficulty")==2 && GetCommonData("HighScoreNormal")[6]<(GetScore-oldscore)){
				let scorearray=GetCommonData("HighScoreNormal");
				scorearray[6]=GetScore-oldscore;
				SetCommonData("HighScoreNormal",scorearray);
			}
			if(GetCommonData("Difficulty")==3 && GetCommonData("HighScoreHard")[6]<(GetScore-oldscore)){
				let scorearray=GetCommonData("HighScoreHard");
				scorearray[6]=GetScore-oldscore;
				SetCommonData("HighScoreHard",scorearray);
			}
			if(GetCommonData("Difficulty")==4 && GetCommonData("HighScoreLunatic")[6]<(GetScore-oldscore)){
				let scorearray=GetCommonData("HighScoreLunatic");
				scorearray[6]=GetScore-oldscore;
				SetCommonData("HighScoreLunatic",scorearray);
			}
		SaveCommonData;
		}
	phase=0;
	stagephase=3;
	SetCommonData("Conversation",0);
	if(GetCommonDataDefault("StageUnlocked",0)<6){ SetCommonData("StageUnlocked",6); }
	SaveCommonData;
	CreateEnemyFromFile("script\Functions\Stages\Credits.txt",0,0,0,0,0);
	}
}

//Continued
if(phase==11 && stagephase==2 && Continued==true && GetCommonDataDefault("InStagePractise",0)==0){
	if(GetCommonData("Conversation")==1){
	CreateEnemyFromFile("script\Functions\ExtraFadeout.txt",cx,cy,0,0,[8,210]);
	SetCommonData("Conversation",2);
	}
	if(GetCommonData("Conversation")==3){
	SetCommonData("Conversation",0);
	if(GetCommonDataDefault("StageUnlocked",0)<6){ SetCommonData("StageUnlocked",6); }

	if(GetCommonData("TrumpCardUnlocked")[6]==0){
		let spellcarddataarray=GetCommonData("NewTrumpCardsUnlocked");
		spellcarddataarray[6]=1;
		SetCommonData("NewTrumpCardsUnlocked",spellcarddataarray);	

		let spellcarddataarray=GetCommonData("TrumpCardUnlocked");
		spellcarddataarray[6]=1;
		SetCommonData("TrumpCardUnlocked",spellcarddataarray);

		let spellcarddataarray=GetCommonData("SpellcardData");
		spellcarddataarray[73]=0.5;
		SetCommonData("SpellcardData",spellcarddataarray);

		SaveCommonData;
	}

	SaveCommonData;
	SetCommonData("EndGame",1);
	}
}

//Practise
if(phase==11 && stagephase==2 && GetCommonDataDefault("InStagePractise",0)>0){
	if(GetCommonData("Conversation")==1){
	CreateEnemyFromFile("script\Functions\ExtraFadeout.txt",cx,cy,0,0,[8,210]);
	SetCommonData("Conversation",2);
	}
	if(GetCommonData("Conversation")==3){
	SetCommonData("Conversation",0);
	SaveCommonData;
	SetCommonData("InStagePractise",3);
	}
}