
#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\ʏ.png",
					csd~".\enm6img\=3.png",
					csd~".\enm6img\j.png",
					csd~".\enm6img\.png",
					csd~".\enm6img\.png",
					csd~".\enm6img\.png",
					csd~".\enm6img\Ί.png",
					csd~".\enm6img\{.png",
					csd~".\enm6img\.png"];
	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]̖ȂɂłPĂ₪
		\nsgsgAĝ܂Ŏ܂ꂻ");
		
		MoveChar(LEFT,BACK);
		TextOut("\c[RED]߂A͐A");
		SetCommonDataEx("in","move",true);

		SetChar(RIGHT,enmimg[0]);
		SetGraphicRect(RIGHT,1,1,384/1.5,512/1.5);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]҂ɂ́A̐򂩂lɈ܂");

		SetChar(LEFT,plaimg[6]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]AŏI{X͐
		\n˂̂ɂȂȊ");

		SetChar(RIGHT,enmimg[3]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","snd",true);
		TextOut("\c[RED]ɂA͐lԂl鋙t");
		TextOut("\c[RED]Ԃł͂Ȃ
		\n͂ɂĐll̂");

		SetChar(LEFT,plaimg[2]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]腖Vg𓊂ߐ[`lԂ
		\n񂾂");

		SetChar(RIGHT,enmimg[5]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]A_ƃCɎn܂Aꂩ疢
		\n܂ł낤SĂ̐l");
		TextOut("\c[RED]ނɎ͂^
		\n͂Ăׂ̈Ɍ𗬂");
		TextOut("\c[RED]̎pɊo͖c
		\nw҂͏\˂܂x");

		SetChar(LEFT,plaimg[6]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]wlނ͏\i@̗p܂xɌ邪
		͂");

		SetChar(RIGHT,enmimg[1]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]͂
		\n͂ꂽȂ߂񂱂Ƃ");

		SetChar(LEFT,plaimg[4]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]łAl~Ȃ
		\nǂǂ񈫂𐬂ΗǂȂ");

		SetChar(RIGHT,enmimg[5]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]ǍSl݂͂ɂ
		\n߂݂ŋ􂯂");
		TextOut("\c[RED]A̍߂ǂ
		\nނɕ킹Ȃŉ");

		SetChar(LEFT,plaimg[5]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]̂l͉̕
		\nɓlċꂵނ񂾂낤");
		SetChar(LEFT,plaimg[1]);
		TextOut("\c[BLUE]_qĂ
		\nlɂ͏\̗~ēOȂ");
		TextOut("\c[BLUE]~ɒɐΗǂȂ");
		TextOut("\c[BLUE]Ď̗~́cO񂪎gł낤
		\nm̏pɌĂ邺I");

		SetChar(RIGHT,enmimg[1]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		SetCommonDataEx("in","music",true);
		TextOut("\c[RED]c̏̍߁Áw~x");
		TextOut("\c[RED]Al̎qɍߐl̎ɓn
		\nȂ");
		TextOut("\c[RED]҂͕KɂĖłт");

		SetChar(LEFT,plaimg[8]);
		MoveChar(LEFT,FRONT);
		MoveChar(RIGHT,BACK);
		TextOut("\c[BLUE]|ȂA炪zɂ
		\nF̈҂񂾂ȁI");

		SetChar(RIGHT,enmimg[4]);
		MoveChar(LEFT,BACK);
		MoveChar(RIGHT,FRONT);
		TextOut("\c[RED]NȎ҂Ɉ҂͂Ȃ");
		TextOut("\c[RED]܂ꂽ̂́APlł͂Ȃߐl
		\nꂵސl𓱂ׂȂ̂I");

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