From 2525df7db75608c802e4ab757a6eebd39baf8292 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Thu, 15 Sep 2022 19:23:59 -0400 Subject: [PATCH] Bouncy Spiky Ball now fires 4 at once on SS --- Items/Weapons/Rogue/BouncySpikyBall.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Rogue/BouncySpikyBall.cs b/Items/Weapons/Rogue/BouncySpikyBall.cs index 51f1d9d016..b8e18f7e76 100644 --- a/Items/Weapons/Rogue/BouncySpikyBall.cs +++ b/Items/Weapons/Rogue/BouncySpikyBall.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue DisplayName.SetDefault("Bouncy Spiky Ball"); Tooltip.SetDefault(@"Throws a very bouncy ball that ricochets off walls and enemies Receives a small boost in damage and velocity after bouncing off an enemy -Stealth strikes provide a bigger boost after ricocheting"); +Stealth strikes throw four at once and provide a bigger boost after ricocheting"); SacrificeTotal = 99; } @@ -44,9 +44,17 @@ Stealth strikes provide a bigger boost after ricocheting"); { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike { - int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); - if (stealth.WithinBounds(Main.maxProjectiles)) - Main.projectile[stealth].Calamity().stealthStrike = true; + int spread = 3; + for (int i = 0; i < 4; i++) + { + Vector2 perturbedspeed = new Vector2(velocity.X + Main.rand.Next(-3,4), velocity.Y + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread)); + int proj = Projectile.NewProjectile(source, position, perturbedspeed, type, damage, knockback, player.whoAmI); + if (proj.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[proj].Calamity().stealthStrike = true; + } + spread -= Main.rand.Next(1,4); + } return false; } return true;