public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
float spread = 2f * 0.1750f;
float baseSpeed = (float)Math.Sqrt(speedX * speedX + speedY * speedY);
double baseAngle = Math.Atan2(speedX, speedY);
double randomAngle = baseAngle + (Main.rand.NextFloat() - 0.75f) * spread;
float randomSpeed = Main.rand.NextFloat() * 0.2f + 1f;
speedX = baseSpeed * randomSpeed * (float)Math.Sin(randomAngle);
speedY = baseSpeed * randomSpeed * (float)Math.Cos(randomAngle);
if (player.direction > 0)
{
player.position.X -= 10;
return true;
}
if (player.direction < 0)
{
player.position.X += 10;
return true;
}
return true;
}