//#TouhouDanmakufu[Single]
#ScriptVersion[3]
#System["./../system/NSystem.dnh"]
#Player["./../player/Reimu by plasmaflame22/Reimu_A.txt", "./../../player/Reimu by plasmaflame22/Reimu_C.txt"]
#Title["Credits"]
#include "./../sharedfuncSaul.dnh"



let objBoss;
let width = 444;
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");
	SetCommonData("top", "yes");
	
	TFinalize(objBoss);
	
	
    ObjMove_SetPosition(objBoss, -50, -50);
	Main;
}




@MainLoop{
    yield;
}


task Main{
    NotifyEventAll(EV_USER_STAGE+5, 0);
    SetForbidPlayerShot(true);
	SetForbidPlayerSpell(true);
    ObjEnemy_SetDamageRate(objBoss, 0,0);
	let r= 255; let g= 255; let b = 255;
	wait(150);
	ObjMove_SetDestAtFrame(objBoss, width/2, height/2, 120);
	let t=0;
	let text = speak(true, "Impressive![r]You have achieved", r, g, b);
	while(t<180){
	    if(GetVirtualKeyState(VK_OK) == KEY_PUSH){t=180;}
		t++; yield;
	}
	Obj_Delete(text);
	t=0;
	text = speak(true, "something which[r]the programmer hasn't,", r, g, b);
	while(t<180){
	    if(GetVirtualKeyState(VK_OK) == KEY_PUSH){t=180;}
		t++; yield;
	}
	Obj_Delete(text);
	t=0;
	text = speak(true, "ie beating this[r]silly difficulty!!", r, g, b);
	while(t<180){
	    if(GetVirtualKeyState(VK_OK) == KEY_PUSH){t=180;}
		t++; yield;
	}
	Obj_Delete(text);
	t=0;
	text = speak(true, "I hope that the experience[r]was not too bad.", r, g, b);
	while(t<180){
	    if(GetVirtualKeyState(VK_OK) == KEY_PUSH){t=180;}
		t++; yield;
	}
	Obj_Delete(text);
	t=0;
	text = speak(true, "In any case,[r]thanks for playing!!!", r, g, b);
	while(t<180){
	    if(GetVirtualKeyState(VK_OK) == KEY_PUSH){t=180;}
		t++; yield;
	}
	Obj_Delete(text);
	ObjEnemy_SetLife(objBoss, 0);
}