task Shot{

loop{
	let Power=truncate(GetCommonData("Power")/100);
	if(GetCommonData("ResultTime") == 1){break;}
	if(GetKeyState(VK_SHOT)==KEY_PUSH || GetKeyState(VK_SHOT)==KEY_HOLD){
		if(GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD)
		{	//低速移動時の自弾
			if(shotCount%5 == 0)
			{
				if(Power==0){//平均火力208
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 13, 1, 1);
				}
				if(Power==1){//218
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 11.4, 1, 1);
				}
				if(Power==2){//228
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 4.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-86, 4.2, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-94, 4.0, 1, 1);
				}
				if(Power==3){//234
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 3.5, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-86, 3.4, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-94, 3.5, 1, 1);
				}
				if(Power==4){//240
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 1.8, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-86, 2.3, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-94, 2.4, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-82, 2.3, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-98, 1.8, 1, 1);
				}
				if(Power>=5){//245
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 1.5, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-86, 2.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-94, 2.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-82, 2.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-98, 1.5, 1, 1);
				}
				PlaySE(shotSE);
				if(GetCommonData("C") < 1800){SetCommonData("C",GetCommonData("C") - 10);}
			}
		}
		else 
		{	//高速移動自の自弾発射
			if(shotCount%5 == 0)
			{
				if(Power==0){//平均火力132
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 12, 1, 1);
				}
				if(Power==1){//132
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 12, 1, 1);
				}
				if(Power==2){//134
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 4.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-86, 4.2, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-94, 4.0, 1, 1);
				}
				if(Power==3){//133
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 3.7, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-86, 3.6, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-94, 3.7, 1, 1);
				}
				if(Power==4){//132
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 2.1, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-86, 2.1, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-94, 2.2, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-82, 2.1, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-98, 2.1, 1, 1);
				}
				if(Power>=5){//135
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 2.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-86, 2.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-94, 2.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-82, 2.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-98, 2.0, 1, 1);
				}
				PlaySE(shotSE);
				if(GetCommonData("C") < 1800){SetCommonData("C",GetCommonData("C") - 10);}
			}		
		}

	}
	shotCount++;
	if(shotCount == 60){
		shotCount=-1;
	}
	yield;
}

}