task cutinimage(a,b) {

	spellname(a,b);

	let cutin = ObjPrim_Create(OBJ_SPRITE_2D);
	ObjPrim_SetTexture(cutin,GetCurrentScriptDirectory ~ "./img/TPW2nd_Momiji.png");
	ObjSprite2D_SetSourceRect(cutin,0,0,800,600);
	ObjSprite2D_SetDestCenter(cutin);
	Obj_SetRenderPriorityI(cutin,50);
	
	CutinSize(cutin);
	ObjRender_SetPosition(cutin,192,210,0);
	ascent(n in 0..30){
   	ObjRender_SetAlpha(cutin, 255/15*n);
	yield;
	}
	wait(120);
	descent(m in 0..30){
   	ObjRender_SetAlpha(cutin, 255/15*m);
	yield;
	}
	Obj_Delete(cutin);

}

task CutinSize(obj){
	
	let cutinsize = 2.7;
	ascent(s in 1..20){
	ObjRender_SetScaleXYZ(obj,cutinsize-s*0.1,cutinsize-s*0.1,0);
	yield;
	}
	wait(140);
	descent(s in 1..20){
	ObjRender_SetScaleXYZ(obj,cutinsize-s*0.1,cutinsize-s*0.1,0);
	yield;
	}
}

task spellname(words,xposistion) {

	let text = ObjText_Create;
	ObjText_SetText(text,words);
	ObjText_SetFontType(text,"Impact");
	ObjText_SetFontSize(text,18);
	ObjRender_SetPosition(text,400,400,0);
	Obj_SetRenderPriorityI(text,51);
	
	ascent(i in 0..xposistion/9) {
	ObjRender_SetX(text,400-i*9);
	yield;
	}
	wait(60);
	ascent(j in 0..43) {
	ObjRender_SetY(text,400-j*9);
	yield;
	}
	while(ObjEnemy_GetInfo(cirno,INFO_LIFE) > 0) {
		yield;
	}
	Obj_Delete(text);

}