script_enemy FUJI1{
	let imgeff   = GetCurrentScriptDirectory ~ "img\effect2.png";
	let seShot5  = GetCurrentScriptDirectory ~ "se\sha00.wav";
	let angle=GetAngle;

	@Initialize{
	SetLife(500);
	LoadGraphic(imgeff);
	LoadSE(seShot5);
	Main;
	}

	@DrawLoop{
	AuraEffect;
	}

	task AuraEffect{
		let x=GetX;let y=GetY;
		let Obj=Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(Obj,imgeff);
		ObjEffect_SetLayer(Obj,1);
		ObjEffect_SetRenderState(Obj,ADD);
		ObjEffect_SetPrimitiveType(Obj,PRIMITIVE_TRIANGLESTRIP);
		ObjEffect_CreateVertex(Obj,4);
		ObjEffect_SetAngle(Obj,0,0,angle+90);

		ObjEffect_SetVertexXY(Obj, 0, -20, -20);
		ObjEffect_SetVertexXY(Obj, 1, -20,  20);
		ObjEffect_SetVertexXY(Obj, 2,  20, -20);
		ObjEffect_SetVertexXY(Obj, 3,  20, 20);

		ObjEffect_SetVertexUV(Obj, 0, 0, 0);
		ObjEffect_SetVertexUV(Obj, 1, 0, 40);
		ObjEffect_SetVertexUV(Obj, 2, 40, 0);
		ObjEffect_SetVertexUV(Obj, 3, 40, 40);

		let scale=1.3;let alpha=48;
		while(alpha>10)
		{
			Obj_SetPosition(Obj,x,y);
			ObjEffect_SetScale(Obj,scale,scale);
			ascent(a in 0..4)
			{
				ObjEffect_SetVertexColor(Obj,a,alpha,255,255,255);
			}
			alpha-=5;
			scale+=0.01;
			yield;
		}
		Obj_Delete(Obj);
	}

	@MainLoop{
		yield;
	}

	task Main{
		yield;
		shotA;
		shotB;
		moveA;
	}

	task shotA{
		loop(164){
			CreateShot01(GetX,GetY,0,angle,14,0);
			wait(20);
		}
	}

	task shotB{
		loop{
			wait(240);
			loop(25){
				let angle=GetAngleToPlayer;
				CreateShot01(GetX,GetY,1,angle,86,0);
				wait(5);
				PlaySE(seShot5);
			}
			yield;
		}
	}

	task moveA{
		loop(1){
			SetMovePosition02(32+10,464,120);
			wait(120);
			SetMovePosition02(32,16+10,180);
			wait(180);
			SetMovePosition02(416-10,16,120);
			wait(120);
			SetMovePosition02(416,464-10,180);
			wait(180);	
		}
		loop(2){
			SetMovePosition02(32+30,464-20,110);
			wait(110);
			SetMovePosition02(32+20,16+30,170);
			wait(170);
			SetMovePosition02(416-30,16+20,110);
			wait(110);
			SetMovePosition02(416-20,464-30,170);
			wait(170);	
		}
		loop(2){
			SetMovePosition02(32+50,464-40,100);
			wait(100);
			SetMovePosition02(32+40,16+50,160);
			wait(160);
			SetMovePosition02(416-50,16+40,100);
			wait(100);
			SetMovePosition02(416-40,464-50,160);
			wait(160);	
		}
		loop{
			SetMovePosition02(32+70,464-60,100);
			wait(100);
			SetMovePosition02(32+60,16+70,160);
			wait(160);
			SetMovePosition02(416-70,16+60,100);
			wait(100);
			SetMovePosition02(416-60,464-70,160);
			wait(160);
			yield;	
		}
	}

	@Finalize{
	}

	function wait(let n){loop(n){yield;}}
}

script_enemy FUJI2{
	let imgeff   = GetCurrentScriptDirectory ~ "img\effect2.png";
	let seShot5  = GetCurrentScriptDirectory ~ "se\sha00.wav";
	let angle=GetAngle;

	@Initialize{
	SetLife(500);
	LoadGraphic(imgeff);
	LoadSE(seShot5);
	Main;
	}

	@DrawLoop{
	AuraEffect;
	}

	task AuraEffect{
		let x=GetX;let y=GetY;
		let Obj=Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(Obj,imgeff);
		ObjEffect_SetLayer(Obj,1);
		ObjEffect_SetRenderState(Obj,ADD);
		ObjEffect_SetPrimitiveType(Obj,PRIMITIVE_TRIANGLESTRIP);
		ObjEffect_CreateVertex(Obj,4);
		ObjEffect_SetAngle(Obj,0,0,angle+90);

		ObjEffect_SetVertexXY(Obj, 0, -20, -20);
		ObjEffect_SetVertexXY(Obj, 1, -20,  20);
		ObjEffect_SetVertexXY(Obj, 2,  20, -20);
		ObjEffect_SetVertexXY(Obj, 3,  20, 20);

		ObjEffect_SetVertexUV(Obj, 0, 40, 0);
		ObjEffect_SetVertexUV(Obj, 1, 40, 40);
		ObjEffect_SetVertexUV(Obj, 2, 80, 0);
		ObjEffect_SetVertexUV(Obj, 3, 80, 40);

		let scale=1.3;let alpha=48;
		while(alpha>10)
		{
			Obj_SetPosition(Obj,x,y);
			ObjEffect_SetScale(Obj,scale,scale);
			ascent(a in 0..4)
			{
				ObjEffect_SetVertexColor(Obj,a,alpha,255,255,255);
			}
			alpha-=5;
			scale+=0.01;
			yield;
		}
		Obj_Delete(Obj);
	}

	@MainLoop{
		yield;
	}

	task Main{
		yield;
		shotA;
		shotB;
		moveA;
	}

	task shotA{
		loop(164){
			CreateShot01(GetX,GetY,0,angle,9,0);
			wait(20);
		}
	}

	task shotB{
		loop{
			wait(240);
			loop(25){
				let angle=GetAngleToPlayer;
				CreateShot01(GetX,GetY,1,angle,81,0);
				wait(5);
				PlaySE(seShot5);
			}
			yield;
		}
	}

	task moveA{
		loop(1){
			SetMovePosition02(416-10,16,120);
			wait(120);
			SetMovePosition02(416,464-10,180);
			wait(180);
			SetMovePosition02(32+10,464,120);
			wait(120);
			SetMovePosition02(32,16+10,180);
			wait(180);	
		}
		loop(2){
			SetMovePosition02(416-30,16+20,110);
			wait(110);
			SetMovePosition02(416-20,464-30,170);
			wait(170);
			SetMovePosition02(32+30,464-20,110);
			wait(110);
			SetMovePosition02(32+20,16+30,170);
			wait(170);	
		}
		loop(2){
			SetMovePosition02(416-50,16+40,100);
			wait(100);
			SetMovePosition02(416-40,464-50,160);
			wait(160);
			SetMovePosition02(32+50,464-40,100);
			wait(100);
			SetMovePosition02(32+40,16+50,160);
			wait(160);
		}
		loop{
			SetMovePosition02(416-70,16+60,100);
			wait(100);
			SetMovePosition02(416-60,464-70,160);
			wait(160);
			SetMovePosition02(32+70,464-60,100);
			wait(100);
			SetMovePosition02(32+60,16+70,160);
			wait(160);
			yield;	
		}
	}

	@Finalize{
	}

	function wait(let n){loop(n){yield;}}
}

script_enemy FUJI3{
	let imgeff   = GetCurrentScriptDirectory ~ "img\effect2.png";
	let seShot5  = GetCurrentScriptDirectory ~ "se\sha00.wav";
	let angle=GetAngle;

	@Initialize{
	SetLife(500);
	LoadGraphic(imgeff);
	LoadSE(seShot5);
	Main;
	}

	@DrawLoop{
	AuraEffect;
	}

	task AuraEffect{
		let x=GetX;let y=GetY;
		let Obj=Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(Obj,imgeff);
		ObjEffect_SetLayer(Obj,1);
		ObjEffect_SetRenderState(Obj,ADD);
		ObjEffect_SetPrimitiveType(Obj,PRIMITIVE_TRIANGLESTRIP);
		ObjEffect_CreateVertex(Obj,4);
		ObjEffect_SetAngle(Obj,0,0,angle+90);

		ObjEffect_SetVertexXY(Obj, 0, -20, -20);
		ObjEffect_SetVertexXY(Obj, 1, -20,  20);
		ObjEffect_SetVertexXY(Obj, 2,  20, -20);
		ObjEffect_SetVertexXY(Obj, 3,  20, 20);

		ObjEffect_SetVertexUV(Obj, 0, 80, 0);
		ObjEffect_SetVertexUV(Obj, 1, 80, 40);
		ObjEffect_SetVertexUV(Obj, 2, 120, 0);
		ObjEffect_SetVertexUV(Obj, 3, 120, 40);

		let scale=1.3;let alpha=48;
		while(alpha>10)
		{
			Obj_SetPosition(Obj,x,y);
			ObjEffect_SetScale(Obj,scale,scale);
			ascent(a in 0..4)
			{
				ObjEffect_SetVertexColor(Obj,a,alpha,255,255,255);
			}
			alpha-=5;
			scale+=0.01;
			yield;
		}
		Obj_Delete(Obj);
	}

	@MainLoop{
		yield;
	}


	task Main{
		yield;
		shotA;
		shotB;
		moveA;
	}

	task shotA{
		loop(110){
			CreateShot01(GetX,GetY,0,angle,15,0);
			wait(20);
		}
	}

	task shotB{
		loop{
			wait(240);
			loop(25){
				let angle=GetAngleToPlayer;
				CreateShot01(GetX,GetY,1,angle,87,0);
				wait(5);
				PlaySE(seShot5);
			}
			yield;
		}
	}

	task moveA{
		loop(1){
			SetMovePosition02(416-10,16,120);
			wait(120);
			SetMovePosition02(32,16+10,180);
			wait(180);
			SetMovePosition02(32+10,464,120);
			wait(120);
			SetMovePosition02(416,464-10,180);
			wait(180);	
		}
		loop(1){
			SetMovePosition02(416-30,16+20,110);
			wait(110);
			SetMovePosition02(32+20,16+30,170);
			wait(170);
			SetMovePosition02(32+30,464-20,110);
			wait(110);
			SetMovePosition02(416-20,464-30,170);
			wait(170);	
		}
		loop(1){
			SetMovePosition02(416-50,16+40,100);
			wait(100);
			SetMovePosition02(32+40,16+50,160);
			wait(160);
			SetMovePosition02(32+50,464-40,100);
			wait(100);
			SetMovePosition02(416-40,464-50,160);
			wait(160);
		}
		loop{
			SetMovePosition02(416-70,16+60,100);
			wait(100);
			SetMovePosition02(32+60,16+70,160);
			wait(160);
			SetMovePosition02(32+70,464-60,100);
			wait(100);
			SetMovePosition02(416-60,464-70,160);
			wait(160);
			yield;	
		}
	}

	@Finalize{
	}

	function wait(let n){loop(n){yield;}}
}

script_enemy FUJI4{
	let imgeff   = GetCurrentScriptDirectory ~ "img\effect2.png";
	let seShot5  = GetCurrentScriptDirectory ~ "se\sha00.wav";
	let angle=GetAngle;

	@Initialize{
	SetLife(500);
	LoadGraphic(imgeff);
	LoadSE(seShot5);
	Main;
	}

	@DrawLoop{
	AuraEffect;
	}

	task AuraEffect{
		let x=GetX;let y=GetY;
		let Obj=Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(Obj,imgeff);
		ObjEffect_SetLayer(Obj,1);
		ObjEffect_SetRenderState(Obj,ADD);
		ObjEffect_SetPrimitiveType(Obj,PRIMITIVE_TRIANGLESTRIP);
		ObjEffect_CreateVertex(Obj,4);
		ObjEffect_SetAngle(Obj,0,0,angle+90);

		ObjEffect_SetVertexXY(Obj, 0, -20, -20);
		ObjEffect_SetVertexXY(Obj, 1, -20,  20);
		ObjEffect_SetVertexXY(Obj, 2,  20, -20);
		ObjEffect_SetVertexXY(Obj, 3,  20, 20);

		ObjEffect_SetVertexUV(Obj, 0, 120, 0);
		ObjEffect_SetVertexUV(Obj, 1, 120, 40);
		ObjEffect_SetVertexUV(Obj, 2, 160, 0);
		ObjEffect_SetVertexUV(Obj, 3, 160, 40);

		let scale=1.3;let alpha=48;
		while(alpha>10)
		{
			Obj_SetPosition(Obj,x,y);
			ObjEffect_SetScale(Obj,scale,scale);
			ascent(a in 0..4)
			{
				ObjEffect_SetVertexColor(Obj,a,alpha,255,255,255);
			}
			alpha-=5;
			scale+=0.01;
			yield;
		}
		Obj_Delete(Obj);
	}

	@MainLoop{
		yield;
	}


	task Main{
		yield;
		shotA;
		shotB;
		moveA;
	}

	task shotA{
		loop(110){
			CreateShot01(GetX,GetY,0,angle,12,0);
			wait(20);
		}
	}

	task shotB{
		loop{
			wait(240);
			loop(25){
				let angle=GetAngleToPlayer;
				CreateShot01(GetX,GetY,1,angle,84,0);
				wait(5);
				PlaySE(seShot5);
			}
			yield;
		}
	}

	task moveA{
		loop(1){
			SetMovePosition02(32+10,464,120);
			wait(120);
			SetMovePosition02(416,464-10,180);
			wait(180);
			SetMovePosition02(416-10,16,120);
			wait(120);
			SetMovePosition02(32,16+10,180);
			wait(180);	
		}
		loop(1){
			SetMovePosition02(32+30,464-20,110);
			wait(110);
			SetMovePosition02(416-20,464-30,170);
			wait(170);
			SetMovePosition02(416-30,16+20,110);
			wait(110);
			SetMovePosition02(32+20,16+30,170);
			wait(170);	
		}
		loop(1){
			SetMovePosition02(32+50,464-40,100);
			wait(100);
			SetMovePosition02(416-40,464-50,160);
			wait(160);
			SetMovePosition02(416-50,16+40,100);
			wait(100);
			SetMovePosition02(32+40,16+50,160);
			wait(160);	
		}
		loop{
			SetMovePosition02(32+70,464-60,100);
			wait(100);
			SetMovePosition02(416-60,464-70,160);
			wait(160);
			SetMovePosition02(416-70,16+60,100);
			wait(100);
			SetMovePosition02(32+60,16+70,160);
			wait(160);
			yield;	
		}
	}

	@Finalize{
	}

	function wait(let n){loop(n){yield;}}
}