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

script_event Event01{
	let i		= 0;
	let csd		= GetCurrentScriptDirectory;
	let plaimg	= [csd~".\enm3img\Rei00.png",//normal
				csd~".\enm3img\Rei01.png",//sly
				csd~".\enm3img\Rei02.png",//grin
				csd~".\enm3img\Rei03.png",//scared
				csd~".\enm3img\Rei04.png",//grr
				csd~".\enm3img\Rei05.png",//tired
				csd~".\enm3img\Rei06.png",//smile
				csd~".\enm3img\Rei07.png",//angry
				csd~".\enm3img\Rei08.png"];//proud
	let enmimg	= [csd~".\enm3img\face301ct.png",
					csd~".\enm3img\pascar10001.png",
					csd~".\enm3img\pascar10002.png",
					csd~".\enm3img\pascar10003.png",
					csd~".\enm3img\pascar10004.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[5]);//LN^̉摜ݒ
		SetGraphicRect(LEFT,150,1,384,512/1.5);
		MoveChar(LEFT,FRONT);
		TextOut("\c[BLUE]There's so many stars here, but where\n
		could that doctor be?");
		
		MoveChar(LEFT,BACK);
		TextOut("\c[RED]Hm... Are you searching for me?");
		SetCommonDataEx("in","move",true);//trueɂƉʓɓꂳ܂

		SetChar(RIGHT,enmimg[1]);
		SetGraphicRect(RIGHT,1,1,384/1.5,512/1.5);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]I am here, you know, specifically\n
		because there are so many stars here.");

		SetChar(LEFT,plaimg[2]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]You're the astrology doctor\n
		the vampire mentioned, huh?");

		SetChar(RIGHT,enmimg[0]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","snd",true);
		TextOut("\c[RED]Indeed, you're correct. My name is\n
		Phiased Pescar.\n
		In the outside world, I'm rather\n
		famous in my own way.");
		TextOut("\c[RED]The stars are spirits, and their\n
		movements definitely have meaning.\n
		By deciphering it, we can see our\n
		future.");
		TextOut("\c[RED]This secret method is what people\n
		call `astrology'.");

		SetChar(LEFT,plaimg[4]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Ah-haah, so it's like sukuyoudou?\n
		I've never really studied it myself.");
		TextOut("\c[BLUE]I don't really care about the future,\n
		so could you do something about that\n
		huge star that fell into the forest?");

		SetChar(RIGHT,enmimg[2]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]That's an impossible order, I'm afraid.");
		TextOut("\c[RED]Astrology predicts the future.\n
		It's not some magic that can control\n
		the stars themselves.");
		TextOut("\c[RED]And now, I see it. Knowing all that,\n
		you'll now attack me in retaliation.");

		SetChar(LEFT,plaimg[6]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]Correct! Astrology is nothing to\n
		sneeze at, huh?\n
		I think I'll learn about sukuyou\n
		starting now, too.");

		SetChar(RIGHT,enmimg[3]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","music",true);//trueɂBGMo܂B({̌)
		TextOut("\c[RED]Stars are spirits. Therefore, bullets\n
		that depict stars have spirits\n
		dwelling in them as well.");
		SetChar(RIGHT,enmimg[1]);
		TextOut("\c[RED]I know everything there is about the\n
		stars;\n
		my cosmic danmaku will not lose to\n
		any shrine maiden so easily!");

		End();
	}
		
	@Finalize {
	}
}

script_enemy_main {
	let imgEffect	= GetCurrentScriptDirectory~".\enm3eff\bossEfect.png";
	let imgEffect2	= GetCurrentScriptDirectory~".\enm3eff\wave.png";
	let imgSPNB		= GetCurrentScriptDirectory~".\enm3eff\spellEfect.png";
    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(imgSPNB);
	LoadGraphic(imgEffect);
	LoadGraphic(imgEffect2);
	Aura(8,255,255,0);
	MagicCircle(false);
	SetRateScoreSystemEnable(false);
	EnemyTexture03(true);
	VSname(1);//1łȂ܂B
	VSname2(0,1);//̐B
	VSname2(10,1);//PFWB10₵ĉB
	VSname2(20,1);//QFtF[hCBbȂ̂őS1łłB
	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"
}