task magiccircle(boss,size,type){
	let obj = ObjPrim_Create(OBJ_SPRITE_2D);
	let img = GetCurrentScriptDirectory ~ "img/spellcircle.png";
	let spin = 0;
	LoadTexture(img);
	ObjPrim_SetTexture(obj, img);
	
	ObjSprite2D_SetSourceRect(obj, 0, 0, 132, 132);
	ObjSprite2D_SetDestCenter(obj);
	
	ObjRender_SetScaleXYZ(obj, size, size, size);
	ObjRender_SetBlendType(obj, BLEND_ADD_ARGB);
	ObjRender_SetAlpha(obj, 205);
	
	Obj_SetRenderPriorityI(obj, 25);
	while(!Obj_IsDeleted(boss)){
		if(GetCommonData("die", false) == true){break;}
		spin++;
		
		ObjRender_SetAngleXYZ(obj, 0, 0, spin*3);
		if(type == true){ObjRender_SetScaleXYZ(obj,size+0.2*sin(spin),size+0.2*sin(spin),0);}	
		ObjRender_SetPosition(obj, ObjMove_GetX(boss), ObjMove_GetY(boss), 0);
		ObjMove_SetPosition(obj,ObjMove_GetX(boss),ObjMove_GetY(boss));
		yield;
	}
	Obj_Delete(obj);
}
