if(phase==20 && stagephase==2){
	if(enemiescalled<1){ CreateEnemyBossFromFile("script\Events\Extra\Boss.txt",cx,cy,0,0,NULL); }
	enemiescalled++;
	if(enemiescalled==1){ nextphase=1; }
}

if(phase==21 && stagephase==2 && GetCommonData("Conversation")==1){
	if(frame%60==0){ enemiescalled++; }	
	SetCommonData("InEvent",1);
	if(enemiescalled==1){ nextphase=1; SetCommonData("Conversation",0); }
}

if(phase==22 && stagephase==2){
	if(frame%60==0){
	if(enemiescalled==1){ CreateEnemyFromFile("script\Functions\ExtraFadeout.txt",cx,cy,0,0,[8,181]); }
	enemiescalled++; }

	if(enemiescalled==5){
	
	if(GetCommonData("HighScoreExtra")<(GetScore-oldscore)){ SetCommonData("HighScoreExtra",GetScore-oldscore); }
	
	SetCommonData("NightmareUnlocked",true);
		if(GetCommonData("TrumpCardUnlocked")[17]==0){
		//Nanami's
		let spellcarddataarray=GetCommonData("NewTrumpCardsUnlocked");
		spellcarddataarray[17]=1;
		SetCommonData("NewTrumpCardsUnlocked",spellcarddataarray);

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

		let spellcarddataarray=GetCommonData("SpellcardData");
		spellcarddataarray[84]=0.5;
		SetCommonData("SpellcardData",spellcarddataarray);
		}
	SaveCommonData;
	ClearStage;
	}
}