#TouhouDanmakufu[Single]
#ScriptVersion[3]

#include "./functions.txt"

timer = 0;

@Initialize
{
	Obj_SetValue(GetEnemyBossSceneObjectID,"INIT",true);
	objEnemy = ObjEnemy_Create(OBJ_ENEMY_BOSS);
	ObjEnemy_Regist(objEnemy);

	TEnemyWork;
	ObjEnemy_Render; 
}

@MainLoop
{
	yield;
}

@Event
{
	alternative(GetEventType())
	case(EV_REQUEST_LIFE)
		{
		SetScriptResult(1/(10^10));
		}
	case(EV_REQUEST_TIMER)
		{
		SetScriptResult(timer);
		}
	case(EV_REQUEST_SPELL_SCORE)
		{
		SetScriptResult(0);
		}
}

task TEnemyWork
{
	TXY;
	ObjMove_SetDestAtWeight(objEnemy,GetStgFrameWidth/2,GetStgFrameHeight/2-85,20,5);
	loop(75){yield;}
	loop(10)
		{
		ObjEffect_Charge(enmx,enmy);	
		loop(5){yield;}
		}
	loop(10){yield;}
	ObjEnemy_SetLife(objEnemy,0);
	Obj_Delete(objEnemy);
	loop(1){yield;}
	SetForbidPlayerShot(false);
	SetForbidPlayerSpell(false);
	CloseScript(GetOwnScriptID);
}