From efe21ddfbfb5bc24d9408aa610de2d9b7b4497e7 Mon Sep 17 00:00:00 2001 From: Xyk Date: Thu, 14 Nov 2024 12:05:23 -0800 Subject: [PATCH] Aetherflux Glowup and Nano Purge Tierswap Plasma Rifle and Nano Purge swap Places Aetherflux cannon gets some new visuals and balancing --- Items/Weapons/Magic/AetherfluxCannon.cs | 4 +- Items/Weapons/Magic/NanoPurge.cs | 10 +-- Items/Weapons/Magic/PlasmaRifle.cs | 8 +-- Particles/CustomSpark.cs | 8 ++- Projectiles/Magic/AetherfluxCannonHoldout.cs | 32 +++++++-- Projectiles/Magic/NanoPurgeHoldout.cs | 13 +++- Projectiles/Magic/NanoPurgeLaser.cs | 50 ++++++++++--- Projectiles/Magic/PhasedGodRay.cs | 76 ++++++++++++++++---- 8 files changed, 158 insertions(+), 43 deletions(-) diff --git a/Items/Weapons/Magic/AetherfluxCannon.cs b/Items/Weapons/Magic/AetherfluxCannon.cs index 40c3dc415e..d5a580ca68 100644 --- a/Items/Weapons/Magic/AetherfluxCannon.cs +++ b/Items/Weapons/Magic/AetherfluxCannon.cs @@ -15,12 +15,14 @@ namespace CalamityMod.Items.Weapons.Magic { public new string LocalizationCategory => "Items.Weapons.Magic"; public const int UseTime = 36; + public static Color mainColor = Color.Goldenrod; + public static Color accentColor = Color.LightGreen; public override void SetDefaults() { Item.width = 94; Item.height = 54; - Item.damage = 285; + Item.damage = 355; Item.DamageType = DamageClass.Magic; Item.mana = 7; Item.useAnimation = Item.useTime = UseTime; diff --git a/Items/Weapons/Magic/NanoPurge.cs b/Items/Weapons/Magic/NanoPurge.cs index f09ce91f00..30940fbbf0 100644 --- a/Items/Weapons/Magic/NanoPurge.cs +++ b/Items/Weapons/Magic/NanoPurge.cs @@ -4,6 +4,8 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Items.Materials; +using CalamityMod.Rarities; namespace CalamityMod.Items.Weapons.Magic { @@ -18,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 62; Item.height = 34; - Item.damage = 60; + Item.damage = 135; Item.DamageType = DamageClass.Magic; Item.mana = 8; Item.useAnimation = Item.useTime = UseTime; @@ -27,8 +29,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.noUseGraphic = true; Item.channel = true; Item.knockBack = 3f; - Item.rare = ItemRarityID.Red; - Item.value = CalamityGlobalItem.RarityRedBuyPrice; + Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; + Item.rare = ModContent.RarityType(); Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; @@ -49,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.LaserMachinegun). - AddIngredient(ItemID.FragmentVortex, 6). + AddIngredient(7). AddIngredient(ItemID.Nanites, 100). AddTile(TileID.LunarCraftingStation). Register(); diff --git a/Items/Weapons/Magic/PlasmaRifle.cs b/Items/Weapons/Magic/PlasmaRifle.cs index a7bb31498f..4cf11901f2 100644 --- a/Items/Weapons/Magic/PlasmaRifle.cs +++ b/Items/Weapons/Magic/PlasmaRifle.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 72; Item.height = 20; - Item.damage = 360; + Item.damage = 160; Item.DamageType = DamageClass.Magic; Item.mana = 40; Item.useAnimation = Item.useTime = 40; @@ -39,8 +39,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.autoReuse = true; Item.noMelee = true; - Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityRedBuyPrice; } public override Vector2? HoldoutOffset() => new Vector2(-10, 0); @@ -78,7 +78,7 @@ namespace CalamityMod.Items.Weapons.Magic CreateRecipe(). AddIngredient(ItemID.ToxicFlask). AddIngredient(ItemID.LaserRifle). - AddIngredient(7). + AddIngredient(ItemID.FragmentVortex, 6). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Particles/CustomSpark.cs b/Particles/CustomSpark.cs index 6c219f7485..e6cb8dfbbb 100644 --- a/Particles/CustomSpark.cs +++ b/Particles/CustomSpark.cs @@ -13,6 +13,8 @@ namespace CalamityMod.Particles public bool FadeIn = false; public float FadeInScale = 0f; public bool GlowCenter = false; + public float GlowCenterScale = 1; + public float GlowOpacity = 1; public string NewTexture; public float ExtraRotation; public Vector2 Stretch = new Vector2(0.5f, 1.6f); @@ -23,7 +25,7 @@ namespace CalamityMod.Particles public override bool SetLifetime => true; public override bool UseCustomDraw => true; - public CustomSpark(Vector2 relativePosition, Vector2 velocity, string texture, bool affectedByGravity, int lifetime, float scale, Color color, Vector2 stretch, bool useAddativeBlend = true, bool glowCenter = false, float extraRotation = 0, bool fadeIn = false, bool affectedByLight = false, float shrinkSpeed = 0) + public CustomSpark(Vector2 relativePosition, Vector2 velocity, string texture, bool affectedByGravity, int lifetime, float scale, Color color, Vector2 stretch, bool useAddativeBlend = true, bool glowCenter = false, float extraRotation = 0, bool fadeIn = false, bool affectedByLight = false, float shrinkSpeed = 0, float glowCenterScale = 1, float glowOpacity = 1) { Position = relativePosition; Velocity = velocity; @@ -40,6 +42,8 @@ namespace CalamityMod.Particles AltVisual = useAddativeBlend; GlowCenter = glowCenter; + GlowCenterScale = glowCenterScale; + GlowOpacity = glowOpacity; FadeIn = fadeIn; @@ -91,7 +95,7 @@ namespace CalamityMod.Particles spriteBatch.Draw(texture, Position - Main.screenPosition, null, col, Rotation, texture.Size() * 0.5f, scale, 0, 0f); if (GlowCenter) - spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Lerp(col, Color.White, 0.8f), Rotation, texture.Size() * 0.5f, scale * 0.8f, 0, 0f); + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Lerp(col, Color.White, 0.8f) * GlowOpacity, Rotation, texture.Size() * 0.5f, scale * 0.8f * GlowCenterScale, 0, 0f); } } } diff --git a/Projectiles/Magic/AetherfluxCannonHoldout.cs b/Projectiles/Magic/AetherfluxCannonHoldout.cs index 4e5aa5931a..ae0e2654ae 100644 --- a/Projectiles/Magic/AetherfluxCannonHoldout.cs +++ b/Projectiles/Magic/AetherfluxCannonHoldout.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Dusts; +using CalamityMod.Items.Weapons.Magic; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -7,6 +8,7 @@ using Terraria.Audio; using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; +using static CalamityMod.Systems.LavaRenderingSystem; namespace CalamityMod.Projectiles.Magic { @@ -26,6 +28,8 @@ namespace CalamityMod.Projectiles.Magic private ref float LastShootAttemptTime => ref Projectile.localAI[0]; private ref float LastAnimationTime => ref Projectile.localAI[1]; + public float postShotFade = 0; + public override void SetStaticDefaults() => Main.projFrames[Type] = 8; public override void KillHoldoutLogic() @@ -74,7 +78,12 @@ namespace CalamityMod.Projectiles.Magic if (manaOK) { if (actuallyShoot) - SoundEngine.PlaySound(SoundID.Item91, Projectile.Center); + { + postShotFade = 1; + SoundStyle fire = new("CalamityMod/Sounds/Item/MagnaCannonShot"); + SoundEngine.PlaySound(fire with { Volume = 0.4f, Pitch = Main.rand.NextFloat(0.1f, 0.3f) }, Projectile.Center); + } + int projID = ModContent.ProjectileType(); float shootSpeed = HeldItem.shootSpeed; @@ -99,11 +108,12 @@ namespace CalamityMod.Projectiles.Magic } } } + postShotFade *= 0.86f; } private void SpawnFiringDust(Vector2 GunTipPosition, Vector2 laserVelocity) { - int dustID = 133; + int dustID = ModContent.DustType(); int dustRadius = 12; float dustRandomness = 11f; int dustDiameter = 2 * dustRadius; @@ -115,18 +125,30 @@ namespace CalamityMod.Projectiles.Magic d.velocity *= 0.18f; d.noGravity = true; d.scale = 0.6f; + d.color = Color.Lerp(AetherfluxCannon.accentColor, AetherfluxCannon.mainColor, Main.rand.NextFloat()); } } public override bool PreDraw(ref Color lightColor) { Texture2D texture = TextureAssets.Projectile[Type].Value; - Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Vector2 vel = Projectile.velocity * 10; + Vector2 drawPosition = (Projectile.Center - Main.screenPosition + vel) + vel * (1 - postShotFade); Rectangle frame = texture.Frame(verticalFrames: Main.projFrames[Type], frameY: Projectile.frame); float drawRotation = Projectile.rotation + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f) + MathHelper.PiOver2; Vector2 rotationPoint = frame.Size() * 0.5f; SpriteEffects flipSprite = (Projectile.spriteDirection * Owner.gravDir == -1) ? SpriteEffects.FlipVertically : SpriteEffects.None; - + Texture2D glowTexture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + for (int i = 0; i < 5; i++) + { + float glowScale = 0.3f; + Main.EntitySpriteDraw(glowTexture, drawPosition + vel * 1.7f, null, Color.Lerp(AetherfluxCannon.accentColor, AetherfluxCannon.mainColor, postShotFade) with { A = 0 }, vel.ToRotation(), glowTexture.Size() * 0.5f, new Vector2(1.4f, 0.75f) * (glowScale - i * 0.05f) * postShotFade * 2.5f, SpriteEffects.None, 0); + } + for (int i = 0; i < 15; i++) + { + Vector2 drawOffset = (MathHelper.TwoPi * i / 15f).ToRotationVector2() * 6.5f * postShotFade; + Main.EntitySpriteDraw(texture, drawPosition + drawOffset, frame, Color.Lerp(AetherfluxCannon.accentColor, AetherfluxCannon.mainColor, postShotFade) with { A = 0 }, drawRotation, rotationPoint, Projectile.scale * Owner.gravDir, flipSprite); + } Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), drawRotation, rotationPoint, Projectile.scale * Owner.gravDir, flipSprite); return false; diff --git a/Projectiles/Magic/NanoPurgeHoldout.cs b/Projectiles/Magic/NanoPurgeHoldout.cs index 2437fb60be..6e580453fd 100644 --- a/Projectiles/Magic/NanoPurgeHoldout.cs +++ b/Projectiles/Magic/NanoPurgeHoldout.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.Dusts; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; @@ -31,6 +32,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() => Main.projFrames[Type] = 4; + public float postShotFade = 0; + public override void KillHoldoutLogic() { base.KillHoldoutLogic(); @@ -68,6 +71,7 @@ namespace CalamityMod.Projectiles.Magic bool manaCostPaid = Owner.CheckMana(Owner.ActiveItem(), -1, true, false); if (manaCostPaid) { + postShotFade = 1; SoundEngine.PlaySound(SoundID.Item91, Projectile.Center); int projID = ModContent.ProjectileType(); @@ -89,11 +93,12 @@ namespace CalamityMod.Projectiles.Magic } ExtraBackArmRotation = Utils.Remap(Vector2.Dot(-Vector2.UnitY, Projectile.velocity.SafeNormalize(-Vector2.UnitY)), 0f, 1f, MathHelper.PiOver4, 0f); + postShotFade *= 0.86f; } private void SpawnFiringDust(Vector2 GunTipPosition, Vector2 laserVelocity) { - int dustID = 107; + int dustID = ModContent.DustType(); int dustRadius = 5; int dustDiameter = 2 * dustRadius; Vector2 dustCorner = GunTipPosition - Vector2.One * dustRadius; @@ -103,7 +108,8 @@ namespace CalamityMod.Projectiles.Magic Dust d = Dust.NewDustDirect(dustCorner, dustDiameter, dustDiameter, dustID, dustVel.X, dustVel.Y); d.velocity *= 0.125f; d.noGravity = true; - d.scale = 1.4f; + d.scale = 0.9f; + d.color = Color.Lime; } } @@ -116,7 +122,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { Texture2D texture = TextureAssets.Projectile[Type].Value; - Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Vector2 vel = Projectile.velocity * 10; + Vector2 drawPosition = (Projectile.Center - Main.screenPosition) - vel * postShotFade; Rectangle frame = texture.Frame(verticalFrames: Main.projFrames[Type], frameY: Projectile.frame); float drawRotation = Projectile.rotation + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f) + MathHelper.PiOver2; Vector2 rotationPoint = frame.Size() * 0.5f; diff --git a/Projectiles/Magic/NanoPurgeLaser.cs b/Projectiles/Magic/NanoPurgeLaser.cs index d72a813d26..534cb7c1b9 100644 --- a/Projectiles/Magic/NanoPurgeLaser.cs +++ b/Projectiles/Magic/NanoPurgeLaser.cs @@ -1,4 +1,6 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Dusts; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -10,6 +12,7 @@ namespace CalamityMod.Projectiles.Magic private const float LaserLength = 40f; private const float LaserLengthChangeRate = 1.5f; public bool HasBounced = false; + public int bounceTimer = 0; public override string Texture => "CalamityMod/Projectiles/LaserProj"; @@ -54,10 +57,33 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.localAI[0] <= 0f) Projectile.Kill(); } + + if (Projectile.timeLeft % 2 == 0) + { + Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/GlowSpark", false, 4, 0.02f, Color.Lime, new Vector2(0.6f, 1.4f), true, false, shrinkSpeed: 0.95f); + GeneralParticleHandler.SpawnParticle(spark2); + } + if (bounceTimer > 0) + bounceTimer--; } public override bool OnTileCollide(Vector2 oldVelocity) { + bounceTimer = 10; + for (int i = 0; i < 2; i++) + { + Color color = i == 0 ? Color.White : Color.Lime; + Particle orb2 = new CustomSpark(Projectile.Center, oldVelocity * 0.1f, "CalamityMod/Particles/BloomCircle", false, 15, Main.rand.NextFloat(0.15f, 0.25f) * (i == 0 ? 2 : 3), color, new Vector2(0.7f, 1.1f), true, false); + GeneralParticleHandler.SpawnParticle(orb2); + } + for (int i = 0; i < 5; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.8f, 2.5f)); + dust.noGravity = false; + dust.scale = Main.rand.NextFloat(0.45f, 1.1f); + dust.color = Color.Lime; + dust.noLightEmittence = true; + } if (!HasBounced) { HasBounced = true; @@ -103,18 +129,24 @@ namespace CalamityMod.Projectiles.Magic public override Color? GetAlpha(Color lightColor) => new Color(96, 255, 96, 0); - public override bool PreDraw(ref Color lightColor) => Projectile.DrawBeam(LaserLength, 2f, lightColor); + public override bool PreDraw(ref Color lightColor) + { + if (bounceTimer == 0) + Projectile.DrawBeam(LaserLength, 2f, lightColor); + return false; + } public override void OnKill(int timeLeft) { - int dustID = 107; - int dustAmt = Main.rand.Next(3, 7); - Vector2 dustPos = Projectile.Center - Projectile.velocity / 2f; - for (int i = 0; i < dustAmt; ++i) + Particle spark2 = new CustomSpark(Projectile.Center, Projectile.velocity * 0.3f, "CalamityMod/Particles/GlowSpark", false, 14, 0.018f, Color.Lime, new Vector2(1f, 1f), true, false, shrinkSpeed: 0.65f); + GeneralParticleHandler.SpawnParticle(spark2); + for (int i = 0; i < 3; i++) { - Dust d = Dust.NewDustDirect(dustPos, 0, 0, dustID, 0f, 0f, Scale: 0.8f); - d.velocity *= 1.15f; - d.noGravity = true; + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.4f, 0.9f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.45f, 1.1f); + dust.color = Color.Lime; + dust.noLightEmittence = true; } } } diff --git a/Projectiles/Magic/PhasedGodRay.cs b/Projectiles/Magic/PhasedGodRay.cs index 06e3528bdc..a175116a5a 100644 --- a/Projectiles/Magic/PhasedGodRay.cs +++ b/Projectiles/Magic/PhasedGodRay.cs @@ -1,7 +1,11 @@ using System; using CalamityMod.Buffs.DamageOverTime; +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; @@ -29,13 +33,13 @@ namespace CalamityMod.Projectiles.Magic public override void SetDefaults() { - Projectile.width = 5; - Projectile.height = 5; + Projectile.width = 20; + Projectile.height = 20; Projectile.friendly = true; Projectile.alpha = 255; - Projectile.penetrate = 2; + Projectile.penetrate = 3; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 12; + Projectile.localNPCHitCooldown = -1; Projectile.MaxUpdates = 3; Projectile.timeLeft = 280; Projectile.DamageType = DamageClass.Magic; @@ -99,28 +103,70 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.localAI[0] <= 0f) Projectile.Kill(); } + + float fadeInLerp = Utils.GetLerpValue(280, 265, Projectile.timeLeft, true); + Color beamColor = Color.Lerp(AetherfluxCannon.accentColor, AetherfluxCannon.mainColor, fadeInLerp); + Color subColor = Color.Lerp(AetherfluxCannon.accentColor, AetherfluxCannon.mainColor, Main.rand.NextFloat()); + + Particle beamBody = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/BloomCircle", false, 7, 0.65f - 0.3f * fadeInLerp, beamColor * 0.8f, new Vector2(1.1f - 0.4f * fadeInLerp, 0.8f + 0.6f * fadeInLerp), true, false, shrinkSpeed: 0.6f); + GeneralParticleHandler.SpawnParticle(beamBody); + + Particle beamCore = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/BloomCircle", false, 5, 0.35f - 0.15f * fadeInLerp, Color.Lerp(beamColor, Color.White, 0.6f), new Vector2(0.7f, 1.4f), true, false, shrinkSpeed: 0.6f); + GeneralParticleHandler.SpawnParticle(beamCore); + + if (Projectile.timeLeft == 280) + { + for (int i = 0; i < 3; i++) + { + subColor = Color.Lerp(AetherfluxCannon.accentColor, AetherfluxCannon.mainColor, Main.rand.NextFloat()); + Particle spark = new CustomSpark(Projectile.Center - Projectile.velocity * 2, (Projectile.velocity).RotatedByRandom(0.8f) * Main.rand.NextFloat(0.5f, 0.7f), "CalamityMod/Particles/SemiCircularSmearVerticalBlank", false, 10, 0.45f, subColor, new Vector2(0.8f, 1.2f), true, false, shrinkSpeed: 0.5f); + GeneralParticleHandler.SpawnParticle(spark); + + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType()); + dust2.scale = Main.rand.NextFloat(0.6f, 1.4f); + dust2.noGravity = true; + dust2.velocity = (Projectile.velocity).RotatedByRandom(0.8f) * Main.rand.NextFloat(0.3f, 0.8f); + dust2.color = subColor; + } + } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 180); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(ModContent.BuffType(), 180); + for (int i = 0; i< 2; i++) + { + Color color = AetherfluxCannon.accentColor; + Particle orb2 = new CustomSpark(Projectile.Center, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 20, Main.rand.NextFloat(0.15f, 0.25f) * 3, color, new Vector2(1f, 1f), true, false); + GeneralParticleHandler.SpawnParticle(orb2); + } + Projectile.timeLeft = 280; + SoundStyle hitSound = new("CalamityMod/Sounds/Item/MeldShoot"); + SoundEngine.PlaySound(hitSound with { Volume = 0.4f, Pitch = Main.rand.NextFloat(0.5f, 0.65f) }, Projectile.Center); + if (Projectile.damage > 1) + Projectile.damage = (int)(Projectile.damage * 0.865f); + } public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 180); public override Color? GetAlpha(Color lightColor) => new Color(222, 166, 44, 0); - public override bool PreDraw(ref Color lightColor) => Projectile.DrawBeam(LaserLength, 2f, lightColor, curve: true); + public override bool PreDraw(ref Color lightColor) + { + //Projectile.DrawBeam(LaserLength, 2f, lightColor, curve: true); + return false; + } public override void OnKill(int timeLeft) { - int dustID = 269; - int dustAmt = 4; - Vector2 dustPos = Projectile.Center - Projectile.velocity / 2f; - Vector2 dustVel = Projectile.velocity / 4f; - for (int i = 0; i < dustAmt; ++i) + for (int i = 0; i < 4; i++) { - Dust d = Dust.NewDustDirect(dustPos, 0, 0, dustID, 0f, 0f, Scale: 2.5f); - d.velocity += dustVel; - d.velocity *= Main.rand.NextFloat(0.4f, 1f); - d.noGravity = true; + Color subColor = Color.Lerp(AetherfluxCannon.accentColor, AetherfluxCannon.mainColor, Main.rand.NextFloat()); + float rot = Main.rand.NextFloat(-0.1f, 0.1f); + Vector2 startVel = (Projectile.velocity * 0.1f).RotatedBy(rot); + Vector2 endVel = startVel.RotatedBy(rot * 5) * 20; + Particle orb2 = new VelChangingSpark(Projectile.Center, startVel, endVel, "CalamityMod/Particles/BloomCircle", Main.rand.Next(15, 20 + 1), Main.rand.NextFloat(0.015f, 0.025f) * 15, subColor, new Vector2(1.1f, 1f), true, false, lerpRate: 0.015f, shrinkSpeed: 0.4f); + GeneralParticleHandler.SpawnParticle(orb2); } } }