
function EnemyBossFinalize
{
	if(!BeVanished)
	{
		SetCommonData("BossFlg",false);
		if(GetCommonDataDefault("SpellFlg",false))
		{
			loop(floor(point/1.5))
			{
				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&&(floor(enemylife)<=3||spelltimer<=0)){GetSpellCard;}
			
			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);
			SetCommonData("SpellFlg",false);
			SetCommonData("Score",score);
		}
		let score=GetCommonData("Score");
		let rate=GetCommonData("Rate");
		if(rate==1){score+=point;}
		else{score+=point*(rate*rate*rate);}
		SetCommonData("Score",score);
	}
	SetCommonData("EnemyDelFlg",1);
}
