diff --git a/Balancing/BalancingConstants.cs b/Balancing/BalancingConstants.cs
index 590cc74fcd..4a0c2f914f 100644
--- a/Balancing/BalancingConstants.cs
+++ b/Balancing/BalancingConstants.cs
@@ -50,6 +50,7 @@
#region Dashes and Dodges
// Dash cooldowns (in frames)
internal const int UniversalDashCooldown = 30;
+ internal const int UniversalSashDashCooldown = 23;
internal const int UniversalShieldSlamCooldown = 30;
internal const int UniversalShieldBonkCooldown = 30;
internal const int OnShieldBonkCooldown = 30;
diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs
index 1924090a76..1b76fc43c8 100644
--- a/CalPlayer/CalamityPlayer.cs
+++ b/CalPlayer/CalamityPlayer.cs
@@ -785,6 +785,9 @@ namespace CalamityMod.CalPlayer
public bool eTalisman = false;
/// Counter variable used for spawning Statis' Void Sash's scythes when dashing.
public int statisTimer = 0;
+ public bool statisNinjaBelt = false;
+ public bool voidSashVisuals = true;
+ public bool statisVoidSash = false;
public bool nucleogenesis = false;
public bool nuclearFuelRod = false;
public bool nebulousCore = false;
@@ -804,6 +807,7 @@ namespace CalamityMod.CalPlayer
public bool rampartOfDeities = false;
public bool gShell = false;
public bool lAmbergris = false;
+ public bool lAmbergrisVisual = false;
public bool tortShell = false;
public bool absorber = false;
public bool alwaysHoneyRegen = false;
@@ -931,7 +935,8 @@ namespace CalamityMod.CalPlayer
public bool flameLickedShell = false;
public int flameLickedShellParry = 0;
public bool flameLickedShellEmpoweredParry = false;
- public bool Pauldron = false;
+ public bool sPauldron = false;
+ public bool sPauldronVisual = false;
public bool XykVisualsBlue = false;
public bool XykVisualsOrange = false;
public bool manaOverloader = false;
@@ -2195,6 +2200,8 @@ namespace CalamityMod.CalPlayer
eGauntlet = false;
eGauntletVisuals = true;
gloveLevel = 0;
+ statisNinjaBelt = false;
+ statisVoidSash = false;
alreadyHasFrogLeg = false;
eTalisman = false;
nucleogenesis = false;
@@ -2240,7 +2247,7 @@ namespace CalamityMod.CalPlayer
shieldOfTheOcean = false;
normalityRelocator = false;
flameLickedShell = false;
- Pauldron = false;
+ sPauldron = false;
XykVisualsBlue = false;
XykVisualsOrange = false;
manaOverloader = false;
@@ -4405,6 +4412,8 @@ namespace CalamityMod.CalPlayer
(getSandCloakAccelBoost ? 0.75f : 0f) +
(nimbleBounderBoost ? NimbleBounder.AccelerationBoost : 0f) +
(ascendantInsignia ? 0.25f : 0f ) + // Added to Soaring Insignia's 1.25x multiplier to get 1.5x
+ (statisNinjaBelt ? 0.6f : 0f) +
+ (statisVoidSash ? 0.85f : 0f) +
(blueCandle ? WeightlessCandle.AccelerationBoost : 0f) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
//(exaltedKillMode ? 7f : devilsDevastationKillMode ? 11f : 0) +
diff --git a/CalPlayer/CalamityPlayerDashEffects.cs b/CalPlayer/CalamityPlayerDashEffects.cs
index a2e591296b..426cf2c311 100644
--- a/CalPlayer/CalamityPlayerDashEffects.cs
+++ b/CalPlayer/CalamityPlayerDashEffects.cs
@@ -120,6 +120,8 @@ namespace CalamityMod.CalPlayer
dashDelayToApply = BalancingConstants.UniversalShieldBonkCooldown;
if (DashID == DeepDiverDash.ID)
dashDelayToApply = 23;
+ if (DashID == StatisNinjaBeltDash.ID || DashID == StatisVoidSashDash.ID || Player.dashType == 1)
+ dashDelayToApply = BalancingConstants.UniversalSashDashCooldown;
float dashSpeed = 12f;
float dashSpeedDecelerationFactor = 0.985f;
diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs
index 61765a47e5..a4a355e132 100644
--- a/CalPlayer/CalamityPlayerMiscEffects.cs
+++ b/CalPlayer/CalamityPlayerMiscEffects.cs
@@ -227,6 +227,17 @@ namespace CalamityMod.CalPlayer
Player.velocity.X *= 0.9f;
}
+ // Tabi/Master Ninja Gear dash change
+ if (Player.dashType == 1)
+ {
+ if (dashStart)
+ Player.velocity.X *= 3.5f;
+ if (Player.dashDelay == -1)
+ {
+ Player.velocity.X *= 0.9f;
+ }
+ }
+
if ((devilsDevastationKillMode || exaltedKillMode) && !Player.mount.Active)
{
float fxScale = 1;
@@ -296,49 +307,19 @@ namespace CalamityMod.CalPlayer
{
if (dashStart)
{
- Player.velocity.X *= 1.2f;
- int damage = (int)Player.GetBestClassDamage().ApplyTo(LeviathanAmbergris.ambergrisDashDamage);
-
- Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI);
+ Player.velocity.X *= 3f; // +200% dash speed
+ int damage = (int)Player.GetBestClassDamage().ApplyTo(LeviathanAmbergris.ambergrisDashDamage + 300);
+ Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI);
}
if (Player.miscCounter % 3 == 2 && Player.dashDelay > 0) // Reduced dash cooldown by 33%
Player.dashDelay--;
- if (Player.dashDelay == -1)// TODO: prevent working with special dashes, this was inconsitent with my old solution so I didn't keep it. not huge deal)
- {
- float numberOfDusts = 10f;
- float rotFactor = 180f / numberOfDusts;
- for (int i = 0; i < numberOfDusts; i++)
- {
- float rot = MathHelper.ToRadians(i * rotFactor);
- Vector2 offset = new Vector2(Player.velocity.X * dir * 0.7f + 6f, 0).RotatedBy(rot * Main.rand.NextFloat(4f, 5f));
- Vector2 velOffset = Vector2.Zero;
- Dust dust = Dust.NewDustPerfect(Player.Center + offset + Player.velocity, Main.rand.NextBool() ? 160 : 307, new Vector2(velOffset.X, velOffset.Y));
- dust.noGravity = true;
- dust.velocity = velOffset;
- dust.alpha = 100;
- dust.scale = (Player.velocity.X * dir * 0.08f);
- }
- if (Player.miscCounter % 4 == 0)
- {
- float sparkscale = (Player.velocity.X * dir * 0.07f);
- Vector2 SparkVelocity1 = Player.velocity.RotatedBy(dir * 2, default) * 0.1f - Player.velocity / 2f;
- LineParticle spark = new LineParticle(Player.Center + Player.velocity.RotatedBy(2f * dir) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue);
- GeneralParticleHandler.SpawnParticle(spark);
- Vector2 SparkVelocity2 = Player.velocity.RotatedBy(dir * -2, default) * 0.1f - Player.velocity / 2f;
- LineParticle spark2 = new LineParticle(Player.Center + Player.velocity.RotatedBy(-2f * dir) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue);
- GeneralParticleHandler.SpawnParticle(spark2);
- }
- if (Player.miscCounter % 4 == 0 && Player.velocity != Vector2.Zero) //every other frame spawn the hitbox
- {
- int damage = (int)Player.GetBestClassDamage().ApplyTo(LeviathanAmbergris.ambergrisDashDamage);
- Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI);
- }
- }
+ if (Player.dashDelay == -1)
+ Player.velocity.X *= 0.9f;
}
- if (Pauldron)
+ if (sPauldron)
{
if (dashStart)
{
@@ -346,37 +327,9 @@ namespace CalamityMod.CalPlayer
int damage = (int)Player.GetBestClassDamage().ApplyTo(SlagsplitterPauldron.PauldronSlamDamage);
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType(), damage, 0, Player.whoAmI);
}
- if (Player.dashDelay == -1)// TODO: prevent working with special dashes, this was inconsitent with my old solution so I didn't keep it. not huge deal)
- {
- int damage = (int)Player.GetBestClassDamage().ApplyTo(SlagsplitterPauldron.PauldronSlamDamage);
+ if (Player.dashDelay == -1)
Player.endurance += 0.1f;
-
- float numberOfDusts = 10f;
- float rotFactor = 180f / numberOfDusts;
- for (int i = 0; i < numberOfDusts; i++)
- {
- float rot = MathHelper.ToRadians(i * rotFactor);
- Vector2 offset = new Vector2(MathF.Min(Player.velocity.X * dir * 0.7f + 8f, 20f), 0).RotatedBy(rot * Main.rand.NextFloat(4f, 5f));
- Vector2 velOffset = Vector2.Zero;
- Dust dust = Dust.NewDustPerfect(Player.Center + offset + Player.velocity, Main.rand.NextBool() ? 35 : 127, new Vector2(velOffset.X, velOffset.Y));
- dust.noGravity = true;
- dust.velocity = velOffset;
- dust.alpha = 100;
- dust.scale = MathF.Min(Player.velocity.X * dir * 0.08f, 1.2f);
- }
- float sparkscale = MathF.Min(Player.velocity.X * dir * 0.08f, 1.2f);
- Vector2 SparkVelocity1 = Player.velocity.RotatedBy(dir * -3, default) * 0.1f - Player.velocity / 2f;
- SparkParticle spark = new SparkParticle(Player.Center + Player.velocity.RotatedBy(2f * dir) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed);
- GeneralParticleHandler.SpawnParticle(spark);
- Vector2 SparkVelocity2 = Player.velocity.RotatedBy(dir * 3, default) * 0.1f - Player.velocity / 2f;
- SparkParticle spark2 = new SparkParticle(Player.Center + Player.velocity.RotatedBy(-2f * dir) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed);
- GeneralParticleHandler.SpawnParticle(spark2);
-
- if (Player.miscCounter % 6 == 0 && Player.velocity != Vector2.Zero)
- {
- Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType(), SlagsplitterPauldron.PauldronSlamDamage, 0, Player.whoAmI);
- }
- }
+
}
if (XykVisualsBlue || XykVisualsOrange)
diff --git a/CalPlayer/Dashes/StatisNinjaBeltDash.cs b/CalPlayer/Dashes/StatisNinjaBeltDash.cs
index a0253e7f77..ee1a612583 100644
--- a/CalPlayer/Dashes/StatisNinjaBeltDash.cs
+++ b/CalPlayer/Dashes/StatisNinjaBeltDash.cs
@@ -1,8 +1,10 @@
-using CalamityMod.Enums;
+using CalamityMod.Dusts;
+using CalamityMod.Enums;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
+using Terraria.ModLoader;
namespace CalamityMod.CalPlayer.Dashes
{
@@ -13,45 +15,45 @@ namespace CalamityMod.CalPlayer.Dashes
public override bool IsOmnidirectional => false;
public int Time = 0;
- public override float CalculateDashSpeed(Player player) => 20f;
+ public override float CalculateDashSpeed(Player player) => (50f * player.moveSpeed);
public override void OnDashEffects(Player player)
{
Time = 0;
- for (int i = 0; i < 12; i++)
+ for (int i = 0; i < 15; i++)
{
- Vector2 smokePos = player.Center + new Vector2(Main.rand.Next(-player.width, player.width), Main.rand.Next(-player.height, player.height)) * 0.8f;
- Vector2 smokeVel = Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(1.25f, 1.75f);
- HeavySmokeParticle onDashSmoke = new(smokePos, smokeVel, Color.Gray, 30, 0.5f, 0.75f, 0.2f * Main.rand.NextFloatDirection());
- GeneralParticleHandler.SpawnParticle(onDashSmoke);
+ Vector2 intenededVel = (MathHelper.TwoPi * i / 15f).ToRotationVector2() * 1.5f;
+ Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
+ Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
+
+ Color dustColor = Main.rand.NextBool() ? Color.Purple : Color.DarkSlateBlue;
+
+ int dustStyle = ModContent.DustType();
+ Dust dust2 = Dust.NewDustPerfect(fxPlace, dustStyle, (fxVel - player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(4, 5)) * Main.rand.NextFloat(1.2f, 1.5f));
+ dust2.scale = Main.rand.NextFloat(1.6f, 2.3f) * 1.8f;
+ dust2.color = dustColor;
+ dust2.noGravity = true;
+ dust2.fadeIn = 1.5f;
}
}
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
{
Time++;
- if (Time % 3 == 0)
+ for (int i = 0; i < 2; i++)
{
- int colorType = Main.rand.Next(3);
- Color smokeColor = Color.White;
- switch (colorType)
- {
- case 0:
- smokeColor = Color.Gray;
- break;
- case 1:
- smokeColor = new Color(28, 75, 163);
- break;
- case 2:
- smokeColor = new Color(195, 0, 255);
- break;
- }
-
- Vector2 smokePos = player.Center - (player.velocity * 1.25f) + Main.rand.NextVector2Circular(10, 20);
- float smokeScale = player.velocity.X * 0.045f;
- HeavySmokeParticle midDashSmoke = new(smokePos, player.velocity * 0.2f, smokeColor, 20, smokeScale, 0.75f, 0.2f * Main.rand.NextFloatDirection(), true);
+ HeavySmokeParticle midDashSmoke = new(player.Center + Main.rand.NextVector2Circular(15, 15), -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 9), Main.rand.NextBool() ? Color.Purple : Color.DarkSlateBlue, 16, Main.rand.NextFloat(0.7f, 0.9f), 0.55f, 0.2f * Main.rand.NextFloatDirection(), true);
GeneralParticleHandler.SpawnParticle(midDashSmoke);
}
+
+ int dustStyle = ModContent.DustType();
+ Dust dust2 = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Circular(15, 15), dustStyle, player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 9));
+ dust2.scale = Main.rand.NextFloat(0.9f, 1.7f);
+ dust2.color = Main.rand.NextBool() ? Color.Purple : Color.DarkSlateBlue;
+ dust2.noGravity = true;
+ dust2.fadeIn = 0.5f;
+
+ player.velocity.X *= 0.93f;
}
}
}
diff --git a/CalPlayer/Dashes/StatisVoidSashDash.cs b/CalPlayer/Dashes/StatisVoidSashDash.cs
index e1931be364..f9d18cc35d 100644
--- a/CalPlayer/Dashes/StatisVoidSashDash.cs
+++ b/CalPlayer/Dashes/StatisVoidSashDash.cs
@@ -1,8 +1,14 @@
-using CalamityMod.Enums;
+using System;
+using System.Security.Policy;
+using CalamityMod.Dusts;
+using CalamityMod.Enums;
+using CalamityMod.Graphics.Metaballs;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
+using rail;
using Terraria;
+using Terraria.Audio;
using Terraria.ModLoader;
namespace CalamityMod.CalPlayer.Dashes
@@ -16,29 +22,84 @@ namespace CalamityMod.CalPlayer.Dashes
public override bool IsOmnidirectional => false;
public int Time = 0;
public bool AngleSwap = true;
+ public Vector2 aimVel;
+ public bool strongVisuals = true;
- public override float CalculateDashSpeed(Player player) => 25.4f;
+ public override float CalculateDashSpeed(Player player) => (75f * player.moveSpeed);
public override void OnDashEffects(Player player)
{
+ strongVisuals = player.Calamity().voidSashVisuals;
Time = 0;
+ aimVel = player.velocity;
+
+ if (strongVisuals)
+ {
+ SoundStyle sound = new("CalamityMod/Sounds/Item/VoidDash");
+ SoundEngine.PlaySound(sound with { Volume = 0.7f, Pitch = Main.rand.NextFloat(-0.15f, 0.15f) }, player.Center);
+ for (int i = 0; i < 40; i++)
+ {
+ Vector2 intenededVel = (MathHelper.TwoPi * i / 40f).ToRotationVector2() * 5.5f;
+ Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
+ Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
+
+ SignusMetaball.SpawnParticle(fxPlace, fxVel - player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(6, 9), 60f * Main.rand.NextFloat(0.7f, 1), 60, new Vector2(1.8f, 0.9f), 0.06f, 0);
+ }
+ }
+ for (int i = 0; i < 30; i++)
+ {
+ Vector2 intenededVel = (MathHelper.TwoPi * i / 30f).ToRotationVector2() * 5.5f;
+ Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
+ Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
+
+ Color dustColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
+
+ int dustStyle = ModContent.DustType();
+ Dust dust2 = Dust.NewDustPerfect(fxPlace, dustStyle, (fxVel - player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(6, 9)) * Main.rand.NextFloat(1.2f, 1.5f));
+ dust2.scale = Main.rand.NextFloat(1.6f, 2.3f) * 2.3f;
+ dust2.color = dustColor;
+ dust2.noGravity = true;
+ dust2.fadeIn = 1.5f;
+ }
}
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
{
Time++;
- if (Time % 3 == 0)
+ aimVel = Vector2.Lerp(aimVel, player.velocity, 0.2f);
+
+ float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(aimVel.X), true);
+
+ Vector2 trailPos = player.Center - (aimVel * 2) + Main.rand.NextVector2Circular(10, 20);
+ float trailScale = 1 * fxFade;
+ Color trailColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
+
+ int dustStyle = ModContent.DustType();
+ Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, aimVel.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(9, 15));
+ dust2.scale = Main.rand.NextFloat(0.9f, 1.7f);
+ dust2.color = trailColor;
+ dust2.noGravity = true;
+ dust2.fadeIn = 0.5f;
+
+ if (strongVisuals)
{
- Vector2 trailPos = player.Center - (player.velocity * 2) + Main.rand.NextVector2Circular(10, 20);
- float trailScale = player.velocity.X * player.direction * 0.08f;
- Color trailColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
- Particle Trail = new SparkParticle(trailPos, player.velocity * 0.2f, false, 35, trailScale, trailColor);
- GeneralParticleHandler.SpawnParticle(Trail);
+ SignusMetaball.SpawnParticle(player.Center + Main.rand.NextVector2Circular(20, 20), -aimVel.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 15), 120f * Main.rand.NextFloat(0.7f, 1f), 60, new Vector2(0.8f, 1.2f), 0.08f, 0);
+
+ int dir = MathF.Sign(aimVel.X);
+ Vector2 safeVel = aimVel.SafeNormalize(Vector2.UnitX);
+ float sparkscale2 = 0.35f * Math.Max(fxFade, 0.5f);
+ for (int i = -1; i <= 1; i += 2)
+ {
+ Vector2 fxVelocity = safeVel.RotatedBy(dir * MathHelper.ToRadians(75) * -i) - safeVel * 3;
+ Vector2 fxPlace = player.Center + (safeVel * 35).RotatedBy(-0.2f * dir * i) * 1.5f;
+
+ SignusMetaball.SpawnParticle(fxPlace, fxVelocity * Main.rand.NextFloat(5, 8), 50f * Main.rand.NextFloat(0.7f, 1f), 8, new Vector2(0.8f, 1.2f), 0.18f, 0);
+ }
}
// Periodically release scythes.
player.Calamity().statisTimer++;
- if (Main.myPlayer == player.whoAmI && player.Calamity().statisTimer % 5 == 0)
+ if (Main.myPlayer == player.whoAmI && player.Calamity().statisTimer % 2 == 0 && false)
{
int scytheDamage = (int)player.GetBestClassDamage().ApplyTo(250);
@@ -54,8 +115,7 @@ namespace CalamityMod.CalPlayer.Dashes
}
- // Dash at a faster speed than the default value.
- dashSpeed = 14f;
+ player.velocity.X *= 0.912f;
}
}
}
diff --git a/ExtraTextures/BasicMess.png b/ExtraTextures/BasicMess.png
new file mode 100644
index 0000000000..1e752bf91a
Binary files /dev/null and b/ExtraTextures/BasicMess.png differ
diff --git a/Graphics/Metaballs/SignusLayer.png b/Graphics/Metaballs/SignusLayer.png
new file mode 100644
index 0000000000..d28069a497
Binary files /dev/null and b/Graphics/Metaballs/SignusLayer.png differ
diff --git a/Graphics/Metaballs/SignusMetaball.cs b/Graphics/Metaballs/SignusMetaball.cs
new file mode 100644
index 0000000000..7c90c5fda0
--- /dev/null
+++ b/Graphics/Metaballs/SignusMetaball.cs
@@ -0,0 +1,144 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Graphics.Metaballs
+{
+ public class SignusMetaball : Metaball
+ {
+ public Color borderColor = Color.Purple;
+ public Vector2 goalDir = Vector2.Zero;
+ public Vector2 scrollDir = Vector2.Zero;
+ public class CosmicParticle
+ {
+ public float Size;
+
+ public Vector2 Velocity;
+
+ public Vector2 Center;
+ public Vector2 BaseSquash = Vector2.One;
+ public float Rotation;
+ public float ShrinkSpeed = 0;
+ public int Lifetime;
+ public float SquashPower = 0;
+ public int time = 0;
+
+ public CosmicParticle(Vector2 center, Vector2 velocity, float size, int lifetime, Vector2 squash, float shrinkSpeed = 0, float velocitySquash = 0)
+ {
+ Center = center;
+ Velocity = velocity;
+ Size = size;
+ Rotation = Velocity.ToRotation() + MathHelper.PiOver2;
+ BaseSquash = squash;
+ Lifetime = lifetime;
+ ShrinkSpeed = shrinkSpeed;
+ SquashPower = velocitySquash;
+ }
+
+ public void Update()
+ {
+ Center += Velocity;
+ Velocity *= 0.95f;
+ if ((float)time / (float)Lifetime > 0.5f)
+ {
+ Size *= 0.94f;
+ }
+ BaseSquash.X *= (1 - 0.2f * ShrinkSpeed);
+ BaseSquash.Y *= (1 + 0.2f * ShrinkSpeed);
+ Rotation = Velocity.ToRotation() + MathHelper.PiOver2;
+ time++;
+ }
+ }
+ public static Asset LayerAsset
+ {
+ get;
+ private set;
+ }
+
+ public static List Particles
+ {
+ get;
+ private set;
+ } = new();
+
+ public override bool AnythingToDraw => Particles.Any();
+
+ public override IEnumerable Layers
+ {
+ get
+ {
+ yield return LayerAsset.Value;
+ }
+ }
+
+ public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeNPCs;
+ public override void Load()
+ {
+ if (Main.dedServ)
+ return;
+
+ // Load the layer asset wrapper.
+ LayerAsset = ModContent.Request($"CalamityMod/Graphics/Metaballs/SignusLayer", AssetRequestMode.ImmediateLoad);
+ }
+
+ public override void Update()
+ {
+ if (goalDir == Vector2.Zero)
+ goalDir = Vector2.One.RotatedByRandom(Math.PI);
+ if ((int)(Main.GlobalTimeWrappedHourly * 50) % 5 == 0)
+ {
+ goalDir = goalDir.RotatedByRandom(0.13f);
+ }
+ scrollDir = Vector2.Lerp(scrollDir, goalDir, 0.01f);
+
+ float rate = Main.GlobalTimeWrappedHourly * 19;
+ List colors = new List()
+ {
+ Color.Purple,
+ Color.BlueViolet,
+ Color.DarkViolet
+ };
+
+ int colorIndex = (int)(rate / 2 % colors.Count);
+ Color currentColor = colors[colorIndex];
+ Color nextColor = colors[(colorIndex + 1) % colors.Count];
+ borderColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
+
+ // Update all particle instances.
+ // Once sufficiently small, they vanish.
+ for (int i = 0; i < Particles.Count; i++)
+ Particles[i].Update();
+ Particles.RemoveAll(p => p.Size <= 2f);
+ }
+ public override Color EdgeColor => borderColor with { A = 0 };
+
+ public static void SpawnParticle(Vector2 position, Vector2 velocity, float size, int lifetime, Vector2 squash, float shrinkSpeed = 0, float velocitySquash = 0) =>
+ Particles.Add(new(position, velocity, size, lifetime, squash, shrinkSpeed, velocitySquash));
+
+ // Make the texture scroll.
+ public override Vector2 CalculateManualOffsetForLayer(int layerIndex)
+ {
+ return scrollDir * 0.5f;
+ }
+
+ public override void DrawInstances()
+ {
+ Texture2D tex = ModContent.Request("CalamityMod/ExtraTextures/BasicMess").Value;
+
+ foreach (CosmicParticle particle in Particles)
+ {
+ Vector2 squash = Vector2.Lerp(particle.BaseSquash, new Vector2(Utils.Remap(particle.Velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(particle.Velocity.Length(), 2, 7, 1, 2.5f)), particle.SquashPower);
+ Vector2 drawPosition = particle.Center - Main.screenPosition;
+ Vector2 origin = tex.Size() * 0.5f;
+ Vector2 scale = Vector2.One * particle.Size / tex.Size();
+ Main.spriteBatch.Draw(tex, drawPosition, null, Color.White, particle.Rotation, origin, squash * scale, SpriteEffects.None, 0f);
+ }
+ }
+ }
+}
diff --git a/Items/Accessories/LeviathanAmbergris.cs b/Items/Accessories/LeviathanAmbergris.cs
index a50bfc0663..07c635deb3 100644
--- a/Items/Accessories/LeviathanAmbergris.cs
+++ b/Items/Accessories/LeviathanAmbergris.cs
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
public class LeviathanAmbergris : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
- public static int ambergrisDashDamage = 90;
+ public static int ambergrisDashDamage = 350;
public override void SetDefaults()
{
Item.width = 20;
@@ -24,6 +24,7 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.lAmbergris = true;
+ modPlayer.lAmbergrisVisual = !hideVisual;
}
}
}
diff --git a/Items/Accessories/SlagsplitterPauldron.cs b/Items/Accessories/SlagsplitterPauldron.cs
index 57f9ef5984..0bce37c59f 100644
--- a/Items/Accessories/SlagsplitterPauldron.cs
+++ b/Items/Accessories/SlagsplitterPauldron.cs
@@ -1,12 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Crags;
-using CalamityMod.Projectiles.Typeless;
-using CalamityMod.Rarities;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
using Terraria;
-using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
@@ -16,7 +11,7 @@ namespace CalamityMod.Items.Accessories
public class SlagsplitterPauldron : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
- public static int PauldronSlamDamage = 170;
+ public static int PauldronSlamDamage = 330;
public override void SetDefaults()
{
Item.width = 54;
@@ -29,7 +24,8 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
- modPlayer.Pauldron = true;
+ modPlayer.sPauldron = true;
+ modPlayer.sPauldronVisual = !hideVisual;
}
public override void AddRecipes()
diff --git a/Items/Accessories/StatisNinjaBelt.cs b/Items/Accessories/StatisNinjaBelt.cs
index 3b5dca0d99..9ac868fe4a 100644
--- a/Items/Accessories/StatisNinjaBelt.cs
+++ b/Items/Accessories/StatisNinjaBelt.cs
@@ -30,18 +30,16 @@ namespace CalamityMod.Items.Accessories
{
player.autoJump = true;
player.jumpSpeedBoost += 1.6f;
+ player.moveSpeed += 0.1f;
player.noFallDmg = true;
player.blackBelt = true;
player.dashType = 0;
player.Calamity().DashID = StatisNinjaBeltDash.ID;
player.spikedBoots = 2;
player.accFlipper = true;
- player.hasMagiluminescence = true;
+ player.Calamity().statisNinjaBelt = true;
player.MountedCenter.ToTileCoordinates();
- DelegateMethods.v3_1 = new Vector3(0.8f, 0.5f, 1f);
- Utils.PlotTileLine(player.Center, player.Center + player.velocity * 6f, 20f, DelegateMethods.CastLightOpen);
- Utils.PlotTileLine(player.Left, player.Right, 20f, DelegateMethods.CastLightOpen);
}
public override void AddRecipes()
@@ -51,8 +49,7 @@ namespace CalamityMod.Items.Accessories
CreateRecipe().
AddIngredient(ItemID.MasterNinjaGear).
AddIngredient(ItemID.FrogFlipper).
- AddIngredient(ItemID.Magiluminescence).
- AddIngredient(50).
+ AddIngredient(25).
AddIngredient(5).
AddTile(TileID.LunarCraftingStation).
Register();
@@ -61,8 +58,7 @@ namespace CalamityMod.Items.Accessories
AddIngredient(ItemID.Tabi).
AddIngredient(ItemID.BlackBelt).
AddIngredient(ItemID.FrogGear).
- AddIngredient(ItemID.Magiluminescence).
- AddIngredient(50).
+ AddIngredient(25).
AddIngredient(5).
AddTile(TileID.LunarCraftingStation).
Register();
diff --git a/Items/Accessories/StatisVoidSash.cs b/Items/Accessories/StatisVoidSash.cs
index f68a1bc362..8fc1788724 100644
--- a/Items/Accessories/StatisVoidSash.cs
+++ b/Items/Accessories/StatisVoidSash.cs
@@ -35,20 +35,21 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
+
+ modPlayer.voidSashVisuals = !hideVisual;
+
player.autoJump = true;
player.jumpSpeedBoost += 1.6f;
+ player.moveSpeed += 0.2f;
player.noFallDmg = true;
player.blackBelt = true;
modPlayer.DashID = StatisVoidSashDash.ID;
player.dashType = 0;
player.spikedBoots = 2;
player.accFlipper = true;
- player.hasMagiluminescence = true;
+ player.Calamity().statisVoidSash = true;
player.MountedCenter.ToTileCoordinates();
- DelegateMethods.v3_1 = new Vector3(0.8f, 0.5f, 1f);
- Utils.PlotTileLine(player.Center, player.Center + player.velocity * 6f, 20f, DelegateMethods.CastLightOpen);
- Utils.PlotTileLine(player.Left, player.Right, 20f, DelegateMethods.CastLightOpen);
}
public override void AddRecipes()
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
index 7a5feca3d2..93ed4072da 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
@@ -1042,8 +1042,9 @@ LeviathanAmbergris: {
DisplayName: Leviathan Ambergris
Tooltip:
'''
- 20% increased dash velocity, and dash cooldown is 33% faster
+ 200% increased initial dash velocity, 33% faster dash cooldown, and greatly increased dash deceleration
Your dashes are empowered by water, knocking back and damaging nearby enemies with viscous currents
+Visual effects are reduced if visibility is disabled
'''
}
@@ -1608,6 +1609,7 @@ SlagsplitterPauldron: {
'''
You gain 10% damage reduction while dashing, and enemies are inflicted with Armor Crunch
Your dashes are empowered by fire, shredding enemies near you with violent explosions
+Visual effects are reduced if visibility is disabled
'''
}
@@ -1683,12 +1685,10 @@ StatisNinjaBelt: {
DisplayName: Statis' Ninja Belt
Tooltip:
'''
- 32% increased jump speed, allows auto-jump, and negates fall damage
- Increases movement acceleration and deceleration by 1.75x
- Increases movement speed by 1.15x. This bonus applies to running boot accessories
- Grants the ability to swim, climb walls, dash, and dodge attacks
- Provides light when worn
- {$Common.AbyssLightLevel1}
+ Provides a high-speed dash that scales with your movement speed
+ 10% increased movement speed, 32% increased jump speed, allows auto-jump, and negates fall damage
+ Increases movement acceleration and deceleration by 1.6x
+ Grants the ability to swim, climb walls, and dodge attacks
'''
HoldShiftTooltip: "{$Common.DodgeInformation}"
}
@@ -1697,13 +1697,11 @@ StatisVoidSash: {
DisplayName: Statis' Void Sash
Tooltip:
'''
- 32% increased jump speed, allows auto-jump, and negates fall damage
- Increases movement acceleration and deceleration by 1.75x
- Increases movement speed by 1.15x. This bonus applies to running boot accessories
- Grants the ability to swim, climb walls, dash, and dodge attacks
- Dashes leave homing scythes in your wake
- Provides light when worn
- {$Common.AbyssLightLevel1}
+ Provides a high-speed dash that scales with your movement speed
+ 20% increased movement speed, 32% increased jump speed, allows auto-jump, and negates fall damage
+ Increases movement acceleration and deceleration by 1.85x
+ Grants the ability to swim, climb walls, and dodge attacks
+Visual effects are reduced if visibility is disabled
'''
HoldShiftTooltip: "{$Common.DodgeInformation}"
}
diff --git a/Projectiles/Typeless/LeviAmberDash.cs b/Projectiles/Typeless/LeviAmberDash.cs
index ce78561a5f..0ac512a5bc 100644
--- a/Projectiles/Typeless/LeviAmberDash.cs
+++ b/Projectiles/Typeless/LeviAmberDash.cs
@@ -1,5 +1,7 @@
using System;
+using System.Collections.Generic;
using CalamityMod.CalPlayer;
+using CalamityMod.Dusts;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -15,56 +17,147 @@ namespace CalamityMod.Projectiles.Typeless
public new string LocalizationCategory => "Projectiles.Typeless";
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public Player Owner => Main.player[Projectile.owner];
+ public Color effectsColor = Color.White;
+ public float fxFade = 0;
+ public bool isAlive = true;
+ public bool onSpawn = true;
+ public Vector2 aimVel;
+ public bool visuals => Owner.Calamity().lAmbergrisVisual;
private static float ExplosionRadius = 85f;
public static readonly SoundStyle Slap = new("CalamityMod/Sounds/Custom/WetSlap", 4) { Volume = 0.8f, PitchVariance = 0.3f };
-
public override void SetDefaults()
{
- //These shouldn't matter because its circular
- Projectile.width = 85;
- Projectile.height = 85;
+ Projectile.width = (int)ExplosionRadius;
+ Projectile.height = (int)ExplosionRadius;
Projectile.friendly = true;
Projectile.DamageType = AverageDamageClass.Instance;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
Projectile.penetrate = -1;
- Projectile.timeLeft = 4;
+ Projectile.timeLeft = 15;
Projectile.usesLocalNPCImmunity = true;
- Projectile.localNPCHitCooldown = -1;
+ Projectile.localNPCHitCooldown = 18;
}
+ public override void AI()
+ {
+ if (onSpawn && visuals)
+ {
+ Particle pulse = new CustomSpark(Owner.Center, Owner.velocity.SafeNormalize(Vector2.UnitX) * 9, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, 23, 0.095f, Color.MediumTurquoise, new Vector2(1f, 1.7f), shrinkSpeed: -0.2f);
+ GeneralParticleHandler.SpawnParticle(pulse);
+ Particle pulse2 = new CustomSpark(Owner.Center, Owner.velocity.SafeNormalize(Vector2.UnitX) * 12, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, 20, 0.065f, Color.DeepSkyBlue, new Vector2(1f, 1.7f), shrinkSpeed: -0.23f);
+ GeneralParticleHandler.SpawnParticle(pulse2);
+ onSpawn = false;
+ }
+ if (Owner.dashDelay != -1)
+ isAlive = false;
+ if (isAlive)
+ Projectile.timeLeft++;
+ Projectile.Center = Owner.Center;
+
+ if (effectsColor == Color.White)
+ aimVel = Owner.velocity;
+ else
+ {
+ aimVel = Vector2.Lerp(aimVel, Owner.velocity, 0.2f);
+ }
+
+ if (isAlive)
+ {
+ float goalSize = Utils.GetLerpValue(5, 15, Math.Abs(aimVel.X), true);
+ if (goalSize < fxFade)
+ fxFade = MathHelper.Lerp(fxFade, goalSize, 0.03f);
+ else
+ fxFade = goalSize;
+ }
+ else
+ {
+ fxFade = MathHelper.Lerp(fxFade, 0, 0.13f);
+ }
+
+
+ float rate = Main.GlobalTimeWrappedHourly * 22;
+ List eColors = new List()
+ {
+ Color.DarkTurquoise,
+ Color.DeepSkyBlue,
+ Color.MediumTurquoise
+ };
+
+ int colorIndex = (int)(rate / 2 % eColors.Count);
+ Color currentColor = eColors[colorIndex];
+ Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
+ effectsColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
+
+ if (visuals)
+ {
+ int dir = MathF.Sign(aimVel.X);
+ Vector2 safeVel = aimVel.SafeNormalize(Vector2.UnitX);
+ float sparkscale2 = 0.35f * Math.Max(fxFade, 0.5f);
+ for (int i = -1; i <= 1; i += 2)
+ {
+ Vector2 sparkVelocity = safeVel.RotatedBy(dir * 1.5f * i) - safeVel * 3;
+ Vector2 sparkPlace = Owner.Center + (((safeVel * 15).RotatedBy(2f * dir * i) * 1.5f) + safeVel.RotatedBy(0.5f * i * dir) * 30) * fxFade;
+ Particle spark = new CustomSpark(sparkPlace, sparkVelocity.RotatedByRandom(0.1f), "CalamityMod/Particles/BloomCircle", false, 6, sparkscale2, effectsColor * fxFade, new Vector2(0.8f, 2f), shrinkSpeed: 1.1f);
+ GeneralParticleHandler.SpawnParticle(spark);
+
+ if (isAlive)
+ {
+ int dustStyle = ModContent.DustType();
+ Dust dust2 = Dust.NewDustPerfect(sparkPlace, dustStyle, sparkVelocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(3, 5));
+ dust2.scale = Main.rand.NextFloat(0.9f, 1.3f);
+ dust2.color = effectsColor;
+ dust2.noGravity = true;
+ dust2.fadeIn = Main.rand.NextFloat(0f, 0.7f);
+ }
+ }
+ }
+
+ if (Owner.dead || (!isAlive && fxFade < 0.1f) || Owner.velocity == Vector2.Zero)
+ Projectile.Kill();
+ }
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
- Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
- target.MoveNPC(launchVel, 16, true);
+ SoundStyle sound = new("CalamityMod/Sounds/Item/WaterSplash", 2);
+ SoundEngine.PlaySound(sound with { Volume = 0.2f, Pitch = Main.rand.NextFloat(0.35f, 0.5f), MaxInstances = -1 }, Projectile.Center);
target.AddBuff(BuffID.Wet, 300);
target.AddBuff(ModContent.BuffType(), 180);
- SoundEngine.PlaySound(SoundID.Item85 with { Volume = 0.4f, PitchVariance = 0.4f }, Projectile.Center);
- for (int i = 0; i < 3; ++i)
+
+ Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
+ target.MoveNPC(launchVel, 20, true);
+
+ for (int i = 0; i <= 17; i++)
{
- int bloodLifetime = Main.rand.Next(20, 26);
- float bloodScale = Main.rand.NextFloat(0.6f, 0.8f);
- Color bloodColor = Color.Lerp(Color.DodgerBlue, Color.DarkTurquoise, Main.rand.NextFloat());
-
- if (Main.rand.NextBool(20))
- bloodScale *= 2f;
-
- float randomSpeedMultiplier = Main.rand.NextFloat(1.25f, 2.25f);
- Vector2 bloodVelocity = Main.rand.NextVector2Unit() * 5 * randomSpeedMultiplier;
- bloodVelocity.Y -= 5f;
- BloodParticle blood = new BloodParticle(Projectile.Center, bloodVelocity, bloodLifetime, bloodScale, bloodColor);
- GeneralParticleHandler.SpawnParticle(blood);
+ float variance = Main.rand.NextFloat(-0.4f, 0.4f);
+ int dustStyle = ModContent.DustType();
+ Dust dust2 = Dust.NewDustPerfect(target.Center, dustStyle);
+ dust2.scale = (Main.rand.NextFloat(1.2f, 1.4f) - Math.Abs(variance)) * 1.5f;
+ dust2.velocity = (aimVel.SafeNormalize(Vector2.UnitX).RotatedBy(variance) - Vector2.UnitY * 0.3f) * Main.rand.NextFloat(15, 35f) * (1 - Math.Abs(variance) * 1.3f);
+ dust2.color = Main.rand.NextBool() ? Color.MediumTurquoise : Color.DeepSkyBlue;
+ dust2.noGravity = false;
+ dust2.fadeIn = Main.rand.NextFloat(0f, 1.2f);
}
- }
+ }
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox);
- public override bool? CanDamage() => base.CanDamage();
- public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
+ public override bool? CanDamage() => (isAlive ? null : false);
+ public override bool PreDraw(ref Color lightColor)
{
- modifiers.HitDirectionOverride = Math.Sign(Owner.direction);
- }
+ if (effectsColor == Color.White || !visuals)
+ return false;
+ float sine = MathHelper.Lerp(Math.Abs((float)Math.Sin(Main.GlobalTimeWrappedHourly * 50f / MathHelper.Pi)), 0.8f, 0.7f);
+ Texture2D bTexture = ModContent.Request("CalamityMod/Particles/VerticalSmearRagged").Value;
+
+ for (int i = 0; i < 10; i++)
+ {
+ float bScale2 = 0.75f;
+ Vector2 scale = new Vector2((1 - i * 0.13f) * sine, (1 + i * 0.012f) + fxFade * 0.2f) * (bScale2 + i * 0.08f) * fxFade * 0.27f;
+ Main.EntitySpriteDraw(bTexture, Owner.Center - Main.screenPosition + aimVel.SafeNormalize(Vector2.UnitX) * -15, null, Color.Lerp(Color.Aquamarine, effectsColor, i * 0.15f) with { A = 0 } * fxFade * 1f, aimVel.ToRotation() + MathHelper.PiOver2, bTexture.Size() * 0.5f, scale, i % 2 == 0 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0);
+ }
+ return false;
+ }
public override bool? CanCutTiles() => false;
}
}
diff --git a/Projectiles/Typeless/PauldronDash.cs b/Projectiles/Typeless/PauldronDash.cs
index 31a4099d5a..efc5b8021d 100644
--- a/Projectiles/Typeless/PauldronDash.cs
+++ b/Projectiles/Typeless/PauldronDash.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using CalamityMod.Dusts;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
@@ -16,22 +17,92 @@ namespace CalamityMod.Projectiles.Typeless
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public Player Owner => Main.player[Projectile.owner];
private static float ExplosionRadius = 75f;
-
+ public Color effectsColor = Color.White;
+ public float fxFade = 0;
+ public bool isAlive = true;
+ public bool visuals => Owner.Calamity().sPauldronVisual;
+ public Vector2 aimVel;
public override void SetDefaults()
{
- //These shouldn't matter because its circular
- Projectile.width = 75;
- Projectile.height = 75;
+ Projectile.width = (int)ExplosionRadius;
+ Projectile.height = (int)ExplosionRadius;
Projectile.friendly = true;
Projectile.DamageType = AverageDamageClass.Instance;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
- Projectile.penetrate = 1;
- Projectile.timeLeft = 4;
- Projectile.usesIDStaticNPCImmunity = true;
- Projectile.idStaticNPCHitCooldown = 22;
+ Projectile.penetrate = -1;
+ Projectile.timeLeft = 15;
+ Projectile.usesLocalNPCImmunity = true;
+ Projectile.localNPCHitCooldown = 18;
}
+ public override void AI()
+ {
+ if (Owner.dashDelay != -1)
+ isAlive = false;
+ if (isAlive)
+ Projectile.timeLeft++;
+ Projectile.Center = Owner.Center;
+ if (effectsColor == Color.White)
+ aimVel = Owner.velocity;
+ else
+ {
+ aimVel = Vector2.Lerp(aimVel, Owner.velocity, 0.2f);
+ }
+
+ if (isAlive)
+ {
+ float goalSize = Utils.GetLerpValue(5, 15, Math.Abs(aimVel.X), true);
+ if (goalSize < fxFade)
+ fxFade = MathHelper.Lerp(fxFade, goalSize, 0.03f);
+ else
+ fxFade = goalSize;
+ }
+ else
+ {
+ fxFade = MathHelper.Lerp(fxFade, 0, 0.08f);
+ }
+
+
+ float rate = Main.GlobalTimeWrappedHourly * 22;
+ List eColors = new List()
+ {
+ Color.OrangeRed,
+ Color.Orange,
+ Color.DarkOrange
+ };
+
+ int colorIndex = (int)(rate / 2 % eColors.Count);
+ Color currentColor = eColors[colorIndex];
+ Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
+ effectsColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
+
+ if (visuals)
+ {
+ int dir = MathF.Sign(aimVel.X);
+ Vector2 safeVel = aimVel.SafeNormalize(Vector2.UnitX);
+ float sparkscale2 = 0.35f * Math.Max(fxFade, 0.5f);
+ for (int i = -1; i <= 1; i += 2)
+ {
+ Vector2 sparkVelocity = safeVel.RotatedBy(dir * 4.3f * i) - safeVel * 3;
+ Vector2 sparkPlace = Owner.Center + (safeVel * 15).RotatedBy(2f * dir * i) * 1.5f;
+ Particle spark = new VelChangingSpark(sparkPlace, sparkVelocity, -safeVel * 5, "CalamityMod/Particles/BloomCircle", 10, sparkscale2, effectsColor * fxFade, new Vector2(0.8f, 2f), shrinkSpeed: 0.4f, lerpRate: 0.1f);
+ GeneralParticleHandler.SpawnParticle(spark);
+
+ if (isAlive)
+ {
+ int dustStyle = ModContent.DustType();
+ Dust dust2 = Dust.NewDustPerfect(sparkPlace + safeVel * 30, dustStyle, sparkVelocity.RotatedBy(-0.6f * i * dir).RotatedByRandom(0.3f) * Main.rand.NextFloat(3, 5));
+ dust2.scale = Main.rand.NextFloat(0.9f, 1.3f);
+ dust2.color = Main.rand.NextBool() ? Color.Orange : Color.OrangeRed;
+ dust2.noGravity = true;
+ }
+ }
+ }
+
+ if (Owner.dead || (!isAlive && fxFade < 0.1f) || Owner.velocity == Vector2.Zero)
+ Projectile.Kill();
+ }
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.OnFire3, 240);
@@ -45,43 +116,61 @@ namespace CalamityMod.Projectiles.Typeless
for (int i = 0; i <= 12; i++)
{
float variance = Main.rand.NextFloat(-0.7f, 0.7f);
- int dustStyle = ModContent.DustType();
+ int dustStyle = ModContent.DustType();
Dust dust2 = Dust.NewDustPerfect(target.Center, dustStyle, Projectile.velocity);
- dust2.scale = (Main.rand.NextFloat(1.1f, 1.3f) - Math.Abs(variance)) * 2.5f;
- dust2.velocity = (Vector2.UnitY * -18).RotatedBy(variance) * Main.rand.NextFloat(0.7f, 1f) * (1 - Math.Abs(variance) * 1.3f);
+ dust2.scale = (Main.rand.NextFloat(1.2f, 1.4f) - Math.Abs(variance)) * 2.5f;
+ dust2.velocity = (Vector2.UnitY * -25).RotatedBy(variance) * Main.rand.NextFloat(0.7f, 1f) * (1 - Math.Abs(variance) * 1.3f);
dust2.color = Main.rand.NextBool() ? Color.Orange : Color.OrangeRed;
dust2.noGravity = false;
+ dust2.fadeIn = 0.35f;
Particle spark = new SparkParticle(Projectile.Center, new Vector2(17, 17).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 1f), true, 55, 0.85f, Main.rand.NextBool() ? Color.Orange : Color.OrangeRed);
GeneralParticleHandler.SpawnParticle(spark);
}
- float baseRot = Main.rand.NextFloat(-9f, 9f);
+ if (visuals)
+ {
+ float baseRot = Main.rand.NextFloat(-9f, 9f);
+ for (int i = 0; i < 5; i++)
+ {
+ float rot = Main.rand.NextFloat(-0.3f, 0.3f);
+ for (int b = 0; b < 2; b++)
+ {
+ Vector2 pulseVel = new Vector2(0, Main.rand.NextFloat(-7, -9)).RotatedBy(i * (MathHelper.ToRadians(360f) / 5)).RotatedBy(rot + baseRot + 0.9f);
+ Particle orb = new CustomPulse(target.Center, pulseVel, (Main.rand.NextBool() ? Color.Orange : Color.OrangeRed) * 0.9f, "CalamityMod/Projectiles/Summon/RustyBeaconPulse", Vector2.One, pulseVel.ToRotation(), 0.2f, Main.rand.NextFloat(0.55f, 0.85f) * 3f, Main.rand.Next(14, 19 + 1));
+ GeneralParticleHandler.SpawnParticle(orb);
+ }
+ Particle orb2 = new CustomSpark(target.Center, new Vector2(0, -7).RotatedBy(i * (MathHelper.ToRadians(360f) / 5)).RotatedBy(rot + baseRot), "CalamityMod/Particles/BloomLineFade", false, 13, 0.095f, Main.rand.NextBool() ? Color.Orange : Color.OrangeRed, new Vector2(2.9f, 0.5f), shrinkSpeed: 0.9f);
+ GeneralParticleHandler.SpawnParticle(orb2);
+ }
+
+ for (int i = 0; i < 2; i++)
+ {
+ Particle bloom = new CustomSpark(target.Center, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 20, 1.2f, Color.OrangeRed, new Vector2(1, 1), true, true, glowCenterScale: 0.7f, glowOpacity: 0.8f);
+ GeneralParticleHandler.SpawnParticle(bloom);
+ }
+ }
+
+ Owner.Calamity().GeneralScreenShakePower = 4f;
+
+ Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 5, 0, Projectile.owner);
+ }
+ public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox);
+ public override bool? CanDamage() => (isAlive ? null : false);
+ public override bool PreDraw(ref Color lightColor)
+ {
+ if (effectsColor == Color.White || !visuals)
+ return false;
+
+ float sine = MathHelper.Lerp(Math.Abs((float)Math.Sin(Main.GlobalTimeWrappedHourly * 50f / MathHelper.Pi)), 0.8f, 0.7f);
+ Texture2D bTexture = ModContent.Request("CalamityMod/Particles/VerticalSmearLarge").Value;
+
for (int i = 0; i < 5; i++)
{
- float rot = Main.rand.NextFloat(-0.3f, 0.3f);
- for (int b = 0; b < 2; b++)
- {
- Vector2 pulseVel = new Vector2(0, Main.rand.NextFloat(-7, -9)).RotatedBy(i * (MathHelper.ToRadians(360f) / 5)).RotatedBy(rot + baseRot + 0.9f);
- Particle orb = new CustomPulse(target.Center, pulseVel, (Main.rand.NextBool() ? Color.Orange : Color.OrangeRed) * 0.9f, "CalamityMod/Projectiles/Summon/RustyBeaconPulse", Vector2.One, pulseVel.ToRotation(), 0.2f, Main.rand.NextFloat(0.55f, 0.85f) * 3f, Main.rand.Next(14, 19 + 1));
- GeneralParticleHandler.SpawnParticle(orb);
- }
- Particle orb2 = new CustomSpark(target.Center, new Vector2(0, -7).RotatedBy(i * (MathHelper.ToRadians(360f) / 5)).RotatedBy(rot + baseRot), "CalamityMod/Particles/BloomLineFade", false, 13, 0.095f, Main.rand.NextBool() ? Color.Orange : Color.OrangeRed, new Vector2(2.9f, 0.5f), shrinkSpeed: 0.9f);
- GeneralParticleHandler.SpawnParticle(orb2);
- }
-
- Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 2, 0, Projectile.owner);
- }
-
- public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox);
- public override bool? CanDamage() => base.CanDamage();
- public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
- {
- Owner.Calamity().GeneralScreenShakePower = 4f;
- for (int i = 0; i < 2; i++)
- {
- Particle bloom = new CustomSpark(target.Center, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 20, 1.2f, Color.OrangeRed, new Vector2(1, 1), true, true, glowCenterScale: 0.7f, glowOpacity: 0.8f);
- GeneralParticleHandler.SpawnParticle(bloom);
+ float bScale2 = 0.75f;
+ Vector2 scale = new Vector2((1 - i * 0.15f) * sine, (1 + i * 0.22f) + fxFade * 0.2f) * (bScale2 - i * 0.08f) * fxFade * 0.23f;
+ Main.EntitySpriteDraw(bTexture, Owner.Center - Main.screenPosition + aimVel.SafeNormalize(Vector2.UnitX) * -15, null, Color.Lerp(effectsColor, Color.White, i * 0.15f) with { A = 0 } * fxFade, aimVel.ToRotation() + MathHelper.PiOver2, bTexture.Size() * 0.5f, scale, SpriteEffects.None, 0);
}
+ return false;
}
public override bool? CanCutTiles() => false;
}
diff --git a/Projectiles/Typeless/PauldronExplosion.cs b/Projectiles/Typeless/PauldronExplosion.cs
index ee02ad48c7..db6a871702 100644
--- a/Projectiles/Typeless/PauldronExplosion.cs
+++ b/Projectiles/Typeless/PauldronExplosion.cs
@@ -31,21 +31,19 @@ namespace CalamityMod.Projectiles.Typeless
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = -1;
}
-
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.OnFire3, 240);
-
- //Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.OrangeRed, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0f, Main.rand.NextFloat(0.8f, 1.1f), 20);
- //GeneralParticleHandler.SpawnParticle(pulse);
- //Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.DarkOrange, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0f, Main.rand.NextFloat(0.6f, 0.9f), 20);
- //GeneralParticleHandler.SpawnParticle(pulse2);
}
-
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox);
public override bool? CanDamage() => base.CanDamage();
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
{
+ float minMult = 0.3f;
+ int hitsToMinMult = 8;
+ float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true);
+ modifiers.SourceDamage *= damageMult;
+
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
target.MoveNPC(launchVel, 15, true);
}
diff --git a/Sounds/Item/VoidDash.ogg b/Sounds/Item/VoidDash.ogg
new file mode 100644
index 0000000000..52a3ab7ee5
Binary files /dev/null and b/Sounds/Item/VoidDash.ogg differ