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

script_event Event01{
	let i		= 0;
	let csd		= GetCurrentScriptDirectory;
	let plaimg	= [csd~".\enm4img\Mar00.png",//normal
				csd~".\enm4img\Mar01.png",//sly
				csd~".\enm4img\Mar02.png",//grin
				csd~".\enm4img\Mar03.png",//scared
				csd~".\enm4img\Mar04.png",//grr
				csd~".\enm4img\Mar05.png",//tired
				csd~".\enm4img\Mar06.png",//smile
				csd~".\enm4img\Mar07.png",//angry
				csd~".\enm4img\Mar08.png"];//proud
	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;
	}
	
	@MainLoop {
		SetChar(LEFT,plaimg[0]);
		SetGraphicRect(LEFT,120,1,384,512/1.5);
		SetChar(RIGHT,enmimg[2]);
		SetGraphicRect(RIGHT,1,1,384/1.5,512/1.5);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]I-if one such as I were to get serious,
		Gensokyo would be in a dire situation!");
		
		SetChar(LEFT,plaimg[5]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]That was dicey. I didn't really think\n
		you were that strong.");

		SetChar(RIGHT,enmimg[2]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]Upon closer inspection, I see thou art 
		not the woman of prophecy after all.\n
		It appears all that effort was for\n
		naught. What a waste.");

		SetChar(LEFT,plaimg[5]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]I told you, I'm just an ordinary\n
		magician.");

		SetChar(RIGHT,enmimg[2]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]Thou did not!");

		SetChar(LEFT,plaimg[8]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]I told you just now.");

		SetChar(RIGHT,enmimg[0]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]If thou hast nothing to do with this,\n
		then leave.");
		TextOut("\c[RED]The prophecy being unleashed means that
		those who hunt for me will soon appear.");
		TextOut("\c[RED]If I fight with my full strength,\n
		this region will not suffer lightly.");

		SetChar(LEFT,plaimg[0]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Are there more people that powerful?\n
		I'll be damned if I let that happen.");
		
		SetChar(RIGHT,enmimg[2]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]Ahh, humans are foolish, no matter\n
		how many years pass.\n
		Don't cause me too much worry, now.");

		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);
	Aura(5,255,255,0);
	MagicCircle(false);
	SetRateScoreSystemEnable(false);
	EnemyTexture04(true);
	CreateEventFromScript("Event01");
	SetEffectForZeroLife(0,0,0);
    }

    @MainLoop {
		yield;
		if(OnEvent==false){
			VanishEnemy;
		}
}

    @DrawLoop {
	}

    @Finalize {
	let tact = GetCommonDataEx("title","act");
	if(tact==14){
	SetCommonDataEx("title","start_stage",false);
	}
	}

	#include_function".\Obj_Control.txt"
	#include_function".\lib_kshot.txt"
}