
#Title[enm7 before talk(m)]
#Text[exbm]
#Player[FREE]
#BackGround[Default]
#ScriptVersion[2]

script_event Event01{
	let i		= 0;
	let csd		= GetCurrentScriptDirectory;
	let plaimg	= [csd~".\enm7img\Mar00.png",//normal
				csd~".\enm7img\Mar01.png",//sly
				csd~".\enm7img\Mar02.png",//grin
				csd~".\enm7img\Mar03.png",//scared
				csd~".\enm7img\Mar04.png",//grr
				csd~".\enm7img\Mar05.png",//tired
				csd~".\enm7img\Mar06.png",//smile
				csd~".\enm7img\Mar07.png",//angry
				csd~".\enm7img\Mar08.png"];//proud
	let enmimg	= [csd~".\enm7img\mint00000.png",//
					csd~".\enm7img\mint00001.png",//@
					csd~".\enm7img\mint00002.png",//
					csd~".\enm7img\mint00003.png",//΂
					csd~".\enm7img\mint00004.png",//{
					csd~".\enm7img\mint00005.png",//{2
					csd~".\enm7img\mint00006.png",//
					csd~".\enm7img\mint00007.png",//
					csd~".\enm7img\mint00008.png",//f
					csd~".\enm7img\mint00009.png",//f2
					csd~".\enm7img\mint00010.png",//f3
					csd~".\enm7img\mint00011.png"];//{
	
	@Initialize {
		loop(9){
			LoadGraphic(plaimg[i]);
			i++;
		}
		i=0;
		loop(12){
			LoadGraphic(enmimg[i]);
			i++;
		}
		i=0;
		CreateCommonDataArea("in");
		SetCommonDataEx("in","move",false);
		SetCommonDataEx("in","music",false);
		SetCommonDataEx("in","snd",false);
	}
	
	@MainLoop {
		SetChar(LEFT,plaimg[2]);
		SetGraphicRect(LEFT,120,1,384,512/1.5);
		MoveChar(LEFT,FRONT);
		TextOut("\c[BLUE]Heh heh heh. Where there's\n
		meteors, there's rare metals.\n
		And where there's rare metals, there's\n
		catalysts for high-level magic!");
		TextOut("\c[BLUE]Now, I gotta finish my work before\n
		Reimu gets here...");
		
		MoveChar(LEFT,BACK);
		TextOut("\c[RED]Get away from there.");
		SetCommonDataEx("in","move",true);

		SetChar(RIGHT,enmimg[0]);
		SetGraphicRect(RIGHT,1,1,384/1.3,512/1.4);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]The one over there is a gentle soul,\n
		who truly loves greenery.");
		SetCommonDataEx("in","snd",true);
		TextOut("\c[RED]He's finally been freed from the cold, 
		dark underworld, and has come to this\n
		world of water, greenery and sunlight.");

		SetChar(LEFT,plaimg[3]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Wha? Am I dreaming or somethin'?\n
		This small fry's suddenly saying\n
		somethin' complicated.");
		SetChar(LEFT,plaimg[1]);
		TextOut("\c[BLUE]Well, whatever. I'll just shoot her\n
		down quick and snap up the rare metals.");

		SetChar(RIGHT,enmimg[2]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]My, my. Smell these herbs and calm\n
		down, will you?");
		TextOut("\c[RED]This whole area is a carpet of mint,\n
		blooming due to my power.\n
		There's no escape.");

		SetChar(LEFT,plaimg[3]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]What's this...? Suddenly I really\n
		feel calmed down...");
		TextOut("\c[BLUE]Whoa whoa whoa, this isn't what a\n
		danmaku battle should feel like!");

		SetChar(RIGHT,enmimg[2]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]People worshipped that star there as\n
		`Pluto', making a ruckus about him\n
		being the ninth planet.");
		TextOut("\c[RED]That's just an old story by now,\n
		though.");
		TextOut("\c[RED]He's at last been forgotten by\n
		humanity, and can live a peaceful\n
		life in Gensokyo.");
		TextOut("\c[RED]And now I, too, can be by his side\n
		forever more.");
		SetChar(RIGHT,enmimg[8]);		
		TextOut("\c[RED]I won't let you get in my way...\n
		hey, are you listening?");

		SetChar(LEFT,plaimg[2]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]...muh? Oh, sorry there, I kinda\n
		zoned out.\n
		I guess your powers are doing somethin'
		to my head.");
		TextOut("\c[BLUE]I think I had a nice little nap and\n
		rebooted my brain!\n
		This stuff would be pretty powerful\n
		if you mixed it into a magic potion.");

		SetChar(RIGHT,enmimg[1]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]...you are quite a skilled fighter,\n
		aren't you? Well, too bad for you.");
		TextOut("\c[RED]The opponent in front of you isn't\n
		just some small-fry fairy.");

		SetChar(LEFT,plaimg[2]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Your technique just now pretty much\n
		told me that.");
		TextOut("\c[BLUE]If it's come to this, I can't cut\n
		corners with lasers that won't\n
		hurt if they hit you!");

		SetChar(RIGHT,enmimg[5]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","music",true);
		TextOut("\c[RED]Leave us alone already, you greedy\n
		human!");
		SetChar(RIGHT,enmimg[0]);
		TextOut("\c[RED]In this charred forest, even all the\n
		magic mushrooms will be covered by\n
		my mint!");
		TextOut("\c[RED]And thus, this place will become our\n
		final home!");

		End();
	}
		
	@Finalize {
	}
}

script_enemy_main {
	let csd			= GetCurrentScriptDirectory;
	let imgEffect	= csd~".\enm7eff\bossEfect.png";
	let imgSPNB		= csd~".\enm7eff\spellEfect.png";
	let t5			= GetCurrentScriptDirectory~".\enm3se\timer1.wav";
	let t10			= GetCurrentScriptDirectory~".\enm3se\timer2.wav";
	let tan			= GetCurrentScriptDirectory~".\enm3se\shot1.wav";
	let kira		= GetCurrentScriptDirectory~".\enm3se\shot2.wav";
	let Gspel		= GetCurrentScriptDirectory~".\enm3se\echo5.wav";
	let laser		= GetCurrentScriptDirectory~".\enm3se\Laser2.wav";
	let power		= GetCurrentScriptDirectory~".\enm3se\enemy_powereffect.wav";
	let powerl		= GetCurrentScriptDirectory~".\enm3se\power_logo.wav";
	let gekiha		= GetCurrentScriptDirectory~".\enm3se\BossEnd.wav";
	let powerla		= GetCurrentScriptDirectory~".\enm3se\power_logo.wav";
	let kaku		= GetCurrentScriptDirectory~".\enm3se\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 i			= 0;

	@Initialize {
		SetX(MaxX+100);
		SetY(MinY-100);
	
		SetLife(5000);
		SetDamageRate(0,0);
		
		CreateCommonDataArea("anime");
		SetCommonDataEx("anime","anime_flag",false);
	
		/*e폜@(l64)*/
		SetShotAutoDeleteClip(30,30,30,30);
	
		LoadUserShotData(shotdir);
		LoadGraphic(imgEffect);
		Aura(8,180,255,210);
		MagicCircle(false);
		SetRateScoreSystemEnable(false);
		EnemyTexture07(true);
		VSname(1);
		while(i<10){
			VSname2(0+i*10,1);
			i++;
		}i=0;
		CreateEventFromScript("Event01");
		
		CreateEnemyFromFile(csd~"enm7_Family00_Extra.txt",0,0,0,0,0);
    }

	@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"
}