
#Title[enm3 before talk()]
#Text[CVAEiUkX@퓬Ob()]
#Player[FREE]
#BackGround[Default]
#ScriptVersion[2]

script_event Event01{
	let i		= 0;
	let csd		= GetCurrentScriptDirectory;
	let plaimg	= [csd~".\enm6img\Sak00.png",//normal
				csd~".\enm6img\Sak01.png",//sly
				csd~".\enm6img\Sak02.png",//grin
				csd~".\enm6img\Sak03.png",//scared
				csd~".\enm6img\Sak04.png",//grr
				csd~".\enm6img\Sak05.png",//tired
				csd~".\enm6img\Sak06.png",//smile
				csd~".\enm6img\Sak07.png",//angry
				csd~".\enm6img\Sak08.png",//proud
				csd~".\enm6img\Sak09.png"];//evil
	let enmimg	= [csd~".\enm6img\iesua00000.png",//0
					csd~".\enm6img\iesua00001.png",//1
					csd~".\enm6img\iesua00002.png",//2
					csd~".\enm6img\iesua00003.png",//J3
					csd~".\enm6img\iesua00004.png",//J4
					csd~".\enm6img\iesua00005.png"];//J5
	
	@Initialize {
		loop(10){
			LoadGraphic(plaimg[i]);
			i++;
		}
		i=0;
		loop(6){
			LoadGraphic(enmimg[i]);
			i++;
		}
		i=0;
		CreateCommonDataArea("in");
		SetCommonDataEx("in","move",false);
		SetCommonDataEx("in","music",false);
		SetCommonDataEx("in","snd",false);
	}
	
	@MainLoop {
		SetChar(LEFT,plaimg[1]);//LN^̉摜ݒ
		SetGraphicRect(LEFT,120,1,384,512/1.5);
		MoveChar(LEFT,FRONT);
		TextOut("\c[BLUE]It's night-time, but thanks to those\n
		angels, it's as bright as day.");
		TextOut("\c[BLUE]I was right to not take Milady with me.");
		
		MoveChar(LEFT,BACK);
		TextOut("\c[RED]You have done a good thing.");
		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]Now, take this sacred fire and return\n
		to the house of devils.");
		TextOut("\c[RED]What you must do lies there.");

		SetChar(LEFT,plaimg[1]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]`What I must do' is something else.");
		TextOut("\c[BLUE]First and foremost, I have to discover 
		the origin of that meteorite.");
		
		SetChar(RIGHT,enmimg[4]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]One must not be bound by old laws.\n
		Have faith in the Heavenly Father.");

		SetChar(LEFT,plaimg[4]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]That meteorite fell because of you,\n
		correct?");

		SetChar(RIGHT,enmimg[3]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]Let me make a comparison. Two people\n
		separately drop a small pebble and a\n
		star.");
		TextOut("\c[RED]If I removed either of those people,\n
		would my actions be more appreciated\n
		than if I simply took those stones\n
		away?");

		SetChar(LEFT,plaimg[0]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]So you did drop the star, is that\n
		right?");

		SetChar(RIGHT,enmimg[5]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]The one who dropped that star is deeper
		in sin than all others.");
		TextOut("\c[RED]However, that person gave much to the\n
		children of man. I intend to\n
		forgive him.");

		SetChar(LEFT,plaimg[9]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]This is the most confusing conversation
		I've ever had.");
		TextOut("\c[BLUE]However, I do understand that I can't\n
		forgive you for this.");

		SetChar(RIGHT,enmimg[5]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]You are a child of man. Why do you\n
		ignore the voice of God, and continue\n
		to sell your soul to Satan?");

		SetChar(LEFT,plaimg[1]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]I was saved by a vampire once. I don't 
		remember ever being saved by God.");

		SetChar(RIGHT,enmimg[1]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","music",true);
		TextOut("\c[RED]...this girl's sin...is sloth.");
		TextOut("\c[RED]Ignorance is not a sin, but knowing\n
		and standing idle certainly is.");

		SetChar(LEFT,plaimg[9]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]There's one more thing I must do.");
		TextOut("\c[BLUE]I must exterminate those who hold light
		in higher regard than Milady's life!");

		SetChar(RIGHT,enmimg[4]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]Aah, woe upon he who betrays the son\n
		of man.");
		TextOut("\c[RED]It would be far better for them if\n
		they had never been born!");

		End();
	}
		
	@Finalize {
	}
}

script_enemy_main {
    let gcsd      = GetCurrentScriptDirectory;
    let effimg    = gcsd ~ ".\enm6eff\bulletbreak.png";
    let imgSPNB   = GetCurrentScriptDirectory~".\enm6eff\spellEfect.png";
    let imgEffect = GetCurrentScriptDirectory~".\enm6eff\bossEfect.png";
    let t5        = GetCurrentScriptDirectory~".\enm6se\timer1.wav";
    let t10       = GetCurrentScriptDirectory~".\enm6se\timer2.wav";
    let tan       = GetCurrentScriptDirectory~".\enm6se\shot1.wav";
    let kira      = GetCurrentScriptDirectory~".\enm6se\shot2.wav";
    let Gspel     = GetCurrentScriptDirectory~".\enm6se\echo5.wav";
    let laser     = GetCurrentScriptDirectory~".\enm6se\Laser2.wav";
    let power     = GetCurrentScriptDirectory~".\enm6se\enemy_powereffect.wav";
    let powerl    = GetCurrentScriptDirectory~".\enm6se\power_logo.wav";
    let gekiha    = GetCurrentScriptDirectory~".\enm6se\BossEnd.wav";
    let powerla   = GetCurrentScriptDirectory~".\enm6se\power_logo.wav";
    let kaku      = GetCurrentScriptDirectory~".\enm6se\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,255,255);
	MagicCircle(false);
	SetRateScoreSystemEnable(false);
	EnemyTexture06(true);
	VSname(1);
	VSname2(0,1);
	VSname2(10,1);
	VSname2(20,1);
	VSname2(30,1);
	VSname2(40,1);
	VSname2(50,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"
}