From eeec0bcf29b9e8ee9fd395e6ea2df37c53905d1f Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 23 Sep 2023 21:32:10 -0700 Subject: [PATCH] Healing plus Particle improvements and Miracle Blight visual improvement --- Buffs/DamageOverTime/MiracleBlight.cs | 2 +- CalPlayer/CalamityPlayerDrawEffects.cs | 8 ++++---- Particles/HealingPlus.cs | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Buffs/DamageOverTime/MiracleBlight.cs b/Buffs/DamageOverTime/MiracleBlight.cs index c20023ab8a..69967cbdc8 100644 --- a/Buffs/DamageOverTime/MiracleBlight.cs +++ b/Buffs/DamageOverTime/MiracleBlight.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Buffs.DamageOverTime 2 => Color.Orange, _ => Color.LawnGreen, }; - DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, new Vector2(5, 5).RotatedByRandom(360), sparkColor, new Vector2(Main.rand.NextFloat(1f, 5f), Main.rand.NextFloat(1f, 5f)), 0, Main.rand.NextFloat(0.07f, 0.1f), 0f, 18); + DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, sparkColor, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.1f), 0f, 25); GeneralParticleHandler.SpawnParticle(pulse); float numberOfDusts = 3f; diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index e67aa16633..486124e7bd 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -292,7 +292,7 @@ namespace CalamityMod.CalPlayer { if (Main.rand.NextBool(24) && drawInfo.shadow == 0f) { - Particle Plus = new HealingPlus(Player.Center, Main.rand.NextFloat(0.5f, 1.2f), Color.HotPink, Color.LightPink, Main.rand.Next(10, 15)); + Particle Plus = new HealingPlus(Player.Center, Main.rand.NextFloat(0.5f, 1.2f), new Vector2(0, Main.rand.NextFloat(-2f, -3.5f)) + Player.velocity, Color.HotPink, Color.LightPink, Main.rand.Next(10, 15)); GeneralParticleHandler.SpawnParticle(Plus); } } @@ -300,7 +300,7 @@ namespace CalamityMod.CalPlayer { if (Main.rand.NextBool(16) && drawInfo.shadow == 0f) { - Particle Plus = new HealingPlus(Player.Center, Main.rand.NextFloat(0.6f, 1.3f), Color.Lime, Color.LimeGreen, Main.rand.Next(10, 15)); + Particle Plus = new HealingPlus(Player.Center, Main.rand.NextFloat(0.6f, 1.3f), new Vector2(0, Main.rand.NextFloat(-2f, -3.5f)) + Player.velocity, Color.Lime, Color.LimeGreen, Main.rand.Next(10, 15)); GeneralParticleHandler.SpawnParticle(Plus); } } @@ -308,7 +308,7 @@ namespace CalamityMod.CalPlayer { if (Main.rand.NextBool(11) && drawInfo.shadow == 0f) { - Particle Plus = new HealingPlus(Player.Center, Main.rand.NextFloat(0.7f, 1.4f), Color.DarkSeaGreen, Color.DarkSeaGreen, Main.rand.Next(10, 15)); + Particle Plus = new HealingPlus(Player.Center, Main.rand.NextFloat(0.7f, 1.4f), new Vector2(0, Main.rand.NextFloat(-2f, -3.5f)) + Player.velocity, Color.DarkSeaGreen, Color.DarkSeaGreen, Main.rand.Next(10, 15)); GeneralParticleHandler.SpawnParticle(Plus); } } @@ -324,7 +324,7 @@ namespace CalamityMod.CalPlayer } if (Main.rand.NextBool(16) && drawInfo.shadow == 0f) { - Particle Plus = new HealingPlus(Player.Center - new Vector2(4, 0), Main.rand.NextFloat(0.4f, 0.8f), Color.Red, Color.DarkRed, Main.rand.Next(10, 15)); + Particle Plus = new HealingPlus(Player.Center - new Vector2(4, 0), Main.rand.NextFloat(0.4f, 0.8f), new Vector2(0, Main.rand.NextFloat(-2f, -3.5f)) + Player.velocity, Color.Red, Color.DarkRed, Main.rand.Next(10, 15)); GeneralParticleHandler.SpawnParticle(Plus); } } diff --git a/Particles/HealingPlus.cs b/Particles/HealingPlus.cs index 3d812d2f54..6e152bb148 100644 --- a/Particles/HealingPlus.cs +++ b/Particles/HealingPlus.cs @@ -20,12 +20,11 @@ namespace CalamityMod.Particles public Vector2 OverridePosition; public float Opacity; - public HealingPlus(Vector2 position, float scale, Color colorStart, Color colorEnd, int lifetime) + public HealingPlus(Vector2 position, float scale, Vector2 velocity, Color colorStart, Color colorEnd, int lifetime) { Position = position; Scale = scale; - Velocity.X = 0; - Velocity.Y = Main.rand.NextFloat(-2f, -5f); + Velocity = velocity; Rotation = 0; StartColor = colorStart; EndColor = colorEnd; @@ -37,7 +36,7 @@ namespace CalamityMod.Particles { Color = Color.Lerp(StartColor, EndColor, LifetimeCompletion); Lighting.AddLight(Position, Color.ToVector3() * 0.2f); - Opacity -= 0.05f; + Opacity -= 0.5f; } public override void CustomDraw(SpriteBatch spriteBatch)