
#Title[enm5 before talk()]
#Text[~VFET^WF@퓬Ob()]
#Player[FREE]
#BackGround[Default]
#ScriptVersion[2]

script_event Event01{
	let i		= 0;
	let csd		= GetCurrentScriptDirectory;
	let plaimg	= [csd~".\enm5img\Sak00.png",//normal
				csd~".\enm5img\Sak01.png",//sly
				csd~".\enm5img\Sak02.png",//grin
				csd~".\enm5img\Sak03.png",//scared
				csd~".\enm5img\Sak04.png",//grr
				csd~".\enm5img\Sak05.png",//tired
				csd~".\enm5img\Sak06.png",//smile
				csd~".\enm5img\Sak07.png",//angry
				csd~".\enm5img\Sak08.png",//proud
				csd~".\enm5img\Sak09.png"];//evil
	let enmimg	= [csd~".\enm5img\michel00000.png",//
					csd~".\enm5img\michel00001.png",//΂
					csd~".\enm5img\michel00002.png",//{
					csd~".\enm5img\michel00003.png",//f
					csd~".\enm5img\michel00004.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]All these people are awfully shiny.");
		TextOut("\c[BLUE]I wonder if they've attached light\n
		bulbs to their clothes?");
		
		MoveChar(LEFT,BACK);
		TextOut("\c[RED]Heh heh. Are our figures too dazzling\n
		for Satan's emissaries?");
		SetCommonDataEx("in","move",true);

		SetChar(RIGHT,enmimg[0]);
		SetGraphicRect(RIGHT,1,1,384/1.5,512/1.5);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","snd",true);
		TextOut("\c[RED]There shouldn't be any humans without\n
		our seal on this mountain.\n
		If you're here, you must be a servant\n
		of the devil.");

		SetChar(LEFT,plaimg[5]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Well, you aren't exactly wrong, but...");

		SetChar(RIGHT,enmimg[1]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]No one can overturn the prophecy.");
		TextOut("\c[RED]Before our heavenly army, the forces\n
		of darkness will fall.");
		TextOut("\c[RED]Repent now and join us. If you are to\n
		convert, now is your chance.");

		SetChar(LEFT,plaimg[0]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Thanks for the offer, but I haven't\n
		the time.");
		TextOut("\c[BLUE]I must return quickly and make dinner, 
		or the young mistresses will be\n 
		trembling.");

		SetChar(RIGHT,enmimg[1]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]In that case, it's no use worrying.");
		TextOut("\c[RED]The people of darkness can relax in\n
		the bath of hellfire and sulfur we've\n
		prepared for them.");

		SetChar(LEFT,plaimg[5]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Unfortunately for you, we aren't in\n
		the habit of bathing.");

		SetChar(RIGHT,enmimg[2]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]So you're acting like hippies, now?");
		TextOut("\c[RED]I suppose it's impossible for me to\n
		persuade you.");
		SetCommonDataEx("in","music",true);
		TextOut("\c[RED]Enough. It was foolish of me to think\n
		that I could communicate with\n
		beings of evil.");

		SetChar(LEFT,plaimg[2]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]We fight with danmaku here, after all.");
		TextOut("\c[BLUE]It's very suitable, both before and\n
		afterwards.");

		SetChar(RIGHT,enmimg[0]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]Very well. If that's what you wish,\n
		then so be it.");

		SetChar(LEFT,plaimg[0]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]At any rate, you people are our\n
		enemies, being denizens of the midday\n
		light.");

		SetChar(RIGHT,enmimg[0]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]This mountain is Gensokyo's Promised\n
		Land.\n
		This is the place that will protect the
		children of men from the battle between
		light and darkness that is about to\n
		begin.");
		TextOut("\c[RED]Human who's heart has been stolen by\n
		Satan! I will not permit you to climb\n
		this holy mountain any further!");

		End();
	}
		
	@Finalize {
	}
}

script_enemy_main {
    let imgEffect = GetCurrentScriptDirectory~".\enm3eff\bossEfect.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 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,50,50,255);
	MagicCircle(false);
	SetRateScoreSystemEnable(false);
	EnemyTexture05b(true);
	VSname(1);
	VSname2(0,1);
	VSname2(10,1);
	VSname2(20,1);
	VSname2(30,1);
	VSname2(40,1);
	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"
}