script_enemy_main
{

	#include_function".\stage1_Boss_Info.txt";

	let count = 0;
	let bgm = false;

	task Behavior()
	{
	yield;
	SetCommonData("ng_feverdecrease", 0);	// Fever score stop
	SetMovePosition03(GetCenterX, GetClipMinY + 96, 20, 5);
	while (GetEventStep() != 1)	{	yield;	}
	SetMovePosition02(GetClipMinX-50, GetClipMinY -50, 20);
	while (GetEventStep() != 2)	{	yield;	}
	SetCommonData("CD_BossFight", 0);		// Boss Fight stop
	bgm = true;
	}

//---------------------------------------------------------------------------------------------
	@Initialize
	{
	SetLife(1);
	DeleteEnemyShotToItem(ALL);
	SetDamageRate(0, 0);
	LoadGraphic(BossSprite);
	SetGraphicRect(1, 1, BSR_sizex, BSR_sizey);
	CreateEventFromScript("stage0_bossclear");
	Behavior;
	}

	@MainLoop
	{
	if( !OnEvent() && bgm) {	VanishEnemy;	}
	yield;
	count++;
	}

	@DrawLoop
	{
	SetTexture(BossSprite);
	SetGraphicAngle(0, 0, 0);
	SetGraphicScale(1, 1);
	#include_function".\..\function\boss_draw.txt";
	}
}

//---------------------------------------------------------------------------------------------

script_event stage0_bossclear

	{

       	let chara21 = GetCurrentScriptDirectory~"..\img\boss\Rosa_f1.png";
       	let chara22 = GetCurrentScriptDirectory~"..\img\boss\Rosa_f2.png";
       	let chara23 = GetCurrentScriptDirectory~"..\img\boss\Rosa_f3.png";
       	let chara24 = GetCurrentScriptDirectory~"..\img\boss\Rosa_f4.png";
       	let chara25 = GetCurrentScriptDirectory~"..\img\boss\Rosa_f5.png";

	@Initialize
	{
	LoadGraphic(chara21);
	LoadGraphic(chara22);
	LoadGraphic(chara23);
	LoadGraphic(chara24);
	LoadGraphic(chara25);
	}

	@MainLoop
	{

	if ((GetPlayerType == REIMU_A) || (GetPlayerType == REIMU_B))
	{


		SetChar(RIGHT, chara24);
		SetGraphicRect(RIGHT, 1, 1, 200, 320);
		MoveChar(RIGHT, FRONT);
		SetNameFromText(RIGHT, TEXT_AQUA, "Rosa Selina", "The Operator");
		TextOutA("\c[AQUA]As I expected.");
		MoveChar(RIGHT, BACK);

		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]Ok, now it's my turn.");
		TextOutA("\c[RED]Do you know who's the owner \nof this place or something?");
		TextOutA("\c[RED]I knew much about youkai and \nproblem they involved.");
		TextOutA("\c[RED]But this place...");
		MoveChar(LEFT, BACK);

		SetChar(RIGHT, chara21);
		MoveChar(RIGHT, FRONT);
		TextOutA("\c[AQUA]It hard to tell, but...");
		TextOutA("\c[AQUA]Leader of this place and the \nfestival holder, are different person.");
		SetChar(RIGHT, chara22);
		TextOutA("\c[AQUA]Oh! Asking him may be better.");
		MoveChar(RIGHT, BACK);

		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]Who?");
		MoveChar(LEFT, BACK);

		SetChar(RIGHT, chara21);
		MoveChar(RIGHT, FRONT);
		TextOutA("\c[AQUA]He is Nurture, our commander.");
		SetChar(RIGHT, chara25);
		TextOutA("\c[AQUA]But I don't sure where he is now.");
		TextOutA("\c[AQUA]Because he's the competitor too.");
		MoveChar(RIGHT, BACK);

		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]And then?");
		MoveChar(LEFT, BACK);

		MoveChar(RIGHT, FRONT);
		TextOutA("\c[AQUA]As I told you.");
		TextOutA("\c[AQUA]This festival will reward the one \nwho beat the most people.");
		TextOutA("\c[AQUA]So he has to move around \nto challenging more people.");
		TextOutA("\c[AQUA]That's why I don't know where he is.");
		MoveChar(RIGHT, BACK);

		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]How cool...");
		MoveChar(LEFT, BACK);

		SetChar(RIGHT, chara21);
		MoveChar(RIGHT, FRONT);
		TextOutA("\c[AQUA]I have to go now. \nHope you find him soon.");
		MoveChar(RIGHT, BACK);

		SetStep(1);
		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]May be...");
		MoveChar(LEFT, BACK);
		SetStep(2);

	}








	else if ((GetPlayerType == MARISA_A) || (GetPlayerType == MARISA_B))
	{

		SetChar(RIGHT, chara24);
		SetGraphicRect(RIGHT, 1, 1, 200, 320);
		MoveChar(RIGHT, FRONT);
		SetNameFromText(RIGHT, TEXT_AQUA, "Rosa Selina", "The Operator");
		TextOutA("\c[AQUA]Excellent!");
		MoveChar(RIGHT, BACK);

		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]Now I get score from you right?");
		MoveChar(LEFT, BACK);

		SetChar(RIGHT, chara25);
		MoveChar(RIGHT, FRONT);
		TextOutA("\c[AQUA]Yes Miss, I lose again... *sign*");
		MoveChar(RIGHT, BACK);

		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]Haha. Try some powerfull danmaku.");
		TextOutA("\c[RED]That should help you a lot.");
		MoveChar(LEFT, BACK);

		SetChar(RIGHT, chara21);
		MoveChar(RIGHT, FRONT);
		TextOutA("\c[AQUA]That not suited my style at all.");
		MoveChar(RIGHT, BACK);

		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]It'll suprise your opponent, trust me.");
		MoveChar(LEFT, BACK);

		SetChar(RIGHT, chara24);
		MoveChar(RIGHT, FRONT);
		TextOutA("\c[AQUA]Like you did right?");
		MoveChar(RIGHT, BACK);

		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]Haha, at least.");
		MoveChar(LEFT, BACK);

		MoveChar(RIGHT, FRONT);
		TextOutA("\c[AQUA]I have to go now. \nThank for coming Miss.");
		MoveChar(RIGHT, BACK);

		SetStep(1);
		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]Ok, where the next one?");
		MoveChar(LEFT, BACK);
		SetStep(2);
	}









	else
	{
		SetChar(RIGHT, chara24);
		SetGraphicRect(RIGHT, 1, 1, 200, 320);
		MoveChar(RIGHT, FRONT);
		SetNameFromText(RIGHT, TEXT_AQUA, "Rosa Selina", "The Operator");
		TextOutA("\c[AQUA]Nice start Miss.");
		MoveChar(RIGHT, BACK);

		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]How can I find other people?");
		MoveChar(LEFT, BACK);

		SetChar(RIGHT, chara21);
		MoveChar(RIGHT, FRONT);
		TextOutA("\c[AQUA]Hmm.. it's hard to tell exactly \nwhere they are.");
		TextOutA("\c[AQUA]Since everyone are moving around \nchallenging each other.");
		TextOutA("\c[AQUA]Why you don't take a chance to \ntour around this place?");
		MoveChar(RIGHT, BACK);

		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]I guess I have no choice.");
		MoveChar(LEFT, BACK);

		MoveChar(RIGHT, FRONT);
		TextOutA("\c[AQUA]Please enjoy a tour, \nSee you again Miss.");
		MoveChar(RIGHT, BACK);

		SetStep(1);
		MoveChar(LEFT, FRONT);
		TextOutA("\c[RED]Well.");
		MoveChar(LEFT, BACK);
		SetStep(2);
	}






		End;

	}

	@Finalize
	{


	DeleteGraphic(chara21);
	DeleteGraphic(chara22);
	DeleteGraphic(chara23);
	DeleteGraphic(chara24);
	DeleteGraphic(chara25);

	}

}