//#TouhouDanmakufu[Single]
#ScriptVersion[3]
#Title["Intermission"]
#include "./../ZUNShot/ZUNShot_Const.txt"
#include "./sharedFuncDave.dnh"



let objBoss;
let width = 384;
let height = 448;
let life = 1;
let scene = GetEnemyBossSceneObjectID();


@Event{
    alternative(GetEventType())
    case(EV_REQUEST_LIFE){
        SetScriptResult(life);
    }
}


@Initialize{
    objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
    ObjEnemy_Regist(objBoss);
	SetCommonData("non1", "no");
	
	
	TFinalize(objBoss);
	
	
    ObjMove_SetDestAtFrame(objBoss, width/2, 2*height/5, 60);
	Main;
}

@MainLoop{
    yield;
}


task Main{
    Name(1, objBoss);
	skip(objBoss);
    SetForbidPlayerShot(true);
	ObjEnemy_SetDamageRate(objBoss, 0,0);
	let time = 150;
	wait(90);
	let t=0;
	let text = speak(true, "Now look at what[r]you've done!!");
	while(t<time){
	    if(GetVirtualKeyState(VK_OK) == KEY_PUSH){t=time;}
		t++; yield;
	}
	Obj_Delete(text);
	t=0;
	text = speak(true, "I will make you pay.");
	while(t<time){
	    if(GetVirtualKeyState(VK_OK) == KEY_PUSH){t=time;}
		t++; yield;
	}
	Obj_Delete(text);
	ObjEnemy_SetLife(objBoss, 0);
}