#TouhouDanmakufu[Single]
#ScriptVersion[3]
#Title["Shizuha Dialog"]
#Text["..."]

let bossObj;
let bossX;
let bossY;
let damage = 0;
#include"./../Functions/Dialog.txt"
#include"./DrawBoss.txt"
#include"./LoadGraphics.txt"

@Initialize{
	bossObj = ObjEnemy_Create(OBJ_ENEMY_BOSS);
	ObjMove_SetDestAtFrame(bossObj,-180,CenterY-120,5);
	SetCommonData("ForceLifebar",1);
	SetCommonData("Timer",1);
	SetAutoDeleteObject(true);
	ObjEnemy_Regist(bossObj);
	animateBossS;
	mainTask;}

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

@MainLoop{
	bossX = ObjMove_GetX(bossObj);
	bossY = ObjMove_GetY(bossObj);
	ObjEnemy_SetIntersectionCircleToShot(bossObj,bossX,bossY,24);
	ObjEnemy_SetIntersectionCircleToPlayer(bossObj,bossX,bossY,32);
	yield;}

@Finalize{}

task mainTask{
	DeleteShotAll(TYPE_ALL,TYPE_FADE);
	wait(60);
	ObjMove_SetDestAtWeight(bossObj,CenterX,CenterY-120,7,5);
	SetForbidPlayerShot(true);
	SetForbidPlayerSpell(true);

	CreateTextBox;
	SetRightImage(shizuha02,0,2,256,256,256,335);
		TalkRight;
		TextRightB("Oh! Look who is here.",128,255,150,50);
	SetRightImage(shizuha01,0,2,256,256,276,335);
		TextRightB("You don't need to hurry, my dear. [r] You are too late!",190,255,150,50);
		TextRightB("Because it's already the end of the Autumn!",190,255,150,50);
	SetForbidPlayerShot(false);
	SetForbidPlayerSpell(false);

	DeleteLeftImage;
	DeleteRightImage;
	DeleteTextBox;
	wait(60);
	ObjEnemy_SetLife(bossObj,0);
	wait(1);
	Obj_Delete(bossObj);
	CloseScript(GetOwnScriptID);}