
#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\Mar00.png",//normal
				csd~".\enm6img\Mar01.png",//sly
				csd~".\enm6img\Mar02.png",//grin
				csd~".\enm6img\Mar03.png",//scared
				csd~".\enm6img\Mar04.png",//grr
				csd~".\enm6img\Mar05.png",//tired
				csd~".\enm6img\Mar06.png",//smile
				csd~".\enm6img\Mar07.png",//angry
				csd~".\enm6img\Mar08.png"];//proud
	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(9){
			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[3]);//LN^̉摜ݒ
		SetGraphicRect(LEFT,120,1,384,512/1.5);
		MoveChar(LEFT,FRONT);
		TextOut("\c[BLUE]That morning star is shining so\n
		bright up there.\n
		Ohh, this doesn't bode well.\n
		Even my body feels hot now.");
		
		MoveChar(LEFT,BACK);
		TextOut("\c[RED]Repent, for it is done.");
		SetCommonDataEx("in","move",true);

		SetChar(RIGHT,enmimg[0]);
		SetGraphicRect(RIGHT,1,1,384/1.5,512/1.5);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]To the thirsty, I will give freely\n
		from the fountain of life.");

		SetChar(LEFT,plaimg[6]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Ooh, is the final boss a water-type?\n
		You don't see that too often.\n
		Feels refreshing.");

		SetChar(RIGHT,enmimg[3]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","snd",true);
		TextOut("\c[RED]Indeed, for I am a fisher of men.");
		TextOut("\c[RED]I fish not with nets and bait,\n
		but with forgiveness.");

		SetChar(LEFT,plaimg[2]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Even reeeeally sinful men who the\n
		Yama and angels gave up on?\n
		Even I'm forgiven?");

		SetChar(RIGHT,enmimg[5]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]All humans, starting from Adam and Eve,
		and continuing to all those born\n
		in the future.");
		TextOut("\c[RED]They will all be granted forgiveness.\n
		My blood was shed in the past for\n
		this reason.");
		TextOut("\c[RED]Have you not seen this figure before?\n
		`The saint was crucified on the cross.'");

		SetChar(LEFT,plaimg[6]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Looks more like `humanity started using
		the decimal system',\n 
		but you'll forgive that too, right?");

		SetChar(RIGHT,enmimg[1]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]I forgive the fact that you have not\n
		repented despite being forgiven.");

		SetChar(LEFT,plaimg[4]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]What the...? If even the bad people\n
		get saved, isn't it okay to just\n
		constantly do evil?");

		SetChar(RIGHT,enmimg[5]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]Ah, how people tread on the heart of\n
		my Father.\n
		It breaks my heart with grief.");
		TextOut("\c[RED]Father, I beg of you, do not hold\n
		this sin against them.");

		SetChar(LEFT,plaimg[5]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Why do all you big-shot types go\n
		around taking everything so seriously\n
		like this?");
		SetChar(LEFT,plaimg[1]);
		TextOut("\c[BLUE]Miko told me. It's only natural for\n
		people to have ten desires.");
		TextOut("\c[BLUE]So, isn't it okay to live true to\n
		those desires?");
		TextOut("\c[BLUE]And, my desires... are being used by\n
		you, right?\n
		I bet you're using them for some\n
		strange spell!");

		SetChar(RIGHT,enmimg[1]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","music",true);
		TextOut("\c[RED]...this girl's sin...is greed.");
		TextOut("\c[RED]Ahh, a child of man has at last taken\n
		the hand of sin, and become foolish.");
		TextOut("\c[RED]All who draw the sword will die by\n
		the sword.");

		SetChar(LEFT,plaimg[8]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]I'm not scared! In Gensokyo, we have\n
		the best doctor in the universe!");

		SetChar(RIGHT,enmimg[4]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]It is not the healthy who need a\n
		doctor.");
		TextOut("\c[RED]I have come not to lead the righteous\n
		to repentance, but the sinners!");

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