function SpellCard(name, colors, image, y){
	let objScene = GetEnemyBossSceneObjectID();
	ObjEnemyBossScene_StartSpell(objScene);
	BarName(name, colors);
	CutinItself(image, y);
	SarakaBackground;
	loop(210){yield;}
}

task CutinItself(image, y){
	let obj2 = ObjPrim_Create(OBJ_SPRITE_2D);
	let obj = ObjPrim_Create(OBJ_SPRITE_2D);
	
	ObjPrim_SetTexture(obj, image);
	Obj_SetRenderPriority(obj, 0.7);
	ObjSprite2D_SetSourceRect(obj,0,0,GetTextureWidth(image),GetTextureHeight(image));
	ObjSprite2D_SetDestCenter(obj);	
	ObjRender_SetScaleXYZ(obj,0.5,0.5,0);
	ObjRender_SetAngleXYZ(obj,0,0,0);
	ObjRender_SetBlendType(obj, BLEND_ALPHA);
	ObjRender_SetColor(obj, 255, 255, 255);
	
	ObjPrim_SetTexture(obj2, image);
	Obj_SetRenderPriority(obj2, 0.7);
	ObjSprite2D_SetSourceRect(obj2,0,0,GetTextureWidth(image),GetTextureHeight(image));
	ObjSprite2D_SetDestCenter(obj2);	
	ObjRender_SetScaleXYZ(obj2,1,1,0);
	ObjRender_SetAngleXYZ(obj2,0,0,0);
	ObjRender_SetBlendType(obj2, BLEND_ALPHA);
	ObjRender_SetAlpha(obj2, 122);
	ObjRender_SetColor(obj2, 255, 255, 255);
	
	ObjRender_SetY(obj, GetStgFrameHeight/2+50+y);
	ObjRender_SetX(obj, GetStgFrameWidth+40);
	
	ObjRender_SetY(obj2, GetStgFrameHeight/2+150+y);
	ObjRender_SetX(obj2, GetStgFrameWidth+40);
	
	go(obj2);
	
	task go(obj2){
	ascent(i in 0..100){
	ObjRender_SetX(obj2, GetStgFrameWidth/2-15*tan(i*1.3-90));
	yield;
	}
	ascent(i in 0..50){
	ObjRender_SetX(obj2, GetStgFrameWidth/2-15*tan((i+100)*1.3-90));
	ObjRender_SetAlpha(obj2, 122-i*4);
	yield;
	}
	}
	
	ascent(i in 0..128){
	ObjRender_SetX(obj, GetStgFrameWidth/2-75*tan(i*1.4-90));
	yield;
	}
	/*
	ascent(i in 0..128){
	ObjRender_SetX(obj, -20+i*5);
	ObjRender_SetAngleZ(obj, i*12);
	yield;
	}
	*/
	Obj_Delete(obj);
}

task BarName(name, colors){
	let objBar = ObjPrim_Create(OBJ_SPRITE_2D);
	ObjRender_SetBlendType(objBar, BLEND_ALPHA);
	Obj_SetRenderPriority(objBar, 0.7);
	ObjPrim_SetTexture(objBar, GetCurrentScriptDirectory ~ "/img/SpellBar.png");
	ObjSprite2D_SetSourceRect(objBar, 0, 0, 271, 40);
	ObjSprite2D_SetDestCenter(objBar);
	ObjRender_SetColor(objBar, colors[0], colors[1], colors[2]);
	ObjRender_SetY(objBar, 38);
	ObjRender_SetX(objBar, -80);
	
	let objText = ObjText_Create;
	Obj_SetRenderPriority(objText, 0.8);
	ObjText_SetText(objText,name);
	ObjText_SetFontSize(objText,11);
	ObjText_SetFontColorTop(objText,255,255,255);
	ObjText_SetFontColorBottom(objText, colors[0], colors[1], colors[2]);
	ObjText_SetFontBorderType(objText,BORDER_FULL);
	ObjText_SetFontBorderColor(objText,32,32,32);
	ObjText_SetFontBorderWidth(objText,1);
	ObjText_SetHorizontalAlignment(objText, ALIGNMENT_RIGHT);
	ObjText_SetMaxWidth(objText, GetStgFrameWidth-24);
	ObjRender_SetY(objText, 30);
	ObjRender_SetX(objText, -328);
	
	let spd = 8.5;
	ascent(i in 0..64){
	ObjRender_SetX(objText, -328+i*spd);
	ObjRender_SetX(objBar, 328/2+i*spd);
	spd-=0.05;
	yield;
	}
}