script_enemy_main {
    #include_function ".\spellcard.txt"
    #include_function ".\..\lib\enemyfunctions.txt"
    #include_function "script\lib\dialoguefunctions.txt"
	#include_function ".\boss1anim.txt"
	let nitoriimg=GetCurrentScriptDirectory~"img\nitori.png";

sub SetDialogue{
	yield;
	SetCharImg("LEFT", nitoriimg, 0, 0, 64, 64);
	AddDialogueText("OH MY GOD WHAT IS THAT!?!?!?", 255, 128, 255, 128);
	SetCharImg("LEFT", "", 0, 0, 64, 64);
	DialogueVariableChange(1, 1);
	DialogueWait(30);
	AddDialogueText("TARGET ACQUIRED. READY FOR TAKE DOWN.", 255, 255, 255, 255);
	SetCharImg("LEFT", nitoriimg, 0, 0, 64, 64);
	AddDialogueText("You have got to be kidding me... Not now...", 255, 128, 255, 128);
	SetCharImg("LEFT", "", 0, 0, 64, 64);
	AddDialogueText("CHARGING IN 3.", 255, 255, 255, 255);
	SetCharImg("LEFT", nitoriimg, 0, 0, 64, 64);
	AddDialogueText("Here we go...", 255, 128, 255, 128);
	SetCharImg("LEFT", "", 0, 0, 64, 64);
	AddDialogueText("2.", 255, 255, 255, 255);
	SetCharImg("LEFT", nitoriimg, 0, 0, 64, 64);
	AddDialogueText("You are going to regret this...", 255, 128, 255, 128);
	SetCharImg("LEFT", "", 0, 0, 64, 64);
	AddDialogueText("1.", 255, 255, 255, 255);
	SetCharImg("LEFT", nitoriimg, 0, 0, 64, 64);
	AddDialogueText("AHHHHHHHHHHHHH!!!!!!", 255, 128, 255, 128);
	SetCharImg("LEFT", "", 0, 0, 64, 64);
	AddDialogueText("0.", 255, 255, 255, 255);
	InitializeDialogue(1);
}

	@Initialize {
		EnemyInit(10, 0);
		LoadGraphic(nitoriimg);
		SetDialogue;
		ClearScreen;
	}
	
	@MainLoop{
		if(changevariables[1]==1){SetMovePosition01(GetX, GetY+50, 3); changevariables[1]=2;}
        yield;
	}

	@DrawLoop {
		anim_idle;
	}
	
	@Finalize {
		CreateEnemyFromFile(GetCurrentScriptDirectory~"boss1_non01.txt", GetX, GetY, 0, 0, 0);
		SetCommonData("AREA1ROBOBGM", "TRUE");
	}
}