task ConcentrationQ{
	let dir = 0;
	let x = 0;
	while(!Obj_IsDeleted(bossObj)){
	con1(GetStgFrameWidth/2,GetStgFrameHeight/2,80);

			while(x<20){
				con2(BossX,BossY,dir);
				dir+=360/20;
				wait(2);
				x++;
			}
			x = 0;
			dir = 0;

	
		task con2(x,y,r){
		
			let batObj = ObjPrim_Create(OBJ_SPRITE_2D);
			let q = rand(0,360);
			let w = 150;
			let down = 155;
			let scale = rand(2,2.5);
			
			ObjPrim_SetTexture(batObj,GetCurrentScriptDirectory ~ "IMG/Bat.png");
			ObjSprite2D_SetDestRect(batObj,0,0,64,27);
			ObjSprite2D_SetSourceRect(batObj,0,0,64,27);
			ObjSprite2D_SetDestCenter(batObj);
			ObjRender_SetBlendType(batObj,BLEND_ADD_ARGB);
			ObjRender_SetAlpha(batObj,255);
			Obj_SetRenderPriorityI(batObj,70);
			ObjRender_SetPosition(batObj,x+rand(0,10),y+rand(0,10),0);
			ObjRender_SetScaleXYZ(batObj,rand(0,10),rand(0,10),rand(0,10));
				ObjRender_SetAngleXYZ(batObj,rand(0,60),rand(0,60),rand(0,360));
				ObjRender_SetPosition(batObj,x+cos(q)*w,y+sin(q)*w,0);
			
			loop(150){
				scale-=1/45;
				down-=2;
				w-=2;
			
				ObjRender_SetScaleXYZ(batObj,scale,scale,scale);
				ObjRender_SetPosition(batObj,x+cos(q)*w,y+sin(q)*w,0);
				ObjRender_SetAlpha(batObj,down);
				yield;
			}
			Obj_Delete(batObj);
			
			
			while(IsCloseScript(GetOwnScriptID)){ 
			Obj_Delete(batObj);
			}
			
			while(!Obj_IsDeleted(bossObj)){ yield; }
			Obj_Delete(batObj);
		}
			
		
		task con1(x,y,w){
			let concObj = ObjPrim_Create(OBJ_SPRITE_2D);
			let spin = 0;
			let dir = 0;
			let p = 0;
			let a = 7;
			let down = 0;
			let scale = 3;
			
			LoadSound(GetCurrentScriptDirectory ~ "SE/charge.wav");
			PlaySE(GetCurrentScriptDirectory ~ "SE/charge.wav");
			ObjPrim_SetTexture(concObj,GetCurrentScriptDirectory ~ "IMG/Con1.png");
			ObjSprite2D_SetDestRect(concObj,0,0,128,128);
			ObjSprite2D_SetSourceRect(concObj,0,0,128,128);
			ObjSprite2D_SetDestCenter(concObj);
			ObjRender_SetBlendType(concObj,BLEND_ADD_ARGB);
			ObjRender_SetAlpha(concObj,255);
			Obj_SetRenderPriorityI(concObj,70);
			ObjRender_SetPosition(concObj,x,y,0);
			ObjRender_SetColor(concObj,155,0,0);
			
			loop(120){
				spin+=0.03;
				dir+=360/a;
				scale-=0.005+(spin/100);
				let down = 155*sin(dir/100);
				ObjRender_SetAngleXYZ(concObj,0,0,spin*100+(spin*20));
				ObjRender_SetScaleXYZ(concObj,scale,scale,scale);
				ObjRender_SetAlpha(concObj,155-down);
				yield;
			}
			Obj_Delete(concObj);
			
			while(IsCloseScript(GetOwnScriptID)){ 
			Obj_Delete(concObj);
			}
			
			while(!Obj_IsDeleted(bossObj)){ yield; }
			Obj_Delete(concObj);
		}
		break;
	}
	}