diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 39e05ddad7..ce4c00e059 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -232,6 +232,8 @@ namespace CalamityMod.CalPlayer HasReducedDashFirstFrame = false; } + int dir = MathF.Sign(Player.velocity.X); + if (lAmbergris) { if (Player.miscCounter % 3 == 2 && Player.dashDelay > 0) // Reduced dash cooldown by 33% @@ -252,22 +254,22 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < numberOfDusts; i++) { float rot = MathHelper.ToRadians(i * rotFactor); - Vector2 offset = new Vector2(Player.velocity.X * Player.direction * 0.7f + 6f, 0).RotatedBy(rot * Main.rand.NextFloat(4f, 5f)); + 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 * Player.direction * 0.08f); + dust.scale = (Player.velocity.X * dir * 0.08f); } if (Player.miscCounter % 4 == 0) { - float sparkscale = (Player.velocity.X * Player.direction * 0.07f); - Vector2 SparkVelocity1 = Player.velocity.RotatedBy(Player.direction * 2, default) * 0.1f - Player.velocity / 2f; - LineParticle spark = new LineParticle(Player.Center + Player.velocity.RotatedBy(2f * Player.direction) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue); + 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(Player.direction * -2, default) * 0.1f - Player.velocity / 2f; - LineParticle spark2 = new LineParticle(Player.Center + Player.velocity.RotatedBy(-2f * Player.direction) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue); + 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 @@ -298,20 +300,20 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < numberOfDusts; i++) { float rot = MathHelper.ToRadians(i * rotFactor); - Vector2 offset = new Vector2(MathF.Min(Player.velocity.X * Player.direction * 0.7f + 8f, 20f), 0).RotatedBy(rot * Main.rand.NextFloat(4f, 5f)); + 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 * Player.direction * 0.08f, 1.2f); + dust.scale = MathF.Min(Player.velocity.X * dir * 0.08f, 1.2f); } - float sparkscale = MathF.Min(Player.velocity.X * Player.direction * 0.08f, 1.2f); - Vector2 SparkVelocity1 = Player.velocity.RotatedBy(Player.direction * -3, default) * 0.1f - Player.velocity / 2f; - SparkParticle spark = new SparkParticle(Player.Center + Player.velocity.RotatedBy(2f * Player.direction) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed); + 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(Player.direction * 3, default) * 0.1f - Player.velocity / 2f; - SparkParticle spark2 = new SparkParticle(Player.Center + Player.velocity.RotatedBy(-2f * Player.direction) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed); + 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) @@ -326,9 +328,6 @@ namespace CalamityMod.CalPlayer if (XykVisualsBlue || XykVisualsOrange) { - if (Player.statLife > 30) - Player.statLife = 30; - bool Orange = XykVisualsOrange; Color effectColor = Orange ? Color.Gold : Color.DodgerBlue; @@ -370,7 +369,7 @@ namespace CalamityMod.CalPlayer IsFirstDashFrame = false; } - float sparkscale1 = MathF.Min(Player.velocity.X * Player.direction * 0.08f, 1.2f); + float sparkscale1 = MathF.Min(Player.velocity.X * dir * 0.08f, 1.2f); Vector2 SparkVelocity1 = -Player.velocity.SafeNormalize(Vector2.UnitX) * 5; if (!Orange) @@ -386,12 +385,12 @@ namespace CalamityMod.CalPlayer } else { - float sparkscale2 = MathF.Min(Player.velocity.X * Player.direction * 0.07f, 1.1f); - Vector2 SparkVelocity2 = Player.velocity.RotatedBy(Player.direction * 2.5f, default) * 0.1f - Player.velocity / 2f; - Particle spark = new LineParticle(Player.Center + (Player.velocity.SafeNormalize(Vector2.UnitX) * 15).RotatedBy(2f * Player.direction) * 1.5f, SparkVelocity2, false, 10, sparkscale2, effectColor); + float sparkscale2 = MathF.Min(Player.velocity.X * dir * 0.07f, 1.1f); + Vector2 SparkVelocity2 = Player.velocity.RotatedBy(dir * 2.5f, default) * 0.1f - Player.velocity / 2f; + Particle spark = new LineParticle(Player.Center + (Player.velocity.SafeNormalize(Vector2.UnitX) * 15).RotatedBy(2f * dir) * 1.5f, SparkVelocity2, false, 10, sparkscale2, effectColor); GeneralParticleHandler.SpawnParticle(spark); - Vector2 SparkVelocity3 = Player.velocity.RotatedBy(Player.direction * -2.5f, default) * 0.1f - Player.velocity / 2f; - Particle spark2 = new LineParticle(Player.Center + (Player.velocity.SafeNormalize(Vector2.UnitX) * 15).RotatedBy(-2f * Player.direction) * 1.5f, SparkVelocity3, false, 10, sparkscale2, effectColor); + Vector2 SparkVelocity3 = Player.velocity.RotatedBy(dir * -2.5f, default) * 0.1f - Player.velocity / 2f; + Particle spark2 = new LineParticle(Player.Center + (Player.velocity.SafeNormalize(Vector2.UnitX) * 15).RotatedBy(-2f * dir) * 1.5f, SparkVelocity3, false, 10, sparkscale2, effectColor); GeneralParticleHandler.SpawnParticle(spark2); } diff --git a/Items/Accessories/Vanity/XYK_Body.png b/Items/Accessories/Vanity/XYK_Body.png index 80f101a31b..7aef6c4f40 100644 Binary files a/Items/Accessories/Vanity/XYK_Body.png and b/Items/Accessories/Vanity/XYK_Body.png differ diff --git a/Items/Accessories/Vanity/Xyk_Body2.png b/Items/Accessories/Vanity/Xyk_Body2.png new file mode 100644 index 0000000000..c1ff93a7dc Binary files /dev/null and b/Items/Accessories/Vanity/Xyk_Body2.png differ diff --git a/Items/Accessories/Vanity/Xyk_Legs2.png b/Items/Accessories/Vanity/Xyk_Legs2.png new file mode 100644 index 0000000000..c27c3ea3d2 Binary files /dev/null and b/Items/Accessories/Vanity/Xyk_Legs2.png differ diff --git a/Items/Accessories/Vanity/XyksBlessingBlue.cs b/Items/Accessories/Vanity/XyksBlessingBlue.cs index 72d3bf6f0e..800826a3e2 100644 --- a/Items/Accessories/Vanity/XyksBlessingBlue.cs +++ b/Items/Accessories/Vanity/XyksBlessingBlue.cs @@ -20,9 +20,9 @@ namespace CalamityMod.Items.Accessories.Vanity { if (!Main.dedServ) { - EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/XYK_Head", EquipType.Head, this); - EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/XYK_Body", EquipType.Body, this); - EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/XYK_Legs", EquipType.Legs, this); + EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Head", EquipType.Head, this); + EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Body", EquipType.Body, this); + EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Legs", EquipType.Legs, this); } } diff --git a/Items/Accessories/Vanity/XyksBlessingOrange.cs b/Items/Accessories/Vanity/XyksBlessingOrange.cs index d5036922b0..7970e53879 100644 --- a/Items/Accessories/Vanity/XyksBlessingOrange.cs +++ b/Items/Accessories/Vanity/XyksBlessingOrange.cs @@ -20,9 +20,9 @@ namespace CalamityMod.Items.Accessories.Vanity { if (!Main.dedServ) { - EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/XYK_Head", EquipType.Head, this); - EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/XYK_Body", EquipType.Body, this); - EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/XYK_Legs", EquipType.Legs, this); + EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Head", EquipType.Head, this); + EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Body2", EquipType.Body, this); + EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Legs2", EquipType.Legs, this); } } diff --git a/Projectiles/Typeless/XykDeathAnim.cs b/Projectiles/Typeless/XykDeathAnim.cs index a2e9c83dc3..61700202c9 100644 --- a/Projectiles/Typeless/XykDeathAnim.cs +++ b/Projectiles/Typeless/XykDeathAnim.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.timeLeft = 32; - Projectile.scale = 0.55f; // Normally we dont put scale here, but it doesn't matter this time + Projectile.scale = 0.55f; // Normally we don't put scale here, but it doesn't matter this time } public override void AI()