function CreateLaserC(x,y,angle,av,speed,ac,mx,rgb_h,m,sca){
	let id		= ObjShot_Create(OBJ_SHOT);
	
	ObjMove_SetPosition(id,x,y);
	ObjMove_SetSpeed(id,speed);
	ObjMove_SetAcceleration(id,ac);
	ObjMove_SetMaxSpeed(id,mx);
	ObjMove_SetAngle(id,angle);
	ObjMove_SetAngularVelocity(id,av);
	ObjRender_SetColor(id,0,0,0);
	ObjShot_SetGraphic(id,kWHITE12a);
	ObjShot_Regist(id);
	
	LaserC_child01(id,rgb_h,m,sca);
	return id;
}

task LaserC_child01(ID,rgb_h,m,sca){
	let cc		= 0;
	while(!Obj_IsDeleted(ID)){
		let pos		= [ObjMove_GetX(ID),ObjMove_GetY(ID)];
		let ang		= ObjMove_GetAngle(ID);
		cc++;
		if(cc%1==0){
			LaserC_child02(pos,ang,rgb_h,m,sca,ID);
		}
		yield;
	}
}

task LaserC_child02(pos,ang,rgb_h,m,sca,ID){
	let sht		= CreateShotA1(pos[0],pos[1],0,ang,kWHITE12a,0);
	let alpha1	= 0;
	let alpha2	= 0;
	let alpha3	= 0;
	let sca1	= 0;
	let scaA	= 0;
	let sca2	= 0;
	let hc		= 0.4;
	let rgb_h2	= [0,0,0];
	
	rgb_h2[0]	= 255-rgb_h[0];
	rgb_h2[1]	= 255-rgb_h[1];
	rgb_h2[2]	= 255-rgb_h[2];
	
	Obj_SetValue(sht,"Effect_Off",true);
	
	while(sca2<sca && !Obj_IsDeleted(ID)){
		if(sca1<sca){scaA+=10;}
		sca1=sca*sin(scaA);
		if(sca2<sca && sca1>=sca){sca2+=m;}
		ObjRender_SetScaleXYZ(sht,hc+sca1-sca2,hc+sca1-sca2,0);
		
		if(alpha1<rgb_h2[0]){alpha1+=35;}
		else{alpha1=rgb_h2[0];}
		if(alpha2<rgb_h2[1]){alpha2+=35;}
		else{alpha2=rgb_h2[1];}
		if(alpha3<rgb_h2[2]){alpha3+=35;}
		else{alpha3=rgb_h2[2];}
		ObjRender_SetColor(sht,255-alpha1,255-alpha2,255-alpha3);
		
		yield;
	}
	Obj_Delete(sht);
}

task KikuShot1(x,y,angle,speed,ac,mx,shote1,shote2,delay,spinang){
	let sh0		= ObjShot_Create(OBJ_SHOT);
	let sh		= [ObjShot_Create(OBJ_SHOT),
					ObjShot_Create(OBJ_SHOT),
					ObjShot_Create(OBJ_SHOT),
					ObjShot_Create(OBJ_SHOT),
					ObjShot_Create(OBJ_SHOT),
					ObjShot_Create(OBJ_SHOT),
					ObjShot_Create(OBJ_SHOT),
					ObjShot_Create(OBJ_SHOT)];
	let i		= 0;
	let spin1	= 0;
	
	ObjMove_SetPosition(sh0,x,y);
	ObjMove_SetAngle(sh0,angle);
	ObjMove_SetSpeed(sh0,speed);
	ObjMove_SetAcceleration(sh0,ac);
	ObjMove_SetMaxSpeed(sh0,mx);
	ObjShot_SetGraphic(sh0,shote1);
	ObjRender_SetAlpha(sh0,255);
	ObjShot_SetDelay(sh0,delay);
	ObjShot_SetAutoDelete(sh0,true);
	ObjRender_SetScaleXYZ(sh0,0,0,0);
	ObjShot_SetIntersectionEnable(sh0,false);
	ObjShot_Regist(sh0);
	
	loop(8){
		ObjMove_SetPosition(sh[i],x+4*sin(i*45),y+4*cos(i*45));
		ObjMove_SetAngle(sh[i],i*-45+90);
		ObjMove_SetSpeed(sh[i],0);
		ObjMove_SetMaxSpeed(sh[i],0);
		ObjShot_SetGraphic(sh[i],shote2);
		ObjShot_SetDelay(sh[i],delay);
		ObjShot_SetAutoDelete(sh[i],true);
		ObjRender_SetScaleXYZ(sh[i],0.8,1,0);
		ObjShot_Regist(sh[i]);
		i++;
	}i=0;
	
	while(!Obj_IsDeleted(enm) && !Obj_IsDeleted(sh0)){
		let gp	= [ObjMove_GetX(sh0),ObjMove_GetY(sh0)];
		loop(8){
			ObjMove_SetPosition(sh[i],gp[0]+32*sin(i*45+spin1),gp[1]+32*cos(i*45+spin1));
			ObjMove_SetAngle(sh[i],i*-45+90-spin1);
			ObjShot_SetIntersectionCircleA1(sh[i],2);
			i++;
		}i=0;
		
		spin1+=spinang;
		
		yield;
	}
	Obj_Delete(sh0);
	loop(8){
		Obj_Delete(sh[i]);
		i++;
	}i=0;

}

task Family01(x,y,wid,long){
	let en		= ObjEnemy_Create(OBJ_ENEMY);
	let id		= ObjPrim_Create(OBJ_SPRITE_2D);
	let anim	= 0;
	let cc		= rand(0,360);
	let rdX		= rand(64,256);
	let rdY		= rand(64,256);
	let sca		= 0.6;
	let sca1	= 0;
	let scaA	= 0;
	let spin	= 0;
	let sframe	= 0;
	let shote	= 0;
	
	ObjMove_SetPosition(en,x,y);
	ObjEnemy_SetLife(en,32);
	ObjEnemy_SetDamageRate(en,0,0);
	ObjEnemy_Regist(en);
	
	ObjRender_SetPosition(id,x,y,0);
	ObjPrim_SetTexture(id,csd~"./stg3img/enm3_a.png");
	ObjRender_SetBlendType(id,BLEND_ADD_RGB);
	ObjRender_SetAngleXYZ(id,0,0,0);
	Obj_SetRenderPriorityI(id,40);
	ObjSprite2D_SetSourceRect(id,0,0,64,64);
	ObjSprite2D_SetDestCenter(id);
	ObjRender_SetScaleXYZ(id,sca1,sca1,0);
	if(cc>=0 && cc<180){
		ObjRender_SetColor(id,128,0,255);
		shote = kPURPLE05;
	}
	else{
		ObjRender_SetColor(id,255,0,128);
		shote = kRED05;
	}
	
	while(!Obj_IsDeleted(enm) && cc<long){
		let gp		= [ObjMove_GetX(wid),ObjMove_GetY(wid),ObjMove_GetX(en),ObjMove_GetY(en)];
		let gl		= ObjEnemy_GetInfo(en,INFO_LIFE);
		
		cc++;
		ObjEnemy_SetIntersectionCircleToShot(en,gp[2],gp[3],16);
		ObjEnemy_SetIntersectionCircleToShot(enm,gp[2],gp[3],16);
		ObjMove_SetDestAtWeight(en,gp[0]+rdX*sin(cc),gp[1]+rdY*cos(cc),8,0.8);
		ObjRender_SetPosition(id,gp[2],gp[3],0);
		
		sframe++;
		if(sframe%40==0){
			CreateShotA2(gp[2],gp[3],0,90,0.01,2,shote,32);
			PlaySEs(csd~"../../se/shot2.wav");
		}
		
		if(sca1>=sca){
			ObjEnemy_SetDamageRate(en,100,100);
		}
		if(sca1<sca){scaA+=1;}
		sca1=sca*sin(scaA);
		ObjRender_SetScaleXYZ(id,sca1,sca1,0);
	
		anim+=2;
		ObjSprite2D_SetDestCenter(id);
		if(anim>=0  && anim<5){
			ObjSprite2D_SetSourceRect(id,0,0,64,64);
		}
		if(anim>=5  && anim<10){
			ObjSprite2D_SetSourceRect(id,64,0,128,64);
		}
		if(anim>=10 && anim<15){
			ObjSprite2D_SetSourceRect(id,128,0,192,64);
		}
		if(anim>=15 && anim<20){
			ObjSprite2D_SetSourceRect(id,192,0,256,64);
		}
		if(anim==20){anim=0;}
		
		if(gl<=0){break;}
		
		yield;
	}
	Obj_Delete(en);
	while(!Obj_IsDeleted(enm) && sca1>0){
		let gp		= [ObjRender_GetX(id),ObjRender_GetY(id)];
		ObjRender_SetPosition(id,gp[0],gp[1]+2,0);
		
		scaA+=2;
		sca1=sca*sin(scaA);
		ObjRender_SetScaleXYZ(id,sca1,sca1,0);
		
		spin+=12;
		ObjRender_SetAngleXYZ(id,0,0,spin);
		
		anim+=2;
		ObjSprite2D_SetDestCenter(id);
		if(anim>=0  && anim<5){
			ObjSprite2D_SetSourceRect(id,0,0,64,64);
		}
		if(anim>=5  && anim<10){
			ObjSprite2D_SetSourceRect(id,64,0,128,64);
		}
		if(anim>=10 && anim<15){
			ObjSprite2D_SetSourceRect(id,128,0,192,64);
		}
		if(anim>=15 && anim<20){
			ObjSprite2D_SetSourceRect(id,192,0,256,64);
		}
		if(anim==20){anim=0;}
		
		yield;
	}
	Obj_Delete(id);
}

task Family02(x,y,wid,long){
	let en		= ObjEnemy_Create(OBJ_ENEMY);
	let id		= ObjPrim_Create(OBJ_SPRITE_2D);
	let anim	= 0;
	let cc		= rand(0,360);
	let rdX		= rand(128,256);
	let rdY		= rand(128,256);
	let sca		= 0.6;
	let sca1	= 0;
	let scaA	= 0;
	let spin	= 0;
	let sframe	= 0;
	let shote	= 0;
	let shote2	= [0,0,0];
	let ang		= 0;
	
	ObjMove_SetPosition(en,x,y);
	ObjEnemy_SetLife(en,32);
	ObjEnemy_SetDamageRate(en,0,0);
	ObjEnemy_Regist(en);
	
	ObjRender_SetPosition(id,x,y,0);
	ObjPrim_SetTexture(id,csd~"./stg3img/enm3_a.png");
	ObjRender_SetBlendType(id,BLEND_ADD_RGB);
	ObjRender_SetAngleXYZ(id,0,0,0);
	Obj_SetRenderPriorityI(id,40);
	ObjSprite2D_SetSourceRect(id,0,0,64,64);
	ObjSprite2D_SetDestCenter(id);
	ObjRender_SetScaleXYZ(id,sca1,sca1,0);
	if(cc>=0 && cc<180){
		ObjRender_SetColor(id,128,0,255);
		shote = kPURPLE12a;
		shote2 = [255,16,200];
	}
	else{
		ObjRender_SetColor(id,255,0,128);
		shote = kRED12a;
		shote2 = [16,16,255];
	}
	
	while(!Obj_IsDeleted(enm) && cc<long){
		let gp		= [ObjMove_GetX(wid),ObjMove_GetY(wid),ObjMove_GetX(en),ObjMove_GetY(en)];
		let gl		= ObjEnemy_GetInfo(en,INFO_LIFE);
		
		cc++;
		ObjEnemy_SetIntersectionCircleToShot(en,gp[2],gp[3],16);
		ObjEnemy_SetIntersectionCircleToShot(enm,gp[2],gp[3],16);
		ObjMove_SetDestAtWeight(en,gp[0]+rdX*sin(cc),gp[1]+rdY*cos(cc),8,0.8);
		ObjRender_SetPosition(id,gp[2],gp[3],0);
		
		sframe++;
		if(sframe%40==0){
			CreateShotA2(gp[2],gp[3],0,90,0.01,2,shote,32);
		}
		if(sframe%6==0){
			loop(2){
				CreateShotA2(gp[2],gp[3],5,GetAngleToPlayer(en)-45+ang,0,10,kBUYO63,4);
				ang+=90;
			}
			ang=0;
			PlaySEs(csd~"../../se/shot2.wav");
		}
		
		if(sca1>=sca){
			ObjEnemy_SetDamageRate(en,100,100);
		}
		if(sca1<sca){scaA+=1;}
		sca1=sca*sin(scaA);
		ObjRender_SetScaleXYZ(id,sca1,sca1,0);
	
		anim+=2;
		ObjSprite2D_SetDestCenter(id);
		if(anim>=0  && anim<5){
			ObjSprite2D_SetSourceRect(id,0,0,64,64);
		}
		if(anim>=5  && anim<10){
			ObjSprite2D_SetSourceRect(id,64,0,128,64);
		}
		if(anim>=10 && anim<15){
			ObjSprite2D_SetSourceRect(id,128,0,192,64);
		}
		if(anim>=15 && anim<20){
			ObjSprite2D_SetSourceRect(id,192,0,256,64);
		}
		if(anim==20){anim=0;}
		
		if(gl<=0){break;}
		
		yield;
	}
	Obj_Delete(en);
	while(!Obj_IsDeleted(enm) && sca1>0){
		let gp		= [ObjRender_GetX(id),ObjRender_GetY(id)];
		ObjRender_SetPosition(id,gp[0],gp[1]+2,0);
		
		scaA+=2;
		sca1=sca*sin(scaA);
		ObjRender_SetScaleXYZ(id,sca1,sca1,0);
		
		spin+=12;
		ObjRender_SetAngleXYZ(id,0,0,spin);
		
		anim+=2;
		ObjSprite2D_SetDestCenter(id);
		if(anim>=0  && anim<5){
			ObjSprite2D_SetSourceRect(id,0,0,64,64);
		}
		if(anim>=5  && anim<10){
			ObjSprite2D_SetSourceRect(id,64,0,128,64);
		}
		if(anim>=10 && anim<15){
			ObjSprite2D_SetSourceRect(id,128,0,192,64);
		}
		if(anim>=15 && anim<20){
			ObjSprite2D_SetSourceRect(id,192,0,256,64);
		}
		if(anim==20){anim=0;}
		
		yield;
	}
	Obj_Delete(id);
}

task Family03(x,y,wid,long){
	let en		= ObjEnemy_Create(OBJ_ENEMY);
	let id		= ObjPrim_Create(OBJ_SPRITE_2D);
	let anim	= 0;
	let cc		= rand(0,360);
	let rdX		= rand(256,300);
	let rdY		= rand(256,300);
	let sca		= 0.6;
	let sca1	= 0;
	let scaA	= 0;
	let spin	= 0;
	let sframe	= 0;
	let shote	= 0;
	let shote2	= 0;
	let ang		= 0;
	
	ObjMove_SetPosition(en,x,y);
	ObjEnemy_SetLife(en,32);
	ObjEnemy_SetDamageRate(en,0,0);
	ObjEnemy_Regist(en);
	
	ObjRender_SetPosition(id,x,y,0);
	ObjPrim_SetTexture(id,csd~"./stg3img/enm3_a.png");
	ObjRender_SetBlendType(id,BLEND_ADD_RGB);
	ObjRender_SetAngleXYZ(id,0,0,0);
	Obj_SetRenderPriorityI(id,40);
	ObjSprite2D_SetSourceRect(id,0,0,64,64);
	ObjSprite2D_SetDestCenter(id);
	ObjRender_SetScaleXYZ(id,sca1,sca1,0);
	if(cc>=0 && cc<180){
		ObjRender_SetColor(id,128,0,255);
		shote = kPURPLE05;
		shote2 = kPURPLE13;
	}
	else{
		ObjRender_SetColor(id,255,0,128);
		shote = kRED05;
		shote2 = kBLUE13;
	}
	
	while(!Obj_IsDeleted(enm) && cc<long){
		let gp		= [ObjMove_GetX(wid),ObjMove_GetY(wid),ObjMove_GetX(en),ObjMove_GetY(en)];
		let gl		= ObjEnemy_GetInfo(en,INFO_LIFE);
		
		cc++;
		ObjEnemy_SetIntersectionCircleToShot(en,gp[2],gp[3],16);
		ObjEnemy_SetIntersectionCircleToShot(enm,gp[2],gp[3],16);
		ObjMove_SetDestAtWeight(en,gp[0]+rdX*sin(cc),gp[1]+rdY*cos(cc),8,0.8);
		ObjRender_SetPosition(id,gp[2],gp[3],0);
		
		sframe++;
		if(sframe%120==0){
			let las1 = CreateLooseLaserA1(gp[2],gp[3],5,270,98,2,kWHITE62,16);
			let las2 = CreateLooseLaserA1(gp[2],gp[3],4,GetAngleToPlayer(en),98,2,kWHITE62,16);
			ObjRender_SetColor(las1,255,0,128);
			ObjRender_SetColor(las2,255,0,128);
			PlaySEs(csd~"../../se/shot2.wav");
		}
		if(sframe%60==0){
			CreateShotA2(gp[2],gp[3],0,90,0.01,2,shote,32);
			PlaySEs(csd~"../../se/shot2.wav");
		}
		
		if(sca1>=sca){
			ObjEnemy_SetDamageRate(en,100,100);
		}
		if(sca1<sca){scaA+=1;}
		sca1=sca*sin(scaA);
		ObjRender_SetScaleXYZ(id,sca1,sca1,0);
	
		anim+=2;
		ObjSprite2D_SetDestCenter(id);
		if(anim>=0  && anim<5){
			ObjSprite2D_SetSourceRect(id,0,0,64,64);
		}
		if(anim>=5  && anim<10){
			ObjSprite2D_SetSourceRect(id,64,0,128,64);
		}
		if(anim>=10 && anim<15){
			ObjSprite2D_SetSourceRect(id,128,0,192,64);
		}
		if(anim>=15 && anim<20){
			ObjSprite2D_SetSourceRect(id,192,0,256,64);
		}
		if(anim==20){anim=0;}
		
		if(gl<=0){break;}
		
		yield;
	}
	Obj_Delete(en);
	while(!Obj_IsDeleted(enm) && sca1>0){
		let gp		= [ObjRender_GetX(id),ObjRender_GetY(id)];
		ObjRender_SetPosition(id,gp[0],gp[1]+2,0);
		
		scaA+=2;
		sca1=sca*sin(scaA);
		ObjRender_SetScaleXYZ(id,sca1,sca1,0);
		
		spin+=12;
		ObjRender_SetAngleXYZ(id,0,0,spin);
		
		anim+=2;
		ObjSprite2D_SetDestCenter(id);
		if(anim>=0  && anim<5){
			ObjSprite2D_SetSourceRect(id,0,0,64,64);
		}
		if(anim>=5  && anim<10){
			ObjSprite2D_SetSourceRect(id,64,0,128,64);
		}
		if(anim>=10 && anim<15){
			ObjSprite2D_SetSourceRect(id,128,0,192,64);
		}
		if(anim>=15 && anim<20){
			ObjSprite2D_SetSourceRect(id,192,0,256,64);
		}
		if(anim==20){anim=0;}
		
		yield;
	}
	Obj_Delete(id);
}

task MoonGods(x,y,speed,angle,ac,mx,shote,dealy,long){
	let id	= CreateShotA2(x,y,speed,angle,0,mx,shote,dealy);
	let cc	= 0;
	
	ObjShot_SetAutoDelete(id,true);
	
	while(!Obj_IsDeleted(enm) && !Obj_IsDeleted(id)){
		
		if(cc/32>long){
			ObjMove_SetAcceleration(id,ac);
		}
		
		cc+=32;
		ObjRender_SetScaleXYZ(id,1+0.1*sin(cc),1-0.1*sin(cc),0);
		yield;
	}
	Obj_Delete(id);
}

task MoonGods2(x,y,speed,angle,ac,mx,shote,dealy,long){
	let id	= CreateShotA2(x,y,speed,angle,0,mx,shote,dealy);
	let cc	= 0;
	
	ObjShot_SetAutoDelete(id,true);
	
	while(!Obj_IsDeleted(enm) && !Obj_IsDeleted(id)){
		
		if(cc/32>long){
			ObjMove_SetAcceleration(id,ac);
			ObjShot_SetGraphic(id,kRED12a);
		}
		
		cc+=32;
		ObjRender_SetScaleXYZ(id,1+0.1*sin(cc),1-0.1*sin(cc),0);
		yield;
	}
	Obj_Delete(id);
}

task CompressionLaserP(x,y,angle,pla,lengthm,width,r,g,b,delay,kill,source){
	let las		= ObjShot_Create(OBJ_STRAIGHT_LASER);
	let eff		= [ObjPrim_Create(OBJ_SPRITE_2D),
					ObjPrim_Create(OBJ_SPRITE_2D)];
	let sc		= ObjPrim_Create(OBJ_SPRITE_2D);
	let delete	= false;
	let killf	= 0;
	let alpha	= 255;
	let length_l= 0;
	let length_e= 0;
	let scax	= 0.15;
	let delay_e	= 0;
	let cc		= 0;
	let pap		= 0;
	let i		= 0;
	
	ObjMove_SetPosition(las,x,y);
	ObjStLaser_SetAngle(las,angle);
	ObjShot_SetDelay(las,delay);
	ObjLaser_SetRenderWidth(las,width);
	ObjStLaser_SetSource(las,false);
	ObjShot_SetGraphic(las,kRED01);
	ObjRender_SetColor(las,0,0,0);
	ObjShot_Regist(las);
	
	loop(2){
		ObjRender_SetPosition(eff[i],x,y,0);
		ObjPrim_SetTexture(eff[0],csd~"../../img/eff/laser_add.png");
		ObjPrim_SetTexture(eff[1],csd~"../../img/eff/laser_alpha.png");
		ObjRender_SetBlendType(eff[0],BLEND_ADD_RGB);
		ObjRender_SetBlendType(eff[1],BLEND_ALPHA);
		ObjRender_SetAngleXYZ(eff[i],0,0,angle-90);
		Obj_SetRenderPriorityI(eff[i],50);
		ObjPrim_SetVertexCount(eff[i],4);
		ObjPrim_SetVertexUVT(eff[i],0,0,0);
		ObjPrim_SetVertexUVT(eff[i],1,0,20);
		ObjPrim_SetVertexUVT(eff[i],2,20,0);
		ObjPrim_SetVertexUVT(eff[i],3,20,20);
		i++;
	}i=0;
	
	ObjRender_SetPosition(sc,x-16*sin(angle-90),y-16*cos(angle-90),0);
	ObjPrim_SetTexture(sc,csd~"../../img/eff/laser_sc.png");
	ObjRender_SetBlendType(sc,BLEND_ALPHA);
	ObjRender_SetAngleXYZ(sc,0,0,0);
	Obj_SetRenderPriorityI(sc,44);
	ObjSprite2D_SetSourceRect(sc,0,0,64,64);
	ObjSprite2D_SetDestCenter(sc);
	ObjRender_SetScaleXYZ(sc,1.2,1.2,0);
	
	if(source==false){Obj_Delete(sc);}
	
	while(!Obj_IsDeleted(enm)){
		if(killf>delay){pap+=pla;}
		ObjStLaser_SetAngle(las,(angle)+pap);
		ObjRender_SetAngleXYZ(eff[0],0,0,(angle-90)+pap);
		ObjRender_SetAngleXYZ(eff[1],0,0,(angle-90)+pap);
		ObjRender_SetAngleXYZ(sc,0,0,killf*-64);
		ObjRender_SetPosition(sc,x-16*sin(angle-90-pap),y-16*cos(angle-90-pap),0);
		
		let gp	= GetAreaCommonData("anime","phantom",true);
		if(gp){
			ObjRender_SetBlendType(eff[0],BLEND_SUBTRACT);
			ObjRender_SetBlendType(eff[1],BLEND_SUBTRACT);
			ObjShot_SetIntersectionEnable(las,false);
			Obj_SetRenderPriorityI(eff[0],31);
			Obj_SetRenderPriorityI(eff[1],31);
			Obj_SetRenderPriorityI(sc,31);
		}else{
			ObjRender_SetBlendType(eff[0],BLEND_ADD_RGB);
			ObjRender_SetBlendType(eff[1],BLEND_ALPHA);
			ObjShot_SetIntersectionEnable(las,true);
			Obj_SetRenderPriorityI(eff[0],44);
			Obj_SetRenderPriorityI(eff[1],44);
			Obj_SetRenderPriorityI(sc,44);
		}
		
		cc++;
		if(cc==5){
			//光源は切り替え可能
			//if(source==true){LightSource(x,y,angle,255,255,255);}
			cc=0;
		}
		
		killf++;
		if(killf>kill && kill>0){
			delete=true;
		}
		if(delete==true && alpha<=0){
			Obj_Delete(eff[0]);
			Obj_Delete(eff[1]);
			break;
		}
		
		delay_e++;
		if(delay_e>delay && scax<(width/100)*2 && delete==false){scax+=0.1;}
		if(scax<(width/100)*2 && delete==false){
			ObjRender_SetScaleXYZ(eff[0],scax,1,0);
			ObjRender_SetScaleXYZ(eff[1],scax-0.1,1,0);
		}
		if(scax>=(width/100)*2 && delete==false){
			ObjRender_SetScaleXYZ(eff[0],scax+0.05*sin(delay_e*64),1,0);
		}
		if(scax>0 && delete==true){scax-=0.1;}
		if(delete==true){
			ObjRender_SetScaleXYZ(eff[0],scax,1,0);
			ObjRender_SetScaleXYZ(eff[1],scax,1,0);
			
			if(scax<=0){
				break;
			}
		}
		
		if(length_l<lengthm){length_l+=lengthm/20;}
		ObjLaser_SetLength(las,length_l);
		
		if(length_e<lengthm){length_e+=lengthm/20;}
		ObjPrim_SetVertexPosition(eff[0],0,-20,-20,0);
		ObjPrim_SetVertexPosition(eff[0],1,-20,length_e,0);
		ObjPrim_SetVertexPosition(eff[0],2,20,-20,0);
		ObjPrim_SetVertexPosition(eff[0],3,20,length_e,0);
		ObjPrim_SetVertexPosition(eff[1],0,-20,-20,0);
		ObjPrim_SetVertexPosition(eff[1],1,-20,length_e,0);
		ObjPrim_SetVertexPosition(eff[1],2,20,-20,0);
		ObjPrim_SetVertexPosition(eff[1],3,20,length_e,0);
		
		if(delete==true && alpha>0){alpha-=15;}
		if(r==0 && g==0 && b==0){ObjRender_SetBlendType(eff[0],BLEND_ALPHA);}
		ObjPrim_SetVertexColor(eff[0],0,r,g,b);
		ObjPrim_SetVertexColor(eff[0],1,r,g,b);
		ObjPrim_SetVertexColor(eff[0],2,r,g,b);
		ObjPrim_SetVertexColor(eff[0],3,r,g,b);
		ObjPrim_SetVertexColor(eff[1],0,255,255,255);
		ObjPrim_SetVertexColor(eff[1],1,255,255,255);
		ObjPrim_SetVertexColor(eff[1],2,255,255,255);
		ObjPrim_SetVertexColor(eff[1],3,255,255,255);
		ObjRender_SetColor(sc,r,g,b);
		
		yield;
	}
	Obj_Delete(las);
	Obj_Delete(eff[0]);
	Obj_Delete(eff[1]);
	Obj_Delete(sc);
}

task CompressionLaserPR(x,y,angle,pla,lengthm,width,r,g,b,delay,kill,source){
	let las		= ObjShot_Create(OBJ_STRAIGHT_LASER);
	let eff		= [ObjPrim_Create(OBJ_SPRITE_2D),
					ObjPrim_Create(OBJ_SPRITE_2D)];
	let sc		= ObjPrim_Create(OBJ_SPRITE_2D);
	let delete	= false;
	let killf	= 0;
	let alpha	= 255;
	let length_l= 0;
	let length_e= 0;
	let scax	= 0.15;
	let delay_e	= 0;
	let cc		= 0;
	let pap		= 0;
	let i		= 0;
	
	ObjMove_SetPosition(las,x,y);
	ObjStLaser_SetAngle(las,angle);
	ObjShot_SetDelay(las,delay);
	ObjLaser_SetRenderWidth(las,width);
	ObjStLaser_SetSource(las,false);
	ObjShot_SetGraphic(las,kRED01);
	ObjRender_SetColor(las,0,0,0);
	ObjShot_Regist(las);
	
	loop(2){
		ObjRender_SetPosition(eff[i],x,y,0);
		ObjPrim_SetTexture(eff[0],csd~"../../img/eff/laser_add.png");
		ObjPrim_SetTexture(eff[1],csd~"../../img/eff/laser_alpha.png");
		ObjRender_SetBlendType(eff[0],BLEND_ADD_RGB);
		ObjRender_SetBlendType(eff[1],BLEND_ALPHA);
		ObjRender_SetAngleXYZ(eff[i],0,0,angle-90);
		Obj_SetRenderPriorityI(eff[i],50);
		ObjPrim_SetVertexCount(eff[i],4);
		ObjPrim_SetVertexUVT(eff[i],0,0,0);
		ObjPrim_SetVertexUVT(eff[i],1,0,20);
		ObjPrim_SetVertexUVT(eff[i],2,20,0);
		ObjPrim_SetVertexUVT(eff[i],3,20,20);
		i++;
	}i=0;
	
	ObjRender_SetPosition(sc,x-16*sin(angle-90),y-16*cos(angle-90),0);
	ObjPrim_SetTexture(sc,csd~"../../img/eff/laser_sc.png");
	ObjRender_SetBlendType(sc,BLEND_ALPHA);
	ObjRender_SetAngleXYZ(sc,0,0,0);
	Obj_SetRenderPriorityI(sc,44);
	ObjSprite2D_SetSourceRect(sc,0,0,64,64);
	ObjSprite2D_SetDestCenter(sc);
	ObjRender_SetScaleXYZ(sc,1.2,1.2,0);
	
	if(source==false){Obj_Delete(sc);}
	
	while(!Obj_IsDeleted(enm)){
		if(killf>delay){pap+=pla;}
		ObjStLaser_SetAngle(las,(angle)+pap);
		ObjRender_SetAngleXYZ(eff[0],0,0,(angle-90)+pap);
		ObjRender_SetAngleXYZ(eff[1],0,0,(angle-90)+pap);
		ObjRender_SetAngleXYZ(sc,0,0,killf*-64);
		ObjRender_SetPosition(sc,x-16*sin(angle-90-pap),y-16*cos(angle-90-pap),0);
		
		let gp	= GetAreaCommonData("anime","phantom",true);
		if(!gp){
			ObjRender_SetBlendType(eff[0],BLEND_SUBTRACT);
			ObjRender_SetBlendType(eff[1],BLEND_SUBTRACT);
			ObjShot_SetIntersectionEnable(las,false);
			Obj_SetRenderPriorityI(eff[0],32);
			Obj_SetRenderPriorityI(eff[1],32);
			Obj_SetRenderPriorityI(sc,31);
		}else{
			ObjRender_SetBlendType(eff[0],BLEND_ADD_RGB);
			ObjRender_SetBlendType(eff[1],BLEND_ALPHA);
			ObjShot_SetIntersectionEnable(las,true);
			Obj_SetRenderPriorityI(eff[0],44);
			Obj_SetRenderPriorityI(eff[1],44);
			Obj_SetRenderPriorityI(sc,44);
		}
		
		cc++;
		if(cc==5){
			//光源は切り替え可能
			//if(source==true){LightSource(x,y,angle,255,255,255);}
			cc=0;
		}
		
		killf++;
		if(killf>kill && kill>0){
			delete=true;
		}
		if(delete==true && alpha<=0){
			Obj_Delete(eff[0]);
			Obj_Delete(eff[1]);
			break;
		}
		
		delay_e++;
		if(delay_e>delay && scax<(width/100)*2 && delete==false){scax+=0.1;}
		if(scax<(width/100)*2 && delete==false){
			ObjRender_SetScaleXYZ(eff[0],scax,1,0);
			ObjRender_SetScaleXYZ(eff[1],scax-0.1,1,0);
		}
		if(scax>=(width/100)*2 && delete==false){
			ObjRender_SetScaleXYZ(eff[0],scax+0.05*sin(delay_e*64),1,0);
		}
		if(scax>0 && delete==true){scax-=0.1;}
		if(delete==true){
			ObjRender_SetScaleXYZ(eff[0],scax,1,0);
			ObjRender_SetScaleXYZ(eff[1],scax,1,0);
			
			if(scax<=0){
				break;
			}
		}
		
		if(length_l<lengthm){length_l+=lengthm/20;}
		ObjLaser_SetLength(las,length_l);
		
		if(length_e<lengthm){length_e+=lengthm/20;}
		ObjPrim_SetVertexPosition(eff[0],0,-20,-20,0);
		ObjPrim_SetVertexPosition(eff[0],1,-20,length_e,0);
		ObjPrim_SetVertexPosition(eff[0],2,20,-20,0);
		ObjPrim_SetVertexPosition(eff[0],3,20,length_e,0);
		ObjPrim_SetVertexPosition(eff[1],0,-20,-20,0);
		ObjPrim_SetVertexPosition(eff[1],1,-20,length_e,0);
		ObjPrim_SetVertexPosition(eff[1],2,20,-20,0);
		ObjPrim_SetVertexPosition(eff[1],3,20,length_e,0);
		
		if(delete==true && alpha>0){alpha-=15;}
		if(r==0 && g==0 && b==0){ObjRender_SetBlendType(eff[0],BLEND_ALPHA);}
		ObjPrim_SetVertexColor(eff[0],0,r,g,b);
		ObjPrim_SetVertexColor(eff[0],1,r,g,b);
		ObjPrim_SetVertexColor(eff[0],2,r,g,b);
		ObjPrim_SetVertexColor(eff[0],3,r,g,b);
		ObjPrim_SetVertexColor(eff[1],0,255,255,255);
		ObjPrim_SetVertexColor(eff[1],1,255,255,255);
		ObjPrim_SetVertexColor(eff[1],2,255,255,255);
		ObjPrim_SetVertexColor(eff[1],3,255,255,255);
		ObjRender_SetColor(sc,r,g,b);
		
		yield;
	}
	Obj_Delete(las);
	Obj_Delete(eff[0]);
	Obj_Delete(eff[1]);
	Obj_Delete(sc);
}

task PhantomEye(long){
	let id		= ObjPrim_Create(OBJ_SPRITE_2D);
	let id2		= [ObjPrim_Create(OBJ_SPRITE_2D),
					ObjPrim_Create(OBJ_SPRITE_2D)];
	let i		= 0;
	let kill	= 0;
	let sca1	= 0;
	let scaA	= 0;
	
	SetAreaCommonData("anime","phantom",true);
	PlaySEs(csd~"../../se/phantom.wav");
		
	ObjRender_SetPosition(id,CenX,CenY,0);
	ObjPrim_SetTexture(id,csd~"./stg3img/enm3b.png");
	Obj_SetRenderPriorityI(id,60);
	ObjRender_SetBlendType(id,BLEND_SUBTRACT);
	ObjRender_SetScaleXYZ(id,1.2,1.2,0);
	ObjSprite2D_SetSourceRect(id,0,0,512,512);
	ObjSprite2D_SetDestCenter(id);
	ObjRender_SetColor(id,sca1*32,sca1*255,sca1*255);
	
	loop(2){
		ObjRender_SetPosition(id2[i],CenX,CenY,0);
		ObjPrim_SetTexture(id2[i],csd~"./stg3img/jakigan.png");
		Obj_SetRenderPriorityI(id2[i],71);
		ObjRender_SetBlendType(id2[0],BLEND_ALPHA);
		ObjRender_SetBlendType(id2[1],BLEND_SUBTRACT);
		ObjRender_SetScaleXYZ(id2[i],1,sca1,0);
		ObjSprite2D_SetSourceRect(id2[i],0,0,256,64);
		ObjSprite2D_SetDestCenter(id2[i]);
		ObjRender_SetAlpha(id2[0],200);
		i++;
	}i=0;
	
	while(!Obj_IsDeleted(enm) && kill<long){
		kill++;
		ObjRender_SetPosition(id,CenX+rand(-4,4),CenY+rand(-4,4),0);
		ObjRender_SetColor(id,sca1*32,sca1*255,sca1*255);
		ObjRender_SetAngleZ(id,kill);
		
		if(sca1<1){scaA+=2;}
		sca1=1*sin(scaA);
		ObjRender_SetPosition(id2[0],CenX+rand(-4,4),CenY+rand(-4,4),0);
		ObjRender_SetPosition(id2[1],CenX+rand(-12,12),CenY+rand(-12,12),0);
		ObjRender_SetScaleXYZ(id2[0],7-sca1*4,sca1*3,0);
		ObjRender_SetScaleXYZ(id2[1],7-sca1*4,sca1*3,0);
		yield;
	}
	while(!Obj_IsDeleted(enm) && sca1>0){
		kill++;
		ObjRender_SetPosition(id,CenX+rand(-4,4),CenY+rand(-4,4),0);
		ObjRender_SetColor(id,sca1*32,sca1*255,sca1*255);
		ObjRender_SetAngleZ(id,kill);
		
		scaA+=10;
		sca1=1*sin(scaA);
		ObjRender_SetPosition(id2[0],CenX+rand(-4,4),CenY+rand(-4,4),0);
		ObjRender_SetPosition(id2[1],CenX+rand(-8,8),CenY+rand(-8,8),0);
		ObjRender_SetScaleXYZ(id2[0],3,sca1*3,0);
		ObjRender_SetScaleXYZ(id2[1],3,sca1*3,0);
		yield;
	}
	Obj_Delete(id);
	Obj_Delete(id2[0]);
	Obj_Delete(id2[1]);
	SetAreaCommonData("anime","phantom",false);
	SetAreaCommonData("anime","spa",false);
}

task CompressionLaser(x,y,angle,pla,lengthm,width,r,g,b,delay,kill,source){
	let las		= ObjShot_Create(OBJ_STRAIGHT_LASER);
	let eff		= [ObjPrim_Create(OBJ_SPRITE_2D),
					ObjPrim_Create(OBJ_SPRITE_2D)];
	let delete	= false;
	let killf	= 0;
	let alpha	= 255;
	let length_l= 0;
	let length_e= 0;
	let scax	= 0.15;
	let delay_e	= 0;
	let cc		= 0;
	let pap		= 0;
	let i		= 0;
	
	ObjMove_SetPosition(las,x,y);
	ObjStLaser_SetAngle(las,angle);
	ObjShot_SetDelay(las,delay);
	ObjLaser_SetRenderWidth(las,width);
	ObjStLaser_SetSource(las,false);
	ObjShot_SetGraphic(las,kRED01);
	ObjRender_SetColor(las,0,0,0);
	ObjShot_Regist(las);
	
	loop(2){
		ObjRender_SetPosition(eff[i],x,y,0);
		ObjPrim_SetTexture(eff[0],csd~"../../img/eff/laser_add.png");
		ObjPrim_SetTexture(eff[1],csd~"../../img/eff/laser_alpha.png");
		ObjRender_SetBlendType(eff[0],BLEND_ADD_RGB);
		ObjRender_SetBlendType(eff[1],BLEND_ALPHA);
		ObjRender_SetAngleXYZ(eff[i],0,0,angle-90);
		Obj_SetRenderPriorityI(eff[i],50);
		ObjPrim_SetVertexCount(eff[i],4);
		ObjPrim_SetVertexUVT(eff[i],0,0,0);
		ObjPrim_SetVertexUVT(eff[i],1,0,20);
		ObjPrim_SetVertexUVT(eff[i],2,20,0);
		ObjPrim_SetVertexUVT(eff[i],3,20,20);
		i++;
	}i=0;
	
	while(!Obj_IsDeleted(enm)){
		pap+=pla;
		ObjStLaser_SetAngle(las,(angle)+pap);
		ObjRender_SetAngleXYZ(eff[0],0,0,(angle-90)+pap);
		ObjRender_SetAngleXYZ(eff[1],0,0,(angle-90)+pap);
		
		cc++;
		if(cc==5){
			//光源は切り替え可能
			//if(source==true){LightSource(x,y,angle,255,255,255);}
			cc=0;
		}
		
		killf++;
		if(killf>kill && kill>0){
			delete=true;
		}
		if(delete==true && alpha<=0){
			Obj_Delete(eff[0]);
			Obj_Delete(eff[1]);
			break;
		}
		
		delay_e++;
		if(delay_e>delay && scax<(width/100)*2 && delete==false){scax+=0.1;}
		if(scax<(width/100)*2 && delete==false){
			ObjRender_SetScaleXYZ(eff[0],scax,1,0);
			ObjRender_SetScaleXYZ(eff[1],scax-0.1,1,0);
		}
		if(scax>=(width/100)*2 && delete==false){
			ObjRender_SetScaleXYZ(eff[0],scax+0.05*sin(delay_e*64),1,0);
		}
		if(scax>0 && delete==true){scax-=0.1;}
		if(delete==true){
			ObjRender_SetScaleXYZ(eff[0],scax,1,0);
			ObjRender_SetScaleXYZ(eff[1],scax,1,0);
			
			if(scax<=0){
				break;
			}
		}
		
		if(length_l<lengthm){length_l+=lengthm/20;}
		ObjLaser_SetLength(las,length_l);
		
		if(length_e<lengthm){length_e+=lengthm/20;}
		ObjPrim_SetVertexPosition(eff[0],0,-20,-20,0);
		ObjPrim_SetVertexPosition(eff[0],1,-20,length_e,0);
		ObjPrim_SetVertexPosition(eff[0],2,20,-20,0);
		ObjPrim_SetVertexPosition(eff[0],3,20,length_e,0);
		ObjPrim_SetVertexPosition(eff[1],0,-20,-20,0);
		ObjPrim_SetVertexPosition(eff[1],1,-20,length_e,0);
		ObjPrim_SetVertexPosition(eff[1],2,20,-20,0);
		ObjPrim_SetVertexPosition(eff[1],3,20,length_e,0);
		
		if(delete==true && alpha>0){alpha-=15;}
		if(r==0 && g==0 && b==0){ObjRender_SetBlendType(eff[0],BLEND_ALPHA);}
		ObjPrim_SetVertexColor(eff[0],0,r,g,b);
		ObjPrim_SetVertexColor(eff[0],1,r,g,b);
		ObjPrim_SetVertexColor(eff[0],2,r,g,b);
		ObjPrim_SetVertexColor(eff[0],3,r,g,b);
		ObjPrim_SetVertexColor(eff[1],0,255,255,255);
		ObjPrim_SetVertexColor(eff[1],1,255,255,255);
		ObjPrim_SetVertexColor(eff[1],2,255,255,255);
		ObjPrim_SetVertexColor(eff[1],3,255,255,255);
		
		yield;
	}
	Obj_Delete(las);
	Obj_Delete(eff[0]);
	Obj_Delete(eff[1]);
}

task CompressionLaserSpin(x,y,angle,pla,lengthm,width,r,g,b,delay,kill,source){
	let las		= ObjShot_Create(OBJ_STRAIGHT_LASER);
	let eff		= [ObjPrim_Create(OBJ_SPRITE_2D),
					ObjPrim_Create(OBJ_SPRITE_2D)];
	let delete	= false;
	let killf	= 0;
	let alpha	= 255;
	let length_l= 0;
	let length_e= 0;
	let scax	= 0.15;
	let delay_e	= 0;
	let cc		= 0;
	let pap		= 0;
	let i		= 0;
	let dis		= 128;
	
	ObjMove_SetPosition(las,x-dis*sin(angle+pap),y+dis*cos(angle+pap));
	ObjStLaser_SetAngle(las,angle);
	ObjShot_SetDelay(las,delay);
	ObjLaser_SetRenderWidth(las,width);
	ObjStLaser_SetSource(las,false);
	ObjShot_SetGraphic(las,kRED01);
	ObjRender_SetColor(las,0,0,0);
	ObjShot_Regist(las);
	
	loop(2){
		ObjRender_SetPosition(eff[i],x-dis*sin(angle+pap),y+dis*cos(angle+pap),0);
		ObjPrim_SetTexture(eff[0],csd~"../../img/eff/laser_add.png");
		ObjPrim_SetTexture(eff[1],csd~"../../img/eff/laser_alpha.png");
		ObjRender_SetBlendType(eff[0],BLEND_ADD_RGB);
		ObjRender_SetBlendType(eff[1],BLEND_ALPHA);
		ObjRender_SetAngleXYZ(eff[i],0,0,angle-90);
		Obj_SetRenderPriorityI(eff[i],50);
		ObjPrim_SetVertexCount(eff[i],4);
		ObjPrim_SetVertexUVT(eff[i],0,0,0);
		ObjPrim_SetVertexUVT(eff[i],1,0,20);
		ObjPrim_SetVertexUVT(eff[i],2,20,0);
		ObjPrim_SetVertexUVT(eff[i],3,20,20);
		i++;
	}i=0;
	
	while(!Obj_IsDeleted(enm)){
		pap+=pla;
		ObjStLaser_SetAngle(las,(angle)+pap);
		ObjRender_SetAngleXYZ(eff[0],0,0,(angle-90)+pap);
		ObjRender_SetAngleXYZ(eff[1],0,0,(angle-90)+pap);
		
		let gp	= [ObjRender_GetX(las),ObjRender_GetY(las)];
		
		ObjMove_SetPosition(las,x-dis*sin(angle+pap),y+dis*cos(angle+pap));
		ObjRender_SetPosition(eff[0],gp[0],gp[1],0);
		ObjRender_SetPosition(eff[1],gp[0],gp[1],0);
		
		cc++;
		if(cc==5){
			//光源は切り替え可能
			//if(source==true){LightSource(x,y,angle,255,255,255);}
			cc=0;
		}
		
		killf++;
		if(killf>kill && kill>0){
			delete=true;
		}
		if(delete==true && alpha<=0){
			Obj_Delete(eff[0]);
			Obj_Delete(eff[1]);
			break;
		}
		
		delay_e++;
		if(delay_e>delay && scax<(width/100)*2 && delete==false){scax+=0.1;}
		if(scax<(width/100)*2 && delete==false){
			ObjRender_SetScaleXYZ(eff[0],scax,1,0);
			ObjRender_SetScaleXYZ(eff[1],scax-0.1,1,0);
		}
		if(scax>=(width/100)*2 && delete==false){
			ObjRender_SetScaleXYZ(eff[0],scax+0.05*sin(delay_e*64),1,0);
		}
		if(scax>0 && delete==true){scax-=0.1;}
		if(delete==true){
			ObjRender_SetScaleXYZ(eff[0],scax,1,0);
			ObjRender_SetScaleXYZ(eff[1],scax,1,0);
			
			if(scax<=0){
				break;
			}
		}
		
		if(length_l<lengthm){length_l+=lengthm/20;}
		ObjLaser_SetLength(las,length_l);
		
		if(length_e<lengthm){length_e+=lengthm/20;}
		ObjPrim_SetVertexPosition(eff[0],0,-20,-20,0);
		ObjPrim_SetVertexPosition(eff[0],1,-20,length_e,0);
		ObjPrim_SetVertexPosition(eff[0],2,20,-20,0);
		ObjPrim_SetVertexPosition(eff[0],3,20,length_e,0);
		ObjPrim_SetVertexPosition(eff[1],0,-20,-20,0);
		ObjPrim_SetVertexPosition(eff[1],1,-20,length_e,0);
		ObjPrim_SetVertexPosition(eff[1],2,20,-20,0);
		ObjPrim_SetVertexPosition(eff[1],3,20,length_e,0);
		
		if(delete==true && alpha>0){alpha-=15;}
		if(r==0 && g==0 && b==0){ObjRender_SetBlendType(eff[0],BLEND_ALPHA);}
		ObjPrim_SetVertexColor(eff[0],0,r,g,b);
		ObjPrim_SetVertexColor(eff[0],1,r,g,b);
		ObjPrim_SetVertexColor(eff[0],2,r,g,b);
		ObjPrim_SetVertexColor(eff[0],3,r,g,b);
		ObjPrim_SetVertexColor(eff[1],0,255,255,255);
		ObjPrim_SetVertexColor(eff[1],1,255,255,255);
		ObjPrim_SetVertexColor(eff[1],2,255,255,255);
		ObjPrim_SetVertexColor(eff[1],3,255,255,255);
		
		yield;
	}
	Obj_Delete(las);
	Obj_Delete(eff[0]);
	Obj_Delete(eff[1]);
}

task NuClearShot01(x,y,sca,angle,av,speed,ac,mx,Color,delay,kill){
	let sh		= ObjShot_Create(OBJ_STRAIGHT_LASER);
	let id		= [ObjPrim_Create(OBJ_SPRITE_2D),
					ObjPrim_Create(OBJ_SPRITE_2D),
					ObjPrim_Create(OBJ_SPRITE_2D)];
	let long			= 0;
	let i				= 0;
	let cc				= 0;
	let sca1			= 0;
	let scaA			= 0;
	let rgbR			= [255,255,255,0,0,0,255,255];
	let rgbG			= [32,128,255,255,255,0,0,255];
	let rgbB			= [32,0,0,0,255,255,255,255];
	let INDEX_RED		= "RED";
	let INDEX_ORANGE	= "ORANGE";
	let INDEX_YELLOW	= "YELLOW";
	let INDEX_GREEN		= "GREEN";
	let INDEX_AQUA		= "AQUA";
	let INDEX_BLUE		= "BLUE";
	let INDEX_PURPLE	= "PURPLE";
	let INDEX_WHITE		= "WHITE";
	
	alternative(Color)
	case(INDEX_RED){cc=0;}
	case(INDEX_ORANGE){cc=1;}
	case(INDEX_YELLOW){cc=2;}
	case(INDEX_GREEN){cc=3;}
	case(INDEX_AQUA){cc=4;}
	case(INDEX_BLUE){cc=5;}
	case(INDEX_PURPLE){cc=6;}
	case(INDEX_WHITE){cc=7;}
	CherryConcentration02(x,y,delay/2,0,rgbR[cc],rgbG[cc],rgbB[cc]);
	loop(delay){yield;}
	cc=0;
	
	ObjMove_SetPosition(sh,x,y);
	ObjShot_SetGraphic(sh,kWHITE01);
	ObjMove_SetAngle(sh,angle);
	ObjMove_SetAngularVelocity(sh,av);
	ObjMove_SetSpeed(sh,speed);
	ObjMove_SetAcceleration(sh,ac);
	ObjMove_SetMaxSpeed(sh,mx);
	ObjShot_SetAutoDelete(sh,false);
	ObjShot_SetIntersectionEnable(sh,true);
	ObjShot_SetSpellResist(sh,true);
	ObjRender_SetAlpha(sh,0);
	ObjShot_Regist(sh);
	
	loop(3){
		ObjRender_SetPosition(id[i],x,y,0);
		ObjPrim_SetTexture(id[i],csd~"../../imgt/Nuclear.png");
		ObjPrim_SetTexture(id[2],csd~"../../img/eff/light.png");
		Obj_SetRenderPriorityI(id[i],50);
		ObjRender_SetBlendType(id[i],BLEND_ADD_RGB);
		ObjRender_SetAngleXYZ(id[i],0,0,0);
		ObjRender_SetScaleXYZ(id[i],sca1,sca1,0);
		alternative(Color)
		case("RED"){
			ObjSprite2D_SetSourceRect(id[i],0,0,256,256);
			ObjSprite2D_SetDestCenter(id[i]);
			ObjRender_SetColor(id[2],255,0,0);
		}
		case("ORANGE"){
			ObjSprite2D_SetSourceRect(id[i],256,0,512,256);
			ObjSprite2D_SetDestCenter(id[i]);
			ObjRender_SetColor(id[2],255,128,0);
		}
		case("YELLOW"){
			ObjSprite2D_SetSourceRect(id[i],512,0,768,256);
			ObjSprite2D_SetDestCenter(id[i]);
			ObjRender_SetColor(id[2],255,255,0);
		}
		case("GREEN"){
			ObjSprite2D_SetSourceRect(id[i],768,0,1024,256);
			ObjSprite2D_SetDestCenter(id[i]);
			ObjRender_SetColor(id[2],0,255,0);
		}
		
		case("AQUA"){
			ObjSprite2D_SetSourceRect(id[i],0,256,256,512);
			ObjSprite2D_SetDestCenter(id[i]);
			ObjRender_SetColor(id[2],0,255,255);
		}
		case("BLUE"){
			ObjSprite2D_SetSourceRect(id[i],256,256,512,512);
			ObjSprite2D_SetDestCenter(id[i]);
			ObjRender_SetColor(id[2],0,0,255);
		}
		case("PURPLE"){
			ObjSprite2D_SetSourceRect(id[i],512,256,768,512);
			ObjSprite2D_SetDestCenter(id[i]);
			ObjRender_SetColor(id[2],255,0,255);
		}
		case("WHITE"){
			ObjSprite2D_SetSourceRect(id[i],768,256,1024,512);
			ObjSprite2D_SetDestCenter(id[i]);
			ObjRender_SetColor(id[2],255,255,255);
		}
		i++;
	}i++;
	
	ObjSprite2D_SetSourceRect(id[2],0,0,64,64);
	ObjSprite2D_SetDestCenter(id[2]);
	
	NuClearExplotion(x,y,sca*8,Color);
	while(sca1<sca){
		if(Obj_IsDeleted(enm)){break;}
		let gp	= [ObjMove_GetX(sh),ObjMove_GetY(sh)];
		scaA+=5;
		sca1=sca*sin(scaA);
		ObjShot_SetIntersectionCircleA2(sh,gp[0],gp[1],sca1*128-16);
		ObjRender_SetPosition(id[0],gp[0],gp[1],0);
		ObjRender_SetPosition(id[1],gp[0],gp[1],0);
		ObjRender_SetPosition(id[2],gp[0],gp[1],0);
		ObjRender_SetScaleXYZ(id[0],sca1,sca1,0);
		ObjRender_SetScaleXYZ(id[1],sca1+0.04*sin(cc*128),sca1+0.04*sin(cc*128),0);
		ObjRender_SetScaleXYZ(id[2],sca1*6,sca1*6,0);
		
		cc++;
		ObjRender_SetAngleXYZ(id[0],0,0,cc*-32);
		ObjRender_SetAngleXYZ(id[1],0,0,cc*32);
		ObjRender_SetAngleXYZ(id[2],0,0,cc*32);
		ObjRender_SetColor(id[0],sca1*255,sca1*255,sca1*255);
		ObjRender_SetColor(id[1],sca1*128,sca1*128,sca1*128);
		
		yield;
	}
	ObjShot_SetAutoDelete(sh,true);
	while(!Obj_IsDeleted(sh)){
		if(Obj_IsDeleted(enm)){break;}
		long++;
		let gp	= [ObjMove_GetX(sh),ObjMove_GetY(sh)];
		ObjShot_SetIntersectionCircleA2(sh,gp[0],gp[1],sca1*128-16);//0.6 64 //1 128
		ObjRender_SetPosition(id[0],gp[0],gp[1],0);
		ObjRender_SetPosition(id[1],gp[0],gp[1],0);
		ObjRender_SetPosition(id[2],gp[0],gp[1],0);
		ObjRender_SetScaleXYZ(id[0],sca1,sca1,0);
		ObjRender_SetScaleXYZ(id[1],sca1+0.04*sin(cc*128),sca1+0.04*sin(cc*128),0);
		ObjRender_SetScaleXYZ(id[2],sca1*6,sca1*6,0);
		
		cc++;
		ObjRender_SetAngleXYZ(id[0],0,0,cc*-32);
		ObjRender_SetAngleXYZ(id[1],0,0,cc*32);
		ObjRender_SetAngleXYZ(id[2],0,0,cc*32);
		
		if(long>kill){break;}
		
		yield;
	}
	while(sca1>0){
		if(Obj_IsDeleted(enm)){break;}
		scaA+=5;
		sca1=sca*sin(scaA);
		
		ObjRender_SetScaleXYZ(id[0],sca1,sca1,0);
		ObjRender_SetScaleXYZ(id[1],sca1+0.04*sin(cc*128),sca1+0.04*sin(cc*128),0);
		ObjRender_SetScaleXYZ(id[2],sca1*6,sca1*6,0);
		
		cc++;
		ObjRender_SetAngleXYZ(id[0],0,0,cc*-32);
		ObjRender_SetAngleXYZ(id[1],0,0,cc*32);
		ObjRender_SetAngleXYZ(id[2],0,0,cc*32);
		ObjRender_SetColor(id[0],sca1*255,sca1*255,sca1*255);
		ObjRender_SetColor(id[1],sca1*128,sca1*128,sca1*128);
		
		yield;
	}
	Obj_Delete(sh);
	Obj_Delete(id[0]);
	Obj_Delete(id[1]);
	Obj_Delete(id[2]);
}

task NuClearExplotion(x,y,sca,char_type){
	let id			= ObjPrim_Create(OBJ_SPRITE_2D);
	let sca1		= 0;
	let scaA		= 0;
	let alpha1		= 0;
	let alphaA		= 0;
	let INDEX_ORANGE	= "ORANGE";
	let INDEX_BLUE		= "BLUE";
	let INDEX_YELLOW	= "YELLOW";
	let INDEX_GREEN		= "GREEN";
	let INDEX_AQUA		= "AQUA";
	let INDEX_PURPLE	= "PURPLE";
	let INDEX_RED		= "RED";
	let INDEX_WHITE		= "WHITE";
	
	ObjRender_SetPosition(id,x,y,0);
	ObjPrim_SetTexture(id,csd~"../../img/eff/eff_default.png");
	Obj_SetRenderPriorityI(id,49);
	ObjRender_SetBlendType(id,BLEND_ALPHA);
	ObjRender_SetAngleXYZ(id,0,0,0);
	ObjRender_SetScaleXYZ(id,sca1,sca1,0);
	ObjRender_SetColor(id,255,255,255);
	alternative(char_type)
	case(INDEX_ORANGE){
		ObjSprite2D_SetSourceRect(id,129,17,191,79);
	}
	case(INDEX_BLUE){
		ObjSprite2D_SetSourceRect(id,193,17,255,79);
	}
	case(INDEX_YELLOW){
		ObjSprite2D_SetSourceRect(id,1,81,63,143);
	}
	case(INDEX_GREEN){
		ObjSprite2D_SetSourceRect(id,65,81,127,143);
	}
	case(INDEX_AQUA){
		ObjSprite2D_SetSourceRect(id,129,81,191,143);
	}
	case(INDEX_PURPLE){
		ObjSprite2D_SetSourceRect(id,193,81,255,143);
	}
	case(INDEX_RED){
		ObjSprite2D_SetSourceRect(id,129,17,191,79);
	}
	case(INDEX_WHITE){
		ObjSprite2D_SetSourceRect(id,1,81,63,143);
	}
	ObjSprite2D_SetDestCenter(id);
	
	while(alpha1<255){
		if(Obj_IsDeleted(enm)){break;}
		if(sca1<sca){
			scaA+=2;
			sca1 = sca*sin(scaA);
		}
		if(sca1>=sca){sca1+=0.01;}
		alphaA+=1;
		alpha1 = 255*sin(alphaA);
		ObjRender_SetScaleXYZ(id,sca1,sca1,0);
		ObjRender_SetAlpha(id,255-alpha1);
		yield;
	}
	Obj_Delete(id);
}