let path2=GetCurrentScriptDirectory~"img/eff04b.png";
let path3=GetCurrentScriptDirectory~"img/eff04.png";
let objScene=GetEnemyBossSceneObjectID();
let bspell=false;

task TDrawSpell{
	let obj=ObjPrim_Create(OBJ_SPRITE_2D);
	let obj2=ObjPrim_Create(OBJ_SPRITE_2D);
	ObjPrim_SetTexture(obj,path2);
	ObjPrim_SetTexture(obj2,path3);
	ObjSprite2D_SetSourceRect(obj,0,0,512,512);
	ObjSprite2D_SetSourceRect(obj2,0,0,384,448);
	ObjSprite2D_SetDestCenter(obj);
	ObjSprite2D_SetDestCenter(obj2);
	ObjRender_SetAlpha(obj,0);
	ObjRender_SetAlpha(obj2,0);
	Obj_SetRenderPriorityI(obj,20);
	Obj_SetRenderPriorityI(obj2,20);
	ObjRender_SetPosition(obj,GetStgFrameWidth/2,GetStgFrameHeight/2,0);
	ObjRender_SetPosition(obj2,GetStgFrameWidth/2,GetStgFrameHeight/2,0);
	ObjRender_SetScaleXYZ(obj,1.5,1.75,1.5);
	ObjRender_SetScaleXYZ(obj2,2.35,2.35,2.35);
	let alpha=0;
	let alpha2=0;
	let spin=0;
	TCheck;
	TAction;
	loop(30){
		ObjRender_SetAlpha(obj,alpha);
		ObjRender_SetAlpha(obj2,alpha2);
		alpha+=255/30;
		alpha2+=255/60;
		yield;
	}
	task TAction{
		while(bspell==true){
			ObjRender_SetAngleZ(obj,spin);
			spin+=0.25;
			yield;
		}
	}
	task TCheck{
		while(bspell==true){ yield; }
		loop(20){
			ObjRender_SetAlpha(obj,alpha);
			ObjRender_SetAlpha(obj2,alpha2);
			alpha-=255/20;
			alpha2-=255/20;
			yield;
		}
		Obj_Delete(obj);
		Obj_Delete(obj2);
	}
}