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

	@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=128;
		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-=60;
			scale+=0.01;
			yield;
		}
		Obj_Delete(Obj);
	}

	@MainLoop{
		yield;
	}

	task Main{
		yield;
		shotA;
		moveA;
	}

	task shotA{
		loop{
		CreateFudaShot(GetX,GetY,0,90,color,0);
		PlaySE(seShot5);
		wait(6);
		yield;
		}
	}

	task moveA {
		let speed=GetSpeed;
		let gensoku=0;
		wait(10);
		loop(5){
			gensoku+=speed/5;
			SetSpeed(speed-gensoku);
			wait(5);
		}
		angle+=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(40);
		loop(5){
			gensoku+=speed/5;
			SetSpeed(speed-gensoku);
			wait(5);
		}
		angle+=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(55);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
			wait(5);
		}
		angle+=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(85);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
			wait(5);
		}
		angle+=90;
		SetAngle(angle);
		SetSpeed(speed);
		let gensoku=0;
		wait(110);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
				wait(5);
		}
		angle+=90;
		SetAngle(angle);
		SetSpeed(speed);
	}

	task CreateFudaShot(let x, let y, let speed, let angle, let graphic, let delay) {
    		let obj = Obj_Create(OBJ_SHOT);
    
    		Obj_SetPosition(obj, x, y);
    		Obj_SetSpeed(obj, speed);
    		Obj_SetAngle(obj, angle);
    		ObjShot_SetGraphic(obj, graphic);
    		ObjShot_SetDelay(obj, delay);
    
    		loop(delay){ yield; }
    
    		while(!Obj_BeDeleted(obj)) {
			let caso=0;
			wait(90);
			loop(10){
				Obj_SetSpeed(obj, speed+caso);
				caso+=0.2;
				wait(3);
			}
			wait(40);
			Obj_Delete(obj);
			DelayEff(Obj_GetX(obj), Obj_GetY(obj), graphic+24, 8, 7, 0);
        		yield;
    		}
	}

	task DelayEff(x, y, color, scale, deltime, waittime) {
		let Obj  = Obj_Create(OBJ_SHOT);
		if(scale < 3){scale = 3;}
		if(scale <= deltime){deltime = scale-1;}

		wait(waittime);

		Obj_SetPosition(Obj, x, y);
		ObjShot_SetGraphic(Obj, color);
		ObjShot_SetDelay(Obj, scale);
		ObjShot_SetBombResist(Obj, true);
		ObjShot_ToItem(Obj, false);
		Obj_SetCollisionToPlayer(Obj, false);

		wait(deltime);
		Obj_Delete(Obj);
	}

	@Finalize{
	}

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

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

	@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;
		moveA;
	}

	task shotA{
		loop{
		CreateFudaShot(GetX,GetY,0,-90,color,0);
		PlaySE(seShot5);
		wait(6);
		yield;
		}
	}

	task moveA {
		let speed=GetSpeed;
		let gensoku=0;
		wait(10);
		loop(5){
			gensoku+=speed/5;
			SetSpeed(speed-gensoku);
			wait(5);
		}
		angle-=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(40);
		loop(5){
			gensoku+=speed/5;
			SetSpeed(speed-gensoku);
			wait(5);
		}
		angle-=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(55);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
			wait(5);
		}
		angle-=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(85);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
			wait(5);
		}
		angle-=90;
		SetAngle(angle);
		SetSpeed(speed);
		let gensoku=0;
		wait(110);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
				wait(5);
		}
		angle-=90;
		SetAngle(angle);
		SetSpeed(speed);
	}

	task CreateFudaShot(let x, let y, let speed, let angle, let graphic, let delay) {
    		let obj = Obj_Create(OBJ_SHOT);
    
    		Obj_SetPosition(obj, x, y);
    		Obj_SetSpeed(obj, speed);
    		Obj_SetAngle(obj, angle);
    		ObjShot_SetGraphic(obj, graphic);
    		ObjShot_SetDelay(obj, delay);
    
    		loop(delay){ yield; }
    
    		while(!Obj_BeDeleted(obj)) {
			let caso=0;
			wait(90);
			loop(10){
				Obj_SetSpeed(obj, speed+caso);
				caso+=0.2;
				wait(3);
			}
			wait(40);
			Obj_Delete(obj);
			DelayEff(Obj_GetX(obj), Obj_GetY(obj), graphic+24, 8, 7, 0);
        		yield;
    		}
	}

	task DelayEff(x, y, color, scale, deltime, waittime) {
		let Obj  = Obj_Create(OBJ_SHOT);
		if(scale < 3){scale = 3;}
		if(scale <= deltime){deltime = scale-1;}

		wait(waittime);

		Obj_SetPosition(Obj, x, y);
		ObjShot_SetGraphic(Obj, color);
		ObjShot_SetDelay(Obj, scale);
		ObjShot_SetBombResist(Obj, true);
		ObjShot_ToItem(Obj, false);
		Obj_SetCollisionToPlayer(Obj, false);

		wait(deltime);
		Obj_Delete(Obj);
	}

	@Finalize{
	}

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

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

	@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;
		moveA;
	}

	task shotA{
		loop{
		CreateFudaShot(GetX,GetY,0,135,color,0);
		PlaySE(seShot5);
		wait(6);
		yield;
		}
	}

	task moveA {
		let speed=GetSpeed;
		let gensoku=0;
		wait(10);
		loop(5){
			gensoku+=speed/5;
			SetSpeed(speed-gensoku);
			wait(5);
		}
		angle+=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(40);
		loop(5){
			gensoku+=speed/5;
			SetSpeed(speed-gensoku);
			wait(5);
		}
		angle+=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(55);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
			wait(5);
		}
		angle+=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(85);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
			wait(5);
		}
		angle+=90;
		SetAngle(angle);
		SetSpeed(speed);
		let gensoku=0;
		wait(110);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
				wait(5);
		}
		angle+=90;
		SetAngle(angle);
		SetSpeed(speed);
	}

	task CreateFudaShot(let x, let y, let speed, let angle, let graphic, let delay) {
    		let obj = Obj_Create(OBJ_SHOT);
    
    		Obj_SetPosition(obj, x, y);
    		Obj_SetSpeed(obj, speed);
    		Obj_SetAngle(obj, angle);
    		ObjShot_SetGraphic(obj, graphic);
    		ObjShot_SetDelay(obj, delay);
    
    		loop(delay){ yield; }
    
    		while(!Obj_BeDeleted(obj)) {
			let caso=0;
			wait(90);
			loop(10){
				Obj_SetSpeed(obj, speed+caso);
				caso+=0.2;
				wait(3);
			}
			wait(40);
			Obj_Delete(obj);
			DelayEff(Obj_GetX(obj), Obj_GetY(obj), graphic+24, 8, 7, 0);
        		yield;
    		}
	}

	task DelayEff(x, y, color, scale, deltime, waittime) {
		let Obj  = Obj_Create(OBJ_SHOT);
		if(scale < 3){scale = 3;}
		if(scale <= deltime){deltime = scale-1;}

		wait(waittime);

		Obj_SetPosition(Obj, x, y);
		ObjShot_SetGraphic(Obj, color);
		ObjShot_SetDelay(Obj, scale);
		ObjShot_SetBombResist(Obj, true);
		ObjShot_ToItem(Obj, false);
		Obj_SetCollisionToPlayer(Obj, false);

		wait(deltime);
		Obj_Delete(Obj);
	}

	@Finalize{
	}

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

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

	@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;
		moveA;
	}

	task shotA{
		loop{
		CreateFudaShot(GetX,GetY,0,-45,color,0);
		PlaySE(seShot5);
		wait(6);
		yield;
		}
	}

	task moveA {
		let speed=GetSpeed;
		let gensoku=0;
		wait(10);
		loop(5){
			gensoku+=speed/5;
			SetSpeed(speed-gensoku);
			wait(5);
		}
		angle-=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(40);
		loop(5){
			gensoku+=speed/5;
			SetSpeed(speed-gensoku);
			wait(5);
		}
		angle-=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(55);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
			wait(5);
		}
		angle-=90;
		SetAngle(angle);
		SetSpeed(speed);
		gensoku=0;
		wait(85);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
			wait(5);
		}
		angle-=90;
		SetAngle(angle);
		SetSpeed(speed);
		let gensoku=0;
		wait(110);
		loop(5){
			SetSpeed(speed-gensoku);
			gensoku+=speed/5;
				wait(5);
		}
		angle-=90;
		SetAngle(angle);
		SetSpeed(speed);
	}

	task CreateFudaShot(let x, let y, let speed, let angle, let graphic, let delay) {
    		let obj = Obj_Create(OBJ_SHOT);
    
    		Obj_SetPosition(obj, x, y);
    		Obj_SetSpeed(obj, speed);
    		Obj_SetAngle(obj, angle);
    		ObjShot_SetGraphic(obj, graphic);
    		ObjShot_SetDelay(obj, delay);
    
    		loop(delay){ yield; }
    
    		while(!Obj_BeDeleted(obj)) {
			let caso=0;
			wait(90);
			loop(10){
				Obj_SetSpeed(obj, speed+caso);
				caso+=0.2;
				wait(3);
			}
			wait(40);
			Obj_Delete(obj);
			DelayEff(Obj_GetX(obj), Obj_GetY(obj), graphic+24, 8, 7, 0);
        		yield;
    		}
	}

	task DelayEff(x, y, color, scale, deltime, waittime) {
		let Obj  = Obj_Create(OBJ_SHOT);
		if(scale < 3){scale = 3;}
		if(scale <= deltime){deltime = scale-1;}

		wait(waittime);

		Obj_SetPosition(Obj, x, y);
		ObjShot_SetGraphic(Obj, color);
		ObjShot_SetDelay(Obj, scale);
		ObjShot_SetBombResist(Obj, true);
		ObjShot_ToItem(Obj, false);
		Obj_SetCollisionToPlayer(Obj, false);

		wait(deltime);
		Obj_Delete(Obj);
	}

	@Finalize{
	}

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