diff --git a/Items/Weapons/Magic/Effervescence.cs b/Items/Weapons/Magic/Effervescence.cs index e594491c7e..515cf9267c 100644 --- a/Items/Weapons/Magic/Effervescence.cs +++ b/Items/Weapons/Magic/Effervescence.cs @@ -2,6 +2,7 @@ using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -11,6 +12,10 @@ namespace CalamityMod.Items.Weapons.Magic public class Effervescence : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Magic"; + public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/EffervescenceFire") { PitchVariance = 0.1f }; + public static readonly SoundStyle BurstSound = new("CalamityMod/Sounds/Item/EffervescenceBurst") { PitchVariance = 0.1f }; + public static readonly SoundStyle PopSound = new("CalamityMod/Sounds/Item/EffervescencePop") { PitchVariance = 0.1f }; + public override void SetDefaults() { Item.width = 56; @@ -25,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 3.75f; Item.value = CalamityGlobalItem.RarityPurpleBuyPrice; Item.rare = ItemRarityID.Purple; - Item.UseSound = SoundID.Item95; + Item.UseSound = FireSound; Item.autoReuse = true; Item.shootSpeed = 13f; Item.shoot = ModContent.ProjectileType(); @@ -37,9 +42,8 @@ namespace CalamityMod.Items.Weapons.Magic { for (int randomBullets = 0; randomBullets < 4; randomBullets++) { - float SpeedX = velocity.X + Main.rand.Next(-25, 26) * 0.05f; - float SpeedY = velocity.Y + Main.rand.Next(-25, 26) * 0.05f; - Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI); + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(10f)) * Main.rand.NextFloat(0.85f, 1.2f); + Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI); } return false; } diff --git a/Projectiles/Magic/BlueBubble.cs b/Projectiles/Magic/BlueBubble.cs index e54b7b72f7..9d95003c4c 100644 --- a/Projectiles/Magic/BlueBubble.cs +++ b/Projectiles/Magic/BlueBubble.cs @@ -1,4 +1,5 @@ -using CalamityMod.Particles; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -83,7 +84,7 @@ namespace CalamityMod.Projectiles.Magic public override void OnKill(int timeLeft) { - SoundEngine.PlaySound(SoundID.Item54, Projectile.Center); + SoundEngine.PlaySound(Effervescence.PopSound, Projectile.Center); Particle Star = new CritSpark(Projectile.Center, Vector2.Zero, Color.SkyBlue, Color.DeepSkyBlue, Main.rand.NextFloat(1f, 1.1f), 30, 0.1f, 3f); GeneralParticleHandler.SpawnParticle(Star); int num190 = Main.rand.Next(5, 9); diff --git a/Projectiles/Magic/UberBubble.cs b/Projectiles/Magic/UberBubble.cs index 36f9ad6e48..6af07a9d9d 100644 --- a/Projectiles/Magic/UberBubble.cs +++ b/Projectiles/Magic/UberBubble.cs @@ -1,10 +1,12 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Dusts; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Particles; -using CalamityMod.Dusts; + namespace CalamityMod.Projectiles.Magic { public class UberBubble : ModProjectile, ILocalizedModType @@ -63,7 +65,7 @@ namespace CalamityMod.Projectiles.Magic public override void OnKill(int timeLeft) { - SoundEngine.PlaySound(SoundID.Item96, Projectile.Center); + SoundEngine.PlaySound(Effervescence.BurstSound, Projectile.Center); Particle Star = new GenericSparkle(Projectile.Center, Vector2.Zero, Color.Purple, Color.PeachPuff, Main.rand.NextFloat(0.5f, 0.6f), 30, 0.1f, 3f); GeneralParticleHandler.SpawnParticle(Star); Star = new GenericSparkle(Projectile.Center + Projectile.velocity, Vector2.Zero, Color.MediumPurple, Color.LightPink, Main.rand.NextFloat(0.5f, 0.6f), 20, 0.1f, 3f); @@ -80,7 +82,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.owner == Main.myPlayer) { for (int numBubbles = 0; numBubbles < 3; numBubbles++) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * (Main.rand.NextFloat() * 2f), Projectile.velocity.Y * (Main.rand.NextFloat() * 2f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(20f)) * Main.rand.NextFloat(0.5f, 2f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } } } diff --git a/Sounds/Item/EffervescenceBurst.ogg b/Sounds/Item/EffervescenceBurst.ogg new file mode 100644 index 0000000000..bdffb45db5 Binary files /dev/null and b/Sounds/Item/EffervescenceBurst.ogg differ diff --git a/Sounds/Item/EffervescenceFire.ogg b/Sounds/Item/EffervescenceFire.ogg new file mode 100644 index 0000000000..585f359f12 Binary files /dev/null and b/Sounds/Item/EffervescenceFire.ogg differ diff --git a/Sounds/Item/EffervescencePop.ogg b/Sounds/Item/EffervescencePop.ogg new file mode 100644 index 0000000000..9f8889d1bb Binary files /dev/null and b/Sounds/Item/EffervescencePop.ogg differ