From dfd067b87d43e387f0e25f49029c066486f80f57 Mon Sep 17 00:00:00 2001 From: Xhack <72313282+energykid@users.noreply.github.com> Date: Sat, 1 Jun 2024 06:35:33 -0400 Subject: [PATCH] Made certain particles able to be affected by light + used that new setting in Aerialite stuff --- Items/Weapons/Magic/SongOfParadise.cs | 10 ++++++ Items/Weapons/Ranged/GildedGatherer.cs | 10 ++++++ Particles/HeavySmoke.cs | 13 ++++++-- Particles/SmallSmokeParticle.cs | 5 ++- Particles/SparkParticle.cs | 15 +++++++-- Projectiles/Magic/SongOfParadiseDragon.cs | 10 +++--- Projectiles/Melee/WindBladeHoldout.cs | 6 ++-- Projectiles/Ranged/GildedGathererHarpoon.cs | 37 +++++++++++---------- Projectiles/Rogue/TurbulanceWindSlash.cs | 2 +- 9 files changed, 73 insertions(+), 35 deletions(-) diff --git a/Items/Weapons/Magic/SongOfParadise.cs b/Items/Weapons/Magic/SongOfParadise.cs index 7b448cc2ad..ad92fcd97d 100644 --- a/Items/Weapons/Magic/SongOfParadise.cs +++ b/Items/Weapons/Magic/SongOfParadise.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using CalamityMod.Items.BaseItems; +using CalamityMod.Items.Materials; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Ranged; @@ -85,5 +86,14 @@ namespace CalamityMod.Items.Weapons.Magic if (RetunedToMelody) RetunedToMelody = false; else RetunedToMelody = true; } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(8). + AddIngredient(ItemID.SunplateBlock, 3). + AddTile(TileID.SkyMill). + Register(); + } } } diff --git a/Items/Weapons/Ranged/GildedGatherer.cs b/Items/Weapons/Ranged/GildedGatherer.cs index af836931d5..1a9a6bc65a 100644 --- a/Items/Weapons/Ranged/GildedGatherer.cs +++ b/Items/Weapons/Ranged/GildedGatherer.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using CalamityMod.Items.BaseItems; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; @@ -41,5 +42,14 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.scale = 1f; } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(8). + AddIngredient(ItemID.SunplateBlock, 3). + AddTile(TileID.SkyMill). + Register(); + } } } diff --git a/Particles/HeavySmoke.cs b/Particles/HeavySmoke.cs index f82417fa07..57726c58d5 100644 --- a/Particles/HeavySmoke.cs +++ b/Particles/HeavySmoke.cs @@ -21,10 +21,11 @@ namespace CalamityMod.Particles private float Spin; private bool StrongVisual; private bool Glowing; + private bool AffectedByLight = false; private float HueShift; static int FrameAmount = 6; - public HeavySmokeParticle(Vector2 position, Vector2 velocity, Color color, int lifetime, float scale, float opacity, float rotationSpeed = 0f, bool glowing = false, float hueshift = 0f, bool required = false) + public HeavySmokeParticle(Vector2 position, Vector2 velocity, Color color, int lifetime, float scale, float opacity, float rotationSpeed = 0f, bool glowing = false, float hueshift = 0f, bool required = false, bool affectedByLight = false) { Position = position; Velocity = velocity; @@ -37,7 +38,7 @@ namespace CalamityMod.Particles StrongVisual = required; Glowing = glowing; HueShift = hueshift; - + AffectedByLight = affectedByLight; } public override void Update() @@ -62,8 +63,14 @@ namespace CalamityMod.Particles int animationFrame = (int)Math.Floor(Time / ((float)(Lifetime / (float)FrameAmount))); Rectangle frame = new Rectangle(80 * Variant, 80 * animationFrame, 80, 80); + Color col = Color * Opacity; - spriteBatch.Draw(tex, Position - Main.screenPosition, frame, Color * Opacity, Rotation, frame.Size() / 2f, Scale, SpriteEffects.None, 0); + if (AffectedByLight) + { + col = Lighting.GetColor((Position / 16).ToPoint()).MultiplyRGBA(col); + } + + spriteBatch.Draw(tex, Position - Main.screenPosition, frame, col, Rotation, frame.Size() / 2f, Scale, SpriteEffects.None, 0); } } diff --git a/Particles/SmallSmokeParticle.cs b/Particles/SmallSmokeParticle.cs index eeaf98e5a4..46a4c0ac3c 100644 --- a/Particles/SmallSmokeParticle.cs +++ b/Particles/SmallSmokeParticle.cs @@ -12,8 +12,9 @@ namespace CalamityMod.Particles private Color ColorFire; private Color ColorFade; private float Spin; + private bool AffectedByLight = false; - public SmallSmokeParticle(Vector2 position, Vector2 velocity, Color colorFire, Color colorFade, float scale, float opacity, float rotationSpeed = 0f) + public SmallSmokeParticle(Vector2 position, Vector2 velocity, Color colorFire, Color colorFade, float scale, float opacity, float rotationSpeed = 0f, bool affectedByLight = false) { Position = position; Velocity = velocity; @@ -23,6 +24,7 @@ namespace CalamityMod.Particles Opacity = opacity; Rotation = Main.rand.NextFloat(MathHelper.TwoPi); Spin = rotationSpeed; + AffectedByLight = affectedByLight; } public override void Update() @@ -46,6 +48,7 @@ namespace CalamityMod.Particles Color = Color.Lerp(ColorFire, ColorFade, MathHelper.Clamp((float)((255 - Opacity) - 100) / 80, 0f, 1f)) * (Opacity / 255f); + if (AffectedByLight) Color = Lighting.GetColor((Position / 16).ToPoint()).MultiplyRGBA(Color); } } } diff --git a/Particles/SparkParticle.cs b/Particles/SparkParticle.cs index 4d185e1376..c5ab3c42a5 100644 --- a/Particles/SparkParticle.cs +++ b/Particles/SparkParticle.cs @@ -10,6 +10,7 @@ namespace CalamityMod.Particles { public Color InitialColor; public bool AffectedByGravity; + public bool AffectedByLight = false; public bool FadeIn = false; public float FadeInScale = 0f; public override bool SetLifetime => true; @@ -18,11 +19,12 @@ namespace CalamityMod.Particles public override string Texture => "CalamityMod/Projectiles/StarProj"; - public SparkParticle(Vector2 relativePosition, Vector2 velocity, bool affectedByGravity, int lifetime, float scale, Color color, bool fadeIn = false) + public SparkParticle(Vector2 relativePosition, Vector2 velocity, bool affectedByGravity, int lifetime, float scale, Color color, bool fadeIn = false, bool affectedByLight = false) { Position = relativePosition; Velocity = velocity; AffectedByGravity = affectedByGravity; + AffectedByLight = affectedByLight; Scale = scale; FadeInScale = scale; Lifetime = lifetime; @@ -65,8 +67,15 @@ namespace CalamityMod.Particles Vector2 scale = new Vector2(0.5f, 1.6f) * Scale; Texture2D texture = ModContent.Request(Texture).Value; - spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale, 0, 0f); - spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale * new Vector2(0.45f, 1f), 0, 0f); + Color col = Color; + + if (AffectedByLight) + { + col = Lighting.GetColor((Position / 16).ToPoint()).MultiplyRGB(Color); + } + + spriteBatch.Draw(texture, Position - Main.screenPosition, null, col, Rotation, texture.Size() * 0.5f, scale, 0, 0f); + spriteBatch.Draw(texture, Position - Main.screenPosition, null, col, Rotation, texture.Size() * 0.5f, scale * new Vector2(0.45f, 1f), 0, 0f); } } } diff --git a/Projectiles/Magic/SongOfParadiseDragon.cs b/Projectiles/Magic/SongOfParadiseDragon.cs index 9d7fe25b11..176e0e02f1 100644 --- a/Projectiles/Magic/SongOfParadiseDragon.cs +++ b/Projectiles/Magic/SongOfParadiseDragon.cs @@ -22,7 +22,7 @@ using Terraria.Utilities.Terraria.Utilities; namespace CalamityMod.Projectiles.Magic { - public class SongOfParadiseDragon : ModProjectile, ILocalizedModType, IPixelatedPrimitiveRenderer + public class SongOfParadiseDragon : ModProjectile, ILocalizedModType { public static SoundStyle CollideSound = new SoundStyle("CalamityMod/Sounds/Item/SongWyvernCollide"); public override string Texture => "CalamityMod/Projectiles/Magic/Jimmy"; @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Magic { } - void IPixelatedPrimitiveRenderer.RenderPixelatedPrimitives(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch) + public override bool PreDraw(ref Color lightColor) { Asset tex = ModContent.Request(Texture); if (!Main.getGoodWorld) @@ -151,10 +151,8 @@ namespace CalamityMod.Projectiles.Magic } GameShaders.Misc["CalamityMod:PrimitiveTexture"].Shader.Parameters["uPrimitiveSize"].SetValue(tex.Width()); GameShaders.Misc["CalamityMod:PrimitiveTexture"].Shader.Parameters["flipVertically"].SetValue(true); - PrimitiveRenderer.RenderTrail(positions, new PrimitiveSettings(W => { return Width; }, C => { return Lighting.GetColor((positions[Math.Clamp((int)((float)C * (float)positions.Count), 0, positions.Count)] / 16).ToPoint()); }, O => { return Vector2.Zero; }, false, true, GameShaders.Misc["CalamityMod:PrimitiveTexture"]), 75); - } - public override bool PreDraw(ref Color lightColor) - { + PrimitiveRenderer.RenderTrail(positions, new PrimitiveSettings(W => { return Width; }, C => { return Lighting.GetColor((positions[Math.Clamp((int)((float)C * (float)positions.Count), 0, positions.Count)] / 16).ToPoint()); }, O => { return Vector2.Zero; }, true, false, GameShaders.Misc["CalamityMod:PrimitiveTexture"]), 75); + return false; } } diff --git a/Projectiles/Melee/WindBladeHoldout.cs b/Projectiles/Melee/WindBladeHoldout.cs index 21bface4d6..9d219cb70d 100644 --- a/Projectiles/Melee/WindBladeHoldout.cs +++ b/Projectiles/Melee/WindBladeHoldout.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Melee } if ((int)AnimationProgress > (int)(Owner.itemAnimationMax / 1.5f)) { - GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(Owner.Center + (new Vector2(Main.rand.Next(30, 100), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)), Color.LightSkyBlue, 40, 1f, 0.4f, MathHelper.ToRadians(Main.rand.NextFloat(-10f, 10f)), true)); + GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(Owner.Center + (new Vector2(Main.rand.Next(30, 100), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)), Color.LightSkyBlue, 40, 1f, 0.4f, MathHelper.ToRadians(Main.rand.NextFloat(-10f, 10f)), true, affectedByLight: true)); } float time = (AnimationProgress) - (Owner.itemAnimationMax / 3); @@ -108,8 +108,8 @@ namespace CalamityMod.Projectiles.Melee float bb = Main.rand.NextFloat(-50, 50); - GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(Owner.Center + new Vector2(105 * Projectile.scale, 0).RotatedBy(rot), new Vector2(5, 0).RotatedBy(rot + MathHelper.ToRadians(Main.rand.NextFloat(-20, 20))), Color.LightSkyBlue, 10, 2f, 0.3f, MathHelper.ToRadians(Main.rand.NextFloat(-10f, 10f)), true)); - GeneralParticleHandler.SpawnParticle(new SparkParticle(Owner.Center + new Vector2(0, bb).RotatedBy(rot) + new Vector2(45 * Projectile.scale, 0).RotatedBy(rot), new Vector2(5, 0).RotatedBy(rot), false, 10, 1 - (Math.Abs(bb) / 50), Color.LightSkyBlue, true)); + GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(Owner.Center + new Vector2(105 * Projectile.scale, 0).RotatedBy(rot), new Vector2(5, 0).RotatedBy(rot + MathHelper.ToRadians(Main.rand.NextFloat(-20, 20))), Color.LightSkyBlue, 10, 2f, 0.3f, MathHelper.ToRadians(Main.rand.NextFloat(-10f, 10f)), true, affectedByLight: true)); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Owner.Center + new Vector2(0, bb).RotatedBy(rot) + new Vector2(45 * Projectile.scale, 0).RotatedBy(rot), new Vector2(5, 0).RotatedBy(rot), false, 10, 1 - (Math.Abs(bb) / 50), Color.LightSkyBlue, true, affectedByLight: true)); } else { diff --git a/Projectiles/Ranged/GildedGathererHarpoon.cs b/Projectiles/Ranged/GildedGathererHarpoon.cs index 8caadcc9ae..166ff8f492 100644 --- a/Projectiles/Ranged/GildedGathererHarpoon.cs +++ b/Projectiles/Ranged/GildedGathererHarpoon.cs @@ -12,6 +12,7 @@ using CalamityMod.Projectiles.Typeless; using CalamityMod.Sounds; using CalamityMod.World; using FullSerializer.Internal; +using Microsoft.CodeAnalysis.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -26,7 +27,7 @@ namespace CalamityMod.Projectiles.Ranged { public class GildedGathererHarpoon : BaseCustomUseStyleProjectile, ILocalizedModType, IPixelatedPrimitiveRenderer { - List positions = new List(); + List LinePositions = new List(); public override Vector2 HitboxSize => new Vector2(16, 16); public NPC npcToTarget = null; public Vector2 latchOffset; @@ -101,7 +102,7 @@ namespace CalamityMod.Projectiles.Ranged { for (int i = 0; i < 10; i++) { - GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center + (oldVelocity * 2), new Vector2(Main.rand.NextFloat(10), 0).RotatedBy(Projectile.rotation + MathHelper.ToRadians(Main.rand.NextFloat(-20, 20)) + MathHelper.ToRadians(180)), false, 12, Main.rand.NextFloat(0.5f, 1f), Main.rand.NextBool(4) ? Color.White : Color.LightSteelBlue, true)); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center + (oldVelocity * 2), new Vector2(Main.rand.NextFloat(10), 0).RotatedBy(Projectile.rotation + MathHelper.ToRadians(Main.rand.NextFloat(-20, 20)) + MathHelper.ToRadians(180)), false, 12, Main.rand.NextFloat(0.5f, 1f), Main.rand.NextBool(4) ? Color.White : Color.LightSteelBlue, true, true)); } Player player = Main.player[Projectile.owner]; @@ -171,16 +172,16 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 6; i++) { GeneralParticleHandler.SpawnParticle( - new HeavySmokeParticle(player.Center, player.DirectionTo(mousePos).RotatedBy(Main.rand.NextFloat(-0.1f, 0.1f)) * Main.rand.NextFloat(7, 15), Color.LightSkyBlue, 50, Main.rand.NextFloat(0.4f, 1f), 1f, Main.rand.NextFloat(-0.01f, 0.01f)) + new HeavySmokeParticle(player.Center, player.DirectionTo(mousePos).RotatedBy(Main.rand.NextFloat(-0.1f, 0.1f)) * Main.rand.NextFloat(7, 15), Color.LightSkyBlue, 50, Main.rand.NextFloat(0.4f, 1f), 1f, Main.rand.NextFloat(-0.01f, 0.01f), affectedByLight: true) ); } for (int i = 0; i < 3; i++) { GeneralParticleHandler.SpawnParticle( - new SparkParticle(player.Center, player.DirectionTo(mousePos).RotatedBy(Main.rand.NextFloat(-0.1f, 0.1f) + MathHelper.ToRadians(90f)) * Main.rand.NextFloat(10, 20), false, 10, 1f, Color.LightSkyBlue) + new SparkParticle(player.Center, player.DirectionTo(mousePos).RotatedBy(Main.rand.NextFloat(-0.1f, 0.1f) + MathHelper.ToRadians(90f)) * Main.rand.NextFloat(10, 20), false, 10, 1f, Color.LightSkyBlue, affectedByLight: true) ); GeneralParticleHandler.SpawnParticle( - new SparkParticle(player.Center, player.DirectionTo(mousePos).RotatedBy(Main.rand.NextFloat(-0.1f, 0.1f) + MathHelper.ToRadians(-90f)) * Main.rand.NextFloat(10, 20), false, 10, 1f, Color.LightSkyBlue) + new SparkParticle(player.Center, player.DirectionTo(mousePos).RotatedBy(Main.rand.NextFloat(-0.1f, 0.1f) + MathHelper.ToRadians(-90f)) * Main.rand.NextFloat(10, 20), false, 10, 1f, Color.LightSkyBlue, affectedByLight: true) ); } } @@ -192,11 +193,11 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 10; i++) { - GeneralParticleHandler.SpawnParticle(new SparkParticle(vec, new Vector2(Main.rand.NextFloat(15), 0).RotatedBy(Projectile.rotation + MathHelper.ToRadians(Main.rand.NextFloat(-20, 20))), false, 12, Main.rand.NextFloat(0.5f, 1f), Main.rand.NextBool(4) ? Color.White : Color.LightSteelBlue, true)); + GeneralParticleHandler.SpawnParticle(new SparkParticle(vec, new Vector2(Main.rand.NextFloat(15), 0).RotatedBy(Projectile.rotation + MathHelper.ToRadians(Main.rand.NextFloat(-20, 20))), false, 12, Main.rand.NextFloat(0.5f, 1f), Main.rand.NextBool(4) ? Color.White : Color.LightSteelBlue, true, true)); } for (int i = 0; i < 10; i++) { - GeneralParticleHandler.SpawnParticle(new SmallSmokeParticle(vec, new Vector2(Main.rand.NextFloat(5, 20), 0).RotatedBy(Projectile.rotation + MathHelper.ToRadians(Main.rand.NextFloat(-5, 5))), Color.CornflowerBlue, new Color(100, 100, 170), Main.rand.NextFloat(0.5f, 1f), 150f)); + GeneralParticleHandler.SpawnParticle(new SmallSmokeParticle(vec, new Vector2(Main.rand.NextFloat(5, 20), 0).RotatedBy(Projectile.rotation + MathHelper.ToRadians(Main.rand.NextFloat(-5, 5))), Color.White, Color.LightSkyBlue, Main.rand.NextFloat(0.5f, 1f), 150f, affectedByLight: true)); } SoundEngine.PlaySound(SoundID.Item99.WithPitchOffset(-0.5f), Projectile.Center); Projectile.ai[1] = 1; @@ -207,7 +208,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 25; i++) { - positions.Add(Projectile.Center); + LinePositions.Add(Projectile.Center); } } } @@ -234,19 +235,19 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 23; i++) { - GeneralParticleHandler.SpawnParticle(new SmallSmokeParticle(Projectile.Center + new Vector2(7, 0).RotatedBy(Projectile.rotation), new Vector2(i, 0).RotatedBy(Projectile.rotation), Color.White, Color.LightBlue, 0.07f * i, 150f)); + GeneralParticleHandler.SpawnParticle(new SmallSmokeParticle(Projectile.Center + new Vector2(7, 0).RotatedBy(Projectile.rotation), new Vector2(i, 0).RotatedBy(Projectile.rotation), Color.White, Color.LightBlue, 0.07f * i, 150f, affectedByLight: true)); } for (int i = 0; i < 6; i++) { - GeneralParticleHandler.SpawnParticle(new SmallSmokeParticle(Projectile.Center + new Vector2(7, 0).RotatedBy(Projectile.rotation), new Vector2(Main.rand.NextFloat(8), 0).RotatedBy(Projectile.rotation + MathHelper.ToRadians(Main.rand.NextFloat(-20f, 20f))), Color.White, Color.LightBlue, Main.rand.NextFloat(1f, 1.5f), 150f)); + GeneralParticleHandler.SpawnParticle(new SmallSmokeParticle(Projectile.Center + new Vector2(7, 0).RotatedBy(Projectile.rotation), new Vector2(Main.rand.NextFloat(8), 0).RotatedBy(Projectile.rotation + MathHelper.ToRadians(Main.rand.NextFloat(-20f, 20f))), Color.White, Color.LightBlue, Main.rand.NextFloat(1f, 1.5f), 150f, affectedByLight: true)); } for (int i = 0; i < 3; i++) { GeneralParticleHandler.SpawnParticle( - new SparkParticle(Projectile.Center, player.DirectionTo(mousePos).RotatedBy(Main.rand.NextFloat(-0.1f, 0.1f) + MathHelper.ToRadians(90f)) * Main.rand.NextFloat(10, 20), false, 10, 1f, Color.LightSkyBlue) + new SparkParticle(Projectile.Center, player.DirectionTo(mousePos).RotatedBy(Main.rand.NextFloat(-0.1f, 0.1f) + MathHelper.ToRadians(90f)) * Main.rand.NextFloat(10, 20), false, 10, 1f, Color.LightSkyBlue, affectedByLight: true) ); GeneralParticleHandler.SpawnParticle( - new SparkParticle(Projectile.Center, player.DirectionTo(mousePos).RotatedBy(Main.rand.NextFloat(-0.1f, 0.1f) + MathHelper.ToRadians(-90f)) * Main.rand.NextFloat(10, 20), false, 10, 1f, Color.LightSkyBlue) + new SparkParticle(Projectile.Center, player.DirectionTo(mousePos).RotatedBy(Main.rand.NextFloat(-0.1f, 0.1f) + MathHelper.ToRadians(-90f)) * Main.rand.NextFloat(10, 20), false, 10, 1f, Color.LightSkyBlue, affectedByLight: true) ); } } @@ -335,7 +336,7 @@ namespace CalamityMod.Projectiles.Ranged } case 3: { - GeneralParticleHandler.SpawnParticle(new SparkParticle(player.Center - (player.velocity) + new Vector2(Main.rand.NextFloat(5, 25), 0).RotatedByRandom(MathHelper.TwoPi), player.velocity, false, 8, Main.rand.NextFloat(0.2f, 1.2f), Color.White, true)); + GeneralParticleHandler.SpawnParticle(new SparkParticle(player.Center - (player.velocity) + new Vector2(Main.rand.NextFloat(5, 25), 0).RotatedByRandom(MathHelper.TwoPi), player.velocity, false, 8, Main.rand.NextFloat(0.2f, 1.2f), Color.White, true, true)); Vector2 v2 = mousePos - player.Center; @@ -352,13 +353,13 @@ namespace CalamityMod.Projectiles.Ranged } } - for (float i = 0; i < positions.Count; i++) + for (float i = 0; i < LinePositions.Count; i++) { - positions[(int)i] = Vector2.Lerp(positions[(int)i], Vector2.Lerp(AbsolutePosition + new Vector2(0, 6), player.Center + ArmOffset(), (i / (float)positions.Count)), - MathHelper.Clamp(CalamityUtils.CircInEasing(i / (float)positions.Count, 1), 0f, 1f) + LinePositions[(int)i] = Vector2.Lerp(LinePositions[(int)i], Vector2.Lerp(AbsolutePosition + new Vector2(0, 6), player.Center + ArmOffset(), (i / (float)LinePositions.Count)), + MathHelper.Clamp(CalamityUtils.CircInEasing(i / (float)LinePositions.Count, 1), 0f, 1f) ); - positions[(int)i] = Vector2.Lerp(positions[(int)i], Vector2.Lerp(AbsolutePosition + new Vector2(0, 6), player.Center + ArmOffset(), (i / (float)positions.Count)), - MathHelper.Lerp(1f,0f,CalamityUtils.CircOutEasing(i / (float)positions.Count, 1)) + LinePositions[(int)i] = Vector2.Lerp(LinePositions[(int)i], Vector2.Lerp(AbsolutePosition + new Vector2(0, 6), player.Center + ArmOffset(), (i / (float)LinePositions.Count)), + MathHelper.Lerp(1f,0f,CalamityUtils.CircOutEasing(i / (float)LinePositions.Count, 1)) ); } diff --git a/Projectiles/Rogue/TurbulanceWindSlash.cs b/Projectiles/Rogue/TurbulanceWindSlash.cs index bbac447508..52b65e3079 100644 --- a/Projectiles/Rogue/TurbulanceWindSlash.cs +++ b/Projectiles/Rogue/TurbulanceWindSlash.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.frameCounter == 0) { GeneralParticleHandler.SpawnParticle(new SmallSmokeParticle( - Projectile.Center, new Vector2(2, 0).RotatedBy(Main.rand.NextFloat(MathHelper.TwoPi)), Color.White, Color.LightSkyBlue, (1f + Main.rand.NextFloat(0.3f)) * Projectile.scale, 50f)); + Projectile.Center, new Vector2(2, 0).RotatedBy(Main.rand.NextFloat(MathHelper.TwoPi)), Color.White, Color.LightSkyBlue, (1f + Main.rand.NextFloat(0.3f)) * Projectile.scale, 50f, affectedByLight: true)); } Projectile.ai[1]++; if (Projectile.ai[1] > 40)