From 435934f2a8833f8d09f63025fe1aaa603b5e035c Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 29 May 2024 13:20:11 -0700 Subject: [PATCH] Small touch ups --- Items/Weapons/Ranged/Shredder.cs | 2 +- Projectiles/Ranged/ChargedBlast.cs | 10 +++++++++- Projectiles/Ranged/ChargedBlastSplit.cs | 9 +++++---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Items/Weapons/Ranged/Shredder.cs b/Items/Weapons/Ranged/Shredder.cs index 06281c5e18..b2dbd51af0 100644 --- a/Items/Weapons/Ranged/Shredder.cs +++ b/Items/Weapons/Ranged/Shredder.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.UseSound = SoundID.Item31; Item.autoReuse = true; Item.shoot = ProjectileID.Bullet; - Item.shootSpeed = 6f; + Item.shootSpeed = 5f; Item.useAmmo = AmmoID.Bullet; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Projectiles/Ranged/ChargedBlast.cs b/Projectiles/Ranged/ChargedBlast.cs index e1aed457c9..38cd9aad44 100644 --- a/Projectiles/Ranged/ChargedBlast.cs +++ b/Projectiles/Ranged/ChargedBlast.cs @@ -39,12 +39,15 @@ namespace CalamityMod.Projectiles.Ranged bool Infinity = Projectile.ai[2] == 1; bool Svant = Projectile.ai[2] == 2 || Projectile.ai[2] == 3 || Projectile.ai[2] == 4; + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); + if (baseColor == Color.White) { baseColor = (Infinity ? new Color(229, 49, 39) : Svant ? Color.DarkViolet : Color.DodgerBlue); if (Projectile.ai[2] == 3) { - baseColor = Color.Violet; + baseColor = Color.DarkOrchid; } if (Projectile.ai[2] == 4) { @@ -59,6 +62,11 @@ namespace CalamityMod.Projectiles.Ranged Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.timeLeft == 2) outOfTime = true; + if ((Svant || Infinity) && Projectile.timeLeft % 2 == 0 && targetDist < 1400f) + { + Particle spark = new LineParticle(Projectile.Center - Projectile.velocity * 3, -Projectile.velocity * 0.05f, false, 5, 2f, baseColor * 0.65f); + GeneralParticleHandler.SpawnParticle(spark); + } } public override void OnKill(int timeLeft) { diff --git a/Projectiles/Ranged/ChargedBlastSplit.cs b/Projectiles/Ranged/ChargedBlastSplit.cs index a5df485570..fb72db7217 100644 --- a/Projectiles/Ranged/ChargedBlastSplit.cs +++ b/Projectiles/Ranged/ChargedBlastSplit.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged { baseColor = (Infinity ? new Color(229, 49, 39) : Svant ? Color.DarkViolet : Color.DodgerBlue); if (Projectile.ai[2] == 3) - baseColor = Color.Violet; + baseColor = Color.DarkOrchid; if (Projectile.ai[2] == 4) baseColor = Color.MediumOrchid; startVel = Projectile.velocity; @@ -82,13 +82,13 @@ namespace CalamityMod.Projectiles.Ranged if (Vector2.Distance(Projectile.Center, player.Calamity().mouseWorld) < 80) { Projectile.timeLeft = 300; - Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitX) * homeSpeed; + Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitX) * homeSpeed / 2; goToMouse = false; } } if (!goToMouse) { - float sine = (float)Math.Sin(Projectile.timeLeft * 0.375f / MathHelper.Pi) * 2.5f; + float sine = (float)Math.Sin(Projectile.timeLeft * 0.175f / MathHelper.Pi) * 1.2f; Vector2 offset = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(MathHelper.PiOver2) * sine * (direction ? 1 : -1); Projectile.Center += offset; } @@ -100,7 +100,8 @@ namespace CalamityMod.Projectiles.Ranged } public override void OnKill(int timeLeft) { - for (int k = 0; k < 3; k++) + bool Svant = Projectile.ai[2] == 2 || Projectile.ai[2] == 3 || Projectile.ai[2] == 4; + for (int k = 0; k < (Svant ? 2 : 3); k++) { Particle spark2 = new LineParticle(Projectile.Center, (Projectile.velocity * 5).RotatedByRandom(0.4f) * Main.rand.NextFloat(0.8f, 1.2f), false, Main.rand.Next(8, 11 + 1), Main.rand.NextFloat(0.5f, 1f), baseColor); GeneralParticleHandler.SpawnParticle(spark2);