task SpellDisplay(number,time)//Apocalypse‚š•\ˇ¦
{
		let scx=0.75+0.25;
		let scy=0.75+0.25;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, imgSpell);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -331, -9);
		ObjEffect_SetVertexXY(obj, 1,0,  -9);
		ObjEffect_SetVertexXY(obj, 2,0, 9);
		ObjEffect_SetVertexXY(obj, 3,  -331, 9);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  1+number*19);
		ObjEffect_SetVertexUV(obj, 1,  331, 1+number*19);
		ObjEffect_SetVertexUV(obj, 2, 331, 19+number*19);
		ObjEffect_SetVertexUV(obj, 3, 0, 19+number*19);

		let Alpha=0;

		let R=255;
		let G=255;
		let B=255;
		alternative(StageProgress)
		case(1){R=0;G=250;B=154;}
		case(2){R=255;G=100;B=0;}
		case(3){R=148;G=0;B=211;}
		case(4){R=0;G=100;B=255;}
		if(GetCommonDataDefault("STAGE2MIDBOSS",false)){R=255;G=255;B=127;}
		if(GetCommonDataDefault("STAGE3MIDBOSS",false)){R=0;G=84;B=166;}
		if(GetCommonDataDefault("STAGE4MIDBOSS",false)){R=255;G=69;B=30;}
		ascent(i in 0..4)
		{
		ObjEffect_SetVertexColor(obj,i,Alpha,R,G,B);
		}

		ObjEffect_SetLayer(obj,7);
		
		Obj_SetX(obj,GetClipMaxX-32);
		Obj_SetY(obj,GetClipMaxY-16);

		ObjEffect_SetScale(obj, scx,scy);

		let y=GetClipMaxY+16;
		loop(60)
		{
			Obj_SetY(obj,y);
			ascent(i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,Alpha,R,G,B);
			}
			y-=0.5;
			Alpha+=255/60;
			yield;
		}
		let AlphaAngle=0;
		loop(time-120)
		{
			ascent(i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,Alpha,R,G,B);
			}	
			if(GetEnemyLife<=0){break;}
			if(GetCommonDataDefault("SpellDrawStop",false)){break;}
			yield;
		}
		loop(60)
		{
			Obj_SetY(obj,y);
			ascent(i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,Alpha,R,G,B);
			}
			y+=0.5;
			Alpha-=255/60;
			yield;
		}
		SetCommonData("SpellDrawStop",false);
		Obj_Delete(obj);
}