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<=1){//平均火力210,220,230,242,253,264
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 15, 1, 1);
				}
				if(Power==2){
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 13.3, 1, 1);
				}
				if(Power==3){
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 4.7, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-95, 4.8, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-85, 4.7, 1, 1);
				}
				if(Power==4){
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 4.3, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-95, 4.4, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-85, 4.3, 1, 1);
				}
				if(Power==5){
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 4.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-95, 4.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-85, 4.0, 1, 1);
				}
				PlaySE(shotSE);
				if(GetCommonData("C") < 1800){SetCommonData("C",GetCommonData("C") - 10);}
			}
		}
		else 
		{	//高速移動自の自弾発射
			if(shotCount%5 == 0)
			{
				if(Power<=1){
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 15, 1, 1);
				}
				if(Power==2){
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 13.3, 1, 1);
				}
				if(Power==3){
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 4.7, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-95, 4.8, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-85, 4.7, 1, 1);
				}
				if(Power==4){
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 4.3, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-95, 4.4, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-85, 4.3, 1, 1);
				}
				if(Power==5){
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-90, 4.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-95, 4.0, 1, 1);
					CreatePlayerShot01(GetPlayerX(), GetPlayerY(),15,-85, 4.0, 1, 1);
				}
				PlaySE(shotSE);
				if(GetCommonData("C") < 1800){SetCommonData("C",GetCommonData("C") - 10);}
			}		
		}
	}

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

}