
#Title[enm1 before talk()]
#Text[[VFp[h@퓬Ob()]
#Player[FREE]
#BackGround[Default]
#ScriptVersion[2]

script_event Event01{
	let i		= 0;
	let csd		= GetCurrentScriptDirectory;
	let plaimg	= [csd~".\enm1img\Sak00.png",//normal
				csd~".\enm1img\Sak01.png",//sly
				csd~".\enm1img\Sak02.png",//grin
				csd~".\enm1img\Sak03.png",//scared
				csd~".\enm1img\Sak04.png",//grr
				csd~".\enm1img\Sak05.png",//tired
				csd~".\enm1img\Sak06.png",//smile
				csd~".\enm1img\Sak07.png",//angry
				csd~".\enm1img\Sak08.png",//proud
				csd~".\enm1img\Sak09.png"];//evil
	let enmimg	= [csd~".\enm1img\face101ct.png",//
					csd~".\enm1img\mery00001.png",//Ί
					csd~".\enm1img\mery00002.png",//J
					csd~".\enm1img\mery00003.png",//f
					csd~".\enm1img\mery00004.png"];//{
	
	@Initialize {
		loop(9){
			LoadGraphic(plaimg[i]);
			i++;
		}
		i=0;
		loop(5){
			LoadGraphic(enmimg[i]);
			i++;
		}
		i=0;
		CreateCommonDataArea("in");
		SetCommonDataEx("in","move",false);
		SetCommonDataEx("in","music",false);
		SetCommonDataEx("in","snd",false);
	}
	
	@MainLoop {
		SetChar(LEFT,plaimg[4]);
		SetGraphicRect(LEFT,120,1,384,512/1.5);
		MoveChar(LEFT,FRONT);
		TextOut("\c[BLUE]What an odd smell. Is there any\n
		animal in Gensokyo that smells like\n
		this?");
		
		MoveChar(LEFT,BACK);
		TextOut("\c[RED]Time rolls on as the devils stay\n
		inside.");
		SetCommonDataEx("in","move",true);

		SetChar(RIGHT,enmimg[1]);
		SetGraphicRect(RIGHT,1,1,384/1.5,512/1.5);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","snd",true);
		TextOut("\c[RED]Marry Shepherd here is gonna turn\n
		this place into her new wool farm!");

		SetChar(LEFT,plaimg[1]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Ah, have you come to Gensokyo, too,\n
		Merry? Last I heard, you were in\n
		Yokohama.");

		SetChar(RIGHT,enmimg[3]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]Are you confusing me with a different\n
		Marry?");
		SetChar(RIGHT,enmimg[2]);
		TextOut("\c[RED]Anyways, are you the one who dropped\n
		that star? You've ruined the farm\n
		that I put so much work into!");

		SetChar(LEFT,plaimg[2]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Well, it wasn't us Our doing...");
		TextOut("\c[BLUE]Though I suppose it's certainly true\n
		that we're happy about how Lucifer's\n
		power is increasing.");

		SetChar(RIGHT,enmimg[2]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","music",true);
		TextOut("\c[RED]Is that so? Well if this makes you\n
		happy, then you must be evil too!");
		TextOut("\c[RED]Did you know? Sheep's blood is a\n
		powerful amulet against evil spirits.\n
		An underling of the devil is no match\n
		for my sheep!");

		End();
	}
		
	@Finalize {
	}
}

script_enemy_main {
    let imgEffect = GetCurrentScriptDirectory~".\enm3eff\bossEfect.png";
    let t5        = GetCurrentScriptDirectory~"..\..\se\timer1.wav";
    let t10       = GetCurrentScriptDirectory~"..\..\se\timer2.wav";
    let tan       = GetCurrentScriptDirectory~"..\..\se\shot1.wav";
    let kira      = GetCurrentScriptDirectory~"..\..\se\shot2.wav";
    let Gspel     = GetCurrentScriptDirectory~"..\..\se\echo5.wav";
    let laser     = GetCurrentScriptDirectory~"..\..\se\Laser2.wav";
    let power     = GetCurrentScriptDirectory~"..\..\se\enemy_powereffect.wav";
    let powerl    = GetCurrentScriptDirectory~"..\..\se\power_logo.wav";
    let gekiha    = GetCurrentScriptDirectory~"..\..\se\BossEnd.wav";
    let powerla   = GetCurrentScriptDirectory~"..\..\se\power_logo.wav";
    let kaku      = GetCurrentScriptDirectory~"..\..\se\j.wav";
    let frame     = 0;
    let GetAngle  = 0;
    let angle     = 0;
    let angle2    = 0;
    let angleBase = 0;
    let count     = 0;
    let timer     = 0;
    let shotdir   = GetCurrentScriptDirectory ~ "kshotData.txt";
    let MinX	  = GetClipMinX;
    let MaxX	  = GetClipMaxX;
    let CenX	  = GetCenterX;
    let MinY	  = GetClipMinY;
    let MaxY	  = GetClipMaxY;
    let CenY	  = GetCenterY;
    let T_count   = 0;
    let Damage    = 0;
    let a         = 0;
    let b         = 0;
    let S_count   = 0;
    let w         = 0;
    let lp        = 0;

	@Initialize {
	SetX(MaxX+100);
	SetY(MinY-100);

	SetLife(5000);
	SetDamageRate(0,0);

	/*e폜@(l64)*/
	SetShotAutoDeleteClip(30,30,30,30);

	LoadUserShotData(shotdir);
	LoadGraphic(imgEffect);
	Aura(8,255,100,32);
	MagicCircle(false);
	SetRateScoreSystemEnable(false);
	VSname(0);
	VSname2(0,0);
	VSname2(10,0);
	EnemyTexture(true);
	CreateEventFromScript("Event01");
    }

	@MainLoop {
		yield;
		
		let gm	= GetCommonDataEx("in","move");
		if(gm==true){
			SetMovePosition03(CenX,CenY-120,10,5);
		}
		if(OnEvent==false){
			SetLife(0);
		}
}

	@DrawLoop {
	}

	@Finalize {
		DeleteCommonDataEx("in","move");
		DeleteCommonDataEx("in","music");
		DeleteCommonDataEx("in","snd");
	}

	#include_function".\Obj_Control.txt"
	#include_function".\lib_kshot.txt"
}