
function EnemyBossFinalize
{
	SetCommonData("BossFlg",false);
	if(GetCommonDataDefault("SpellFlg",false))
	{
		loop(floor(point/3))
		{
			let rd=point/10;
			let x=GetX+rand(-10-rd,10+rd);
			let y=GetY+rand(-10-rd,10+rd);
			
			SetItem(x,y,ITEM_POINT);
		}
		
		if(spell_getflg){GetSpellCard;}
		SetCommonData("SpellFlg",false);
		
		let data_total=GetCommonData("SpellResult_TotalCount");
		let data_get=GetCommonData("SpellResult_GetCount");
		
		data_total[spell_number]=spell_totalcount;
		data_get[spell_number]=spell_getcount;
		
		SetCommonData("SpellResult_TotalCount",data_total);
		SetCommonData("SpellResult_GetCount",data_get);
	}
	
	let score=GetCommonData("Score");
	let rate=GetCommonData("Rate");
	if(!BeVanished)
	{
		if(rate==1){score+=point;}
		else{score+=point*(rate*rate*rate);}
		
	}
	SetCommonData("Score",score);
	SetCommonData("EnemyDelFlg",1);
}
