 
task optionmove//オプションの動き方。powerによって場合分け。時間差（1F後)で自機に追従する。
{
let OpAnglePlus=0;
let dir=1;
let RightAngle=-20;
let LeftAngle=20;
let MoveY=5;
let MoveY2=5/3;

loop
{

	ascent(let j in 0..1)
	{
	if(Power>=0)
	{
		if(GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD)
		{
			opX[0]=GetPlayerX-15+7.5*cos(OpAngle)*cos(LeftAngle)-7.5*sin(OpAngle)*sin(LeftAngle);
			opX[1]=GetPlayerX-15+7.5*cos(OpAngle+180)*cos(LeftAngle)-7.5*sin(OpAngle+180)*sin(LeftAngle);
			opX[2]=GetPlayerX+15+7.5*cos(-OpAngle)*cos(RightAngle)-7.5*sin(-OpAngle)*sin(RightAngle);
			opX[3]=GetPlayerX+15+7.5*cos(-OpAngle+180)*cos(RightAngle)-7.5*sin(-OpAngle+180)*sin(RightAngle);
			opY[0]=GetPlayerY-30+MoveY2*sin(OpAngle)*cos(LeftAngle)-MoveY2*cos(OpAngle)*sin(LeftAngle);
			opY[1]=GetPlayerY-30+MoveY2*sin(OpAngle+180)*cos(LeftAngle)-MoveY2*cos(OpAngle+180)*sin(LeftAngle);
			opY[2]=GetPlayerY-30+MoveY2*sin(-OpAngle)*cos(RightAngle)-MoveY2*cos(-OpAngle)*sin(RightAngle);
			opY[3]=GetPlayerY-30+MoveY2*sin(-OpAngle+180)*cos(RightAngle)-MoveY2*cos(-OpAngle+180)*sin(RightAngle);;
			OpAngle+=6;

		}
		else
		{
			opX[0]=GetPlayerX-35+15*cos(OpAngle)*cos(LeftAngle)-15*sin(OpAngle)*sin(LeftAngle);
			opX[1]=GetPlayerX-35+15*cos(OpAngle+180)*cos(LeftAngle)-15*sin(OpAngle+180)*sin(LeftAngle);
			opX[2]=GetPlayerX+35+15*cos(-OpAngle)*cos(RightAngle)-15*sin(-OpAngle)*sin(RightAngle);
			opX[3]=GetPlayerX+35+15*cos(-OpAngle+180)*cos(RightAngle)-15*sin(-OpAngle+180)*sin(RightAngle);
			opY[0]=GetPlayerY+MoveY*sin(OpAngle)*cos(LeftAngle)-MoveY*cos(OpAngle)*sin(LeftAngle);
			opY[1]=GetPlayerY+MoveY*sin(OpAngle+180)*cos(LeftAngle)-MoveY*cos(OpAngle+180)*sin(LeftAngle);
			opY[2]=GetPlayerY+MoveY*sin(-OpAngle)*cos(RightAngle)-MoveY*cos(-OpAngle)*sin(RightAngle);
			opY[3]=GetPlayerY+MoveY*sin(-OpAngle+180)*cos(RightAngle)-MoveY*cos(-OpAngle+180)*sin(RightAngle);;
			OpAngle+=6;
		}
		MagicOpAnglePlus=OpAnglePlus;
	}
	}
yield;
}
}


task OptionShot
{
loop
{
	ascent(let i in 0..4)
	{
		OptionAuraShot(i);
	}
	wait(600);
}
}

task OptionAuraShot(num)
{
	let obj= Obj_Create(OBJ_LASER);
	Obj_SetX(obj,opX[num]);
	Obj_SetY(obj,opY[num]+48);
	ObjShot_SetDamage(obj,0.2);
	ObjShot_SetPenetration(obj,65556);
	ObjShot_SetGraphic(obj,1);
	Obj_SetAngle(obj,270);
	ObjLaser_SetLength(obj,96);
	ObjLaser_SetWidth(obj,16);
	ObjLaser_SetSource(obj,false);
	Obj_SetAlpha(obj,0);

	loop(600)
	{
		if(BurstLevel==0)
		{
			ObjShot_SetDamage(obj,0.2);
		}
		if(BurstLevel==1)
		{
			ObjShot_SetDamage(obj,0.2*1.2);
		}
		if(BurstLevel==2)
		{
			ObjShot_SetDamage(obj,0.2*1.5);
		}
		if(BurstLevel==3)
		{
			ObjShot_SetDamage(obj,0.2*2);
		}
		if(GetKeyState(VK_SLOWMOVE)==KEY_FREE)
		{
			ObjShot_SetDamage(obj,0);
		}
	Obj_SetX(obj,opX[num]);
	Obj_SetY(obj,opY[num]+48);
	yield;
	}
	Obj_Delete(obj);
}