diff --git a/Items/Weapons/Rogue/WaveSkipper.cs b/Items/Weapons/Rogue/WaveSkipper.cs index bea3fd5ab7..d53d7ff8c4 100644 --- a/Items/Weapons/Rogue/WaveSkipper.cs +++ b/Items/Weapons/Rogue/WaveSkipper.cs @@ -9,10 +9,12 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Rogue -{ +{ [LegacyName("DuneHopper")] public class WaveSkipper : RogueWeapon { + public static int SpreadAngle = 8; + public override void SetDefaults() { Item.width = 44; @@ -27,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.height = 44; Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; Item.DamageType = RogueDamageClass.Instance; } @@ -36,12 +38,10 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) { - int numProj = 3; - float rotation = MathHelper.ToRadians(3); - for (int i = 0; i < numProj; i++) + for (int i = -SpreadAngle; i < SpreadAngle * 2; i += SpreadAngle) { - Vector2 perturbedSpeed = new Vector2(velocity.X - 3f, velocity.Y - 3f).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - int stealth = Projectile.NewProjectile(source, position, perturbedSpeed, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + Vector2 spreadVelocity = player.SafeDirectionTo(Main.MouseWorld).RotatedBy(MathHelper.ToRadians(i)) * Item.shootSpeed; + int stealth = Projectile.NewProjectile(source, position, spreadVelocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); if (stealth.WithinBounds(Main.maxProjectiles)) Main.projectile[stealth].Calamity().stealthStrike = true; } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 86b010913a..b48f4563d9 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -80,7 +80,6 @@ DestructionStar.DisplayName: Star of Destruction DragonShit.DisplayName: Fire DukesDecapitatorBubble.DisplayName: Bubble DukesDecapitatorProj.DisplayName: Decapitator -DuneHopperProjectile.DisplayName: Scourge DuststormCloud.DisplayName: Dust Cloud DuststormCloudStealth.DisplayName: Dust Cloud DuststormInABottleProj.DisplayName: Duststorm @@ -322,4 +321,5 @@ WebBallBol.DisplayName: Web Ball WrathwingCinder.DisplayName: Wrathwing Eruption WrathwingFireball.DisplayName: Wrathwing Fireball WrathwingSpear.DisplayName: Wrathwing -WulfrumKnifeProj.DisplayName: Knife \ No newline at end of file +WulfrumKnifeProj.DisplayName: Knife +WaveSkipperProjectile.DisplayName: Scourge \ No newline at end of file diff --git a/Projectiles/Rogue/DuneHopperProjectile.cs b/Projectiles/Rogue/WaveSkipperProjectile.cs similarity index 94% rename from Projectiles/Rogue/DuneHopperProjectile.cs rename to Projectiles/Rogue/WaveSkipperProjectile.cs index de56b54683..3d1277da7d 100644 --- a/Projectiles/Rogue/DuneHopperProjectile.cs +++ b/Projectiles/Rogue/WaveSkipperProjectile.cs @@ -2,9 +2,11 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Rogue { - public class DuneHopperProjectile : ModProjectile, ILocalizedModType + [LegacyName("DuneHopperProjectile")] + public class WaveSkipperProjectile : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/WaveSkipper";