
#Title[enm4 before talk()]
#Text[P X@퓬Ob()]
#Player[FREE]
#BackGround[Default]
#ScriptVersion[2]

script_event Event01{
	let i		= 0;
	let csd		= GetCurrentScriptDirectory;
	let plaimg	= [csd~".\enm4img\Sak00.png",//normal
				csd~".\enm4img\Sak01.png",//sly
				csd~".\enm4img\Sak02.png",//grin
				csd~".\enm4img\Sak03.png",//scared
				csd~".\enm4img\Sak04.png",//grr
				csd~".\enm4img\Sak05.png",//tired
				csd~".\enm4img\Sak06.png",//smile
				csd~".\enm4img\Sak07.png",//angry
				csd~".\enm4img\Sak08.png",//proud
				csd~".\enm4img\Sak09.png"];//evil
	let enmimg	= [csd~".\enm4img\mmm10000.png",
					csd~".\enm4img\mmm10001.png",
					csd~".\enm4img\mmm10002.png",
					csd~".\enm4img\mmm10003.png",
					csd~".\enm4img\mmm10004.png",
					csd~".\enm4img\mmm10005.png"];
	
	@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 {
		yield;
		
		SetChar(LEFT,plaimg[0]);//LN^̉摜ݒ
		SetGraphicRect(LEFT,120,1,384,512/1.5);
		MoveChar(LEFT,FRONT);
		TextOut("\c[BLUE]The small fry are awfully active.");
		TextOut("\c[BLUE]Perhaps they're being influenced by\n
		Lucifer's power?");
		
		MoveChar(LEFT,BACK);
		TextOut("\c[RED]`Lucifer', hm? Such a nostalgic name.");
		SetCommonDataEx("in","move",true);

		SetChar(RIGHT,enmimg[4]);
		SetGraphicRect(RIGHT,1,1,384/1.5,512/1.5);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]There was indeed a time where even\n
		I called myself that.");

		SetChar(LEFT,plaimg[3]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]You are Lucifer, The Morning Star?");
		TextOut("\c[BLUE]You look far different from how I\n
		imagined.");

		SetChar(RIGHT,enmimg[2]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","snd",true);
		TextOut("\c[RED]Expect something on thine own, and be\n
		disappointed on thine own.\n
		This is why humans are such a bother.");
		TextOut("\c[RED]When in a given land, obey their\n
		customs.\n
		When in Rome, do as the Romans do.");
		SetChar(RIGHT,enmimg[4]);
		TextOut("\c[RED]I do like the outside world's `jeans', 
		but these `kimonos' suit me quite\n
		nicely as well.");

		SetChar(LEFT,plaimg[0]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]So, for someone with power like yours, 
		the way you lose to the shrine maiden\n
		at the start of each year is an act,\n
		right?");
		TextOut("\c[BLUE]The denizens of the night and darkness 
		would like to win every once in a while
		you know.");

		SetChar(RIGHT,enmimg[0]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]Such extravagant words. If thou should 
		wish to experience my fearsome power\n
		first-hand, then by all means continue 
		speaking.");
		TextOut("\c[RED]Thy chatter is like the barking of\n
		a whelp, thou dog of a vampire!");

		SetChar(LEFT,plaimg[2]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]So if I show my power, will you get\n
		serious as well?\n
		You little imp, pretending to be a\n
		demon lord!");

		SetChar(RIGHT,enmimg[3]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","music",true);
		TextOut("\c[RED]Thou will be perfect to help with my\n
		digestion.");
		TextOut("\c[RED]Dost thou know why I have donned this\n
		false appearance?");

		SetChar(LEFT,plaimg[0]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]You have the most power in all the\n
		West, and yet you're frightened of\n
		the myriad gods here?");
		TextOut("\c[BLUE]It's so disappointing to hear such\n
		things from the demon lord Lucifer.");

		SetChar(RIGHT,enmimg[3]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]Lucifer is one who brings forth light.");
        TextOut("\c[RED]Ame-no-Kagaseo is one who illuminates\n
		heaven.");
		TextOut("\c[RED]The Morning Star is a star that\n
		shines brightly through the darkness.");
		TextOut("\c[RED]Thine clouded eyes, unable to see the\n
		true essence of things, should be\n
		blinded by my light!");

		End();
	}
		
	@Finalize {
	}
}

script_enemy_main {
    let imgSPNB   = GetCurrentScriptDirectory~".\enm4eff\spellEfect.png";
    let imgEffect = GetCurrentScriptDirectory~".\enm4eff\bossEfect.png";
    let imgEffect2= GetCurrentScriptDirectory~".\enm4eff\wave.png";
    let t5        = GetCurrentScriptDirectory~".\enm4se\timer1.wav";
    let t10       = GetCurrentScriptDirectory~".\enm4se\timer2.wav";
    let tan       = GetCurrentScriptDirectory~".\enm4se\shot1.wav";
    let kira      = GetCurrentScriptDirectory~".\enm4se\shot2.wav";
    let Gspel     = GetCurrentScriptDirectory~".\enm4se\echo5.wav";
    let laser     = GetCurrentScriptDirectory~".\enm4se\Laser2.wav";
    let power     = GetCurrentScriptDirectory~".\enm4se\enemy_powereffect.wav";
    let powerl    = GetCurrentScriptDirectory~".\enm4se\power_logo.wav";
    let gekiha    = GetCurrentScriptDirectory~".\enm4se\BossEnd.wav";
    let powerla   = GetCurrentScriptDirectory~".\enm4se\power_logo.wav";
    let kaku      = GetCurrentScriptDirectory~".\enm4se\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);
	LoadGraphic(imgEffect2);
	LoadGraphic(imgSPNB);
	Aura(8,255,50,150);
	MagicCircle(false);
	SetRateScoreSystemEnable(false);
	EnemyTexture04(true);
	VSname(1);
	VSname2(0,1);
	VSname2(10,1);
	VSname2(20,1);
	VSname2(30,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"
}