 
task optionmove//オプションの動き方。powerによって場合分け。時間差（1F後)で自機に追従する。
{
ascent(let i in 1..5)
{
opnum(i);
}
}

task opnum(num)
{
let X1=[];
let Y1=[];
let distanceX1=[];
let distanceY1=[];

ascent(let k in 0..10*num)
{
 X1 = X1 ~ [224];
 Y1 = Y1 ~ [400];
 distanceX1 = distanceX1 ~ [0];
 distanceY1 = distanceY1 ~ [0];
}
loop
{


	if(GetKeyState(VK_UP)==KEY_PUSH || GetKeyState(VK_UP)==KEY_HOLD || GetKeyState(VK_RIGHT)==KEY_PUSH || GetKeyState(VK_RIGHT)==KEY_HOLD || GetKeyState(VK_LEFT)==KEY_PUSH || GetKeyState(VK_LEFT)==KEY_HOLD || GetKeyState(VK_DOWN)==KEY_PUSH || GetKeyState(VK_DOWN)==KEY_HOLD)
	{
	ascent(let j in 0..10*num)
	{
		opX[num-1]=X1[j];
		opY[num-1]=Y1[j];
		distanceX1[j]=GetPlayerX-X1[j];
		distanceY1[j]=GetPlayerY-Y1[j];
		X1[j]=GetPlayerX;
		Y1[j]=GetPlayerY;
	if(!OnMissed)
	{
	while(GetKeyState(VK_UP)!=KEY_PUSH && GetKeyState(VK_UP)!=KEY_HOLD && GetKeyState(VK_RIGHT)!=KEY_PUSH && GetKeyState(VK_RIGHT)!=KEY_HOLD && GetKeyState(VK_LEFT)!=KEY_PUSH && GetKeyState(VK_LEFT)!=KEY_HOLD && GetKeyState(VK_DOWN)!=KEY_PUSH && GetKeyState(VK_DOWN)!=KEY_HOLD)
	{yield;}
	}
	yield;
	}
	}

yield;
}
}



task opnumjunk(num)//実装できなかった残骸
{
let X1=[];
let Y1=[];
let distanceX1=[];
let distanceY1=[];

ascent(let k in 0..10*num)
{
 X1 = X1 ~ [224];
 Y1 = Y1 ~ [400];
 distanceX1 = distanceX1 ~ [0];
 distanceY1 = distanceY1 ~ [0];
}
loop
{


	if(GetKeyState(VK_UP)==KEY_PUSH || GetKeyState(VK_UP)==KEY_HOLD || GetKeyState(VK_RIGHT)==KEY_PUSH || GetKeyState(VK_RIGHT)==KEY_HOLD || GetKeyState(VK_LEFT)==KEY_PUSH || GetKeyState(VK_LEFT)==KEY_HOLD || GetKeyState(VK_DOWN)==KEY_PUSH || GetKeyState(VK_DOWN)==KEY_HOLD)
	{
	ascent(let j in 0..10*num)
	{
		opX[num-1]=X1[j];
		opY[num-1]=Y1[j];
		distanceX1[j]=GetPlayerX-X1[j];
		distanceY1[j]=GetPlayerY-Y1[j];
		if(GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD)
		{
			while(GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD)
			{
			X1[j]=GetPlayerX-distanceX1[j];
			Y1[j]=GetPlayerY-distanceY1[j];
			opX[num-1]=X1[j];
			opY[num-1]=Y1[j];
			ascent(let s in 0..10*num)
			{
				distanceX1[s]=GetPlayerX-X1[s];
				distanceY1[s]=GetPlayerY-Y1[s];
			}
			yield;
			}
			ascent(let s in 0..10*num)
			{
				distanceX1[s]=GetPlayerX-X1[s];
				distanceY1[s]=GetPlayerY-Y1[s];
				X1[s]=GetPlayerX-distanceX1[s];
				Y1[s]=GetPlayerY-distanceY1[s];
			}
		}
		else
		{
			X1[j]=GetPlayerX;
			Y1[j]=GetPlayerY;
		}
	while(GetKeyState(VK_UP)!=KEY_PUSH && GetKeyState(VK_UP)!=KEY_HOLD && GetKeyState(VK_RIGHT)!=KEY_PUSH && GetKeyState(VK_RIGHT)!=KEY_HOLD && GetKeyState(VK_LEFT)!=KEY_PUSH && GetKeyState(VK_LEFT)!=KEY_HOLD && GetKeyState(VK_DOWN)!=KEY_PUSH && GetKeyState(VK_DOWN)!=KEY_HOLD)
	{yield;}
	yield;
	}
	}

yield;
}
}