
task optionmove//オプションの動き方。powerによって場合分け。時間差（1F後)で自機に追従する。
{
let X1=[];
let Y1=[];
let X2=[];
let Y2=[];
let X3=[];
let Y3=[];
let X4=[];
let Y4=[];
let plus=0;
ascent(let k in 0..1)
{
 X1 = X1 ~ [k];
 Y1 = Y1 ~ [k];
 X2 = X2 ~ [k];
 Y2 = Y2 ~ [k];
 X3 = X3 ~ [k];
 Y3 = Y3 ~ [k];
 X4 = X4 ~ [k];
 Y4 = Y4 ~ [k];
}

	ascent(let i in 0..1)
	{
	if(Power>=1000 && Power<2000)
	{
	X1[i]=GetPlayerX;
	Y1[i]=GetPlayerY-30;
	}
	yield;
	}
loop
{

	ascent(let j in 0..1)
	{
/*	if(Power>=0 && Power<2000)
	{
		opX[0]=X1[j];
		opY[0]=Y1[j];
		opX[1]=X2[j];
		opY[1]=Y2[j];
		opX[2]=X3[j];
		opY[2]=Y3[j];
		opX[3]=X4[j];
		opY[3]=Y4[j];
		X1[j]=GetPlayerX;
		if((GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD))
		{
			Y1[j]=GetPlayerY-35+plus/2;
			X2[j]=GetPlayerX-(-40+plus);
			Y2[j]=GetPlayerY-plus;
			X3[j]=GetPlayerX;
			Y3[j]=GetPlayerY-35+plus/2;
			X4[j]=GetPlayerX+15-plus/2;
			Y4[j]=GetPlayerY-35+plus/2;
			if(plus<=9)
			{
				plus+=1;
			}
		}
		else
		{
			Y1[j]=GetPlayerY-35+plus/2;
			X2[j]=GetPlayerX-(-40+plus);
			Y2[j]=GetPlayerY-plus;
			X3[j]=GetPlayerX;
			Y3[j]=GetPlayerY-35+plus/2;
			X4[j]=GetPlayerX+15-plus/2;
			Y4[j]=GetPlayerY-35+plus/2;
			if(plus>0)
			{
				plus-=1;
			}
		}
	}

	if(Power>=2000 && Power<3000)
	{
		opX[0]=X1[j];
		opY[0]=Y1[j];
		opX[1]=X2[j];
		opY[1]=Y2[j];
		opX[2]=X3[j];
		opY[2]=Y3[j];
		opX[3]=X4[j];
		opY[3]=Y4[j];
		if((GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD))
		{
			X1[j]=GetPlayerX-40+plus;
			X2[j]=GetPlayerX-(-40+plus);
			Y1[j]=GetPlayerY;
			Y2[j]=GetPlayerY;
			X3[j]=GetPlayerX;
			Y3[j]=GetPlayerY-35+plus/2;
			X4[j]=GetPlayerX+15-plus/2;
			Y4[j]=GetPlayerY-35+plus/2;
			if(plus<=14)
			{
				plus+=1;
			}
		}
		else
		{
			X1[j]=GetPlayerX-40+plus;
			X2[j]=GetPlayerX-(-40+plus);
			Y1[j]=GetPlayerY;
			Y2[j]=GetPlayerY;
			X3[j]=GetPlayerX;
			Y3[j]=GetPlayerY-35+plus/2;
			X4[j]=GetPlayerX+15-plus/2;
			Y4[j]=GetPlayerY-35+plus/2;
			if(plus>0)
			{
				plus-=1;
			}
		}
	}

	if(Power>=3000 && Power<4000)
	{
		opX[0]=X1[j];
		opY[0]=Y1[j];
		opX[1]=X2[j];
		opY[1]=Y2[j];
		opX[2]=X3[j];
		opY[2]=Y3[j];
		opX[3]=X4[j];
		opY[3]=Y4[j];
		if((GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD))
		{
			X1[j]=GetPlayerX-40+plus;
			X2[j]=GetPlayerX-(-40+plus);
			X3[j]=GetPlayerX;
			Y1[j]=GetPlayerY;
			Y2[j]=GetPlayerY;
			Y3[j]=GetPlayerY-35+plus/2;
			X4[j]=GetPlayerX+15-plus/2;
			Y4[j]=GetPlayerY;
			if(plus<=14)
			{
				plus+=1;
			}
		}
		else
		{
			X1[j]=GetPlayerX-40+plus;
			X2[j]=GetPlayerX-(-40+plus);
			X3[j]=GetPlayerX;
			Y1[j]=GetPlayerY;
			Y2[j]=GetPlayerY;
			Y3[j]=GetPlayerY-35+plus/2;
			X4[j]=GetPlayerX+15-plus/2;
			Y4[j]=GetPlayerY;
			if(plus>0)
			{
				plus-=1;
			}
		}
	}


*/	if(Power>=0)
	{
		opX[0]=X1[j];
		opY[0]=Y1[j];
		opX[1]=X2[j];
		opY[1]=Y2[j];
		opX[2]=X3[j];
		opY[2]=Y3[j];
		opX[3]=X4[j];
		opY[3]=Y4[j];
		if((GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD))
		{
			X1[j]=GetPlayerX-40+plus;
			X2[j]=GetPlayerX-(-40+plus);
			X3[j]=GetPlayerX-80+plus*3/2;
			X4[j]=GetPlayerX+80-plus*3/2;
			Y1[j]=GetPlayerY;
			Y2[j]=GetPlayerY;
			Y3[j]=GetPlayerY;
			Y4[j]=GetPlayerY;
			if(plus<=14)
			{
				plus+=1;
			}
		}
		else
		{
			X1[j]=GetPlayerX-40+plus;
			X2[j]=GetPlayerX-(-40+plus);
			X3[j]=GetPlayerX-80+plus*3/2;
			X4[j]=GetPlayerX+80-plus*3/2;
			Y1[j]=GetPlayerY;
			Y2[j]=GetPlayerY;
			Y3[j]=GetPlayerY;
			Y4[j]=GetPlayerY;
			if(plus>0)
			{
				plus-=1;
			}
		}
	}
	}

yield;
}
}