diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 63fe5c6bf3..1bdf53e5bd 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -276,6 +276,9 @@ namespace CalamityMod.Balancing // 15% resist to Enforcer projectiles. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType())))); + //55% resist to Dynamic Pursuer + NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType(), ProjectileType(), ProjectileType())))); + #endregion Ares #region Artemis and Apollo @@ -292,8 +295,8 @@ namespace CalamityMod.Balancing #region Thanatos - // 85% resist to Dynamic Pursuer (the whole thing lol). - NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.15f, ProjectileType(), ProjectileType(), ProjectileType())))); + // 50% resist to Dynamic Pursuer (the whole thing lol). + NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType(), ProjectileType(), ProjectileType())))); // 65% resist to true melee. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new TrueMeleeResistBalancingRule(0.35f)))); @@ -316,8 +319,8 @@ namespace CalamityMod.Balancing // 40% resist to Rancor. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType())))); - // 40% resist to Wrathwing stealth strike. - NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType())))); + // 50% resist to Wrathwing stealth strike. + NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType())))); // 40% resist to Yharim's Crystal. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType())))); diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3be90b77d3..fd19aee4ec 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5193,7 +5193,7 @@ namespace CalamityMod.CalPlayer num79 *= num80; float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; - int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.08), knockBack * 0.5f, Player.whoAmI); + int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.075), knockBack * 0.5f, Player.whoAmI); if (p.WithinBounds(Main.maxProjectiles)) Main.projectile[p].DamageType = DamageClass.Generic; //in case melee/rogue variants bug out diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 25b01033b9..1af1af19be 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -492,6 +492,7 @@ namespace CalamityMod.CalPlayer { int astralOreID = ModContent.TileType(); int auricOreID = ModContent.TileType(); + int chaotiOreID = ModContent.TileType(); int auricRejectionDamage = 300; float auricRejectionKB = Player.noKnockback ? 20f : 40f; @@ -506,6 +507,10 @@ namespace CalamityMod.CalPlayer if (tile.TileType == astralOreID) Player.AddBuff(ModContent.BuffType(), 2); + // You will need to set each resistant item here for burning as it gets bypassed for somereason + if (tile.TileType == chaotiOreID) + Player.AddBuff(BuffID.Burning, 2); + // Auric Ore causes an Auric Rejection unless you are wearing Auric Armor // Auric Rejection causes an electrical explosion that yeets the player a considerable distance else if (tile.TileType == auricOreID && !auricSet) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index aaea1e14f1..e43649f1be 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -991,7 +991,7 @@ namespace CalamityMod.CalPlayer break; } } - int damage = (int)Player.GetTotalDamage().ApplyTo(200); + int damage = (int)Player.GetTotalDamage().ApplyTo(180); int projectileIndex = Projectile.NewProjectile(spawnSource, projTileX * 16 + 8, projTileY * 16 - 24, 0f, 0f, ProjectileType(), damage, 15f, Main.myPlayer, 16f, 16f); if (projectileIndex.WithinBounds(Main.maxProjectiles)) { diff --git a/Items/Weapons/Rogue/DynamicPursuer.cs b/Items/Weapons/Rogue/DynamicPursuer.cs index 9841aab32a..68aad0209a 100644 --- a/Items/Weapons/Rogue/DynamicPursuer.cs +++ b/Items/Weapons/Rogue/DynamicPursuer.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue { CalamityGlobalItem modItem = Item.Calamity(); - Item.damage = 3300; + Item.damage = 2550; Item.DamageType = RogueDamageClass.Instance; Item.width = 30; @@ -49,10 +49,10 @@ namespace CalamityMod.Items.Weapons.Rogue Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 25f; + Item.shootSpeed = 28f; modItem.UsesCharge = true; - modItem.MaxCharge = 320f; // Tesla Cannon = 250f + modItem.MaxCharge = 300f; // Tesla Cannon = 250f modItem.ChargePerUse = 0.5f; // Tesla Cannon = 0.9f } diff --git a/Projectiles/Rogue/DynamicPursuerElectricity.cs b/Projectiles/Rogue/DynamicPursuerElectricity.cs index fb94813b59..16e008b676 100644 --- a/Projectiles/Rogue/DynamicPursuerElectricity.cs +++ b/Projectiles/Rogue/DynamicPursuerElectricity.cs @@ -13,11 +13,10 @@ namespace CalamityMod.Projectiles.Rogue { internal PrimitiveTrail LightningDrawer; - public const int MaximumBranchingIterations = 5; + public const int MaximumBranchingIterations = 3; public const float LightningTurnRandomnessFactor = 1.7f; - public const int Lifetime = 60; public ref float InitialVelocityAngle => ref Projectile.ai[0]; - // Technically not a ratio, and more of a seed, but it is used in a 0-2pi squash + // Technically not a ratio, and more of a seed, but its used in a 0-2pi squash // later in the code to get an arbitrary unit vector (which is then checked). public ref float BaseTurnAngleRatio => ref Projectile.ai[1]; public ref float AccumulatedXMovementSpeeds => ref Projectile.localAI[0]; @@ -36,16 +35,18 @@ namespace CalamityMod.Projectiles.Rogue } public override void SetDefaults() { - Projectile.width = 28; - Projectile.height = 28; + Projectile.width = 30; + Projectile.height = 30; Projectile.friendly = true; Projectile.alpha = 255; Projectile.penetrate = 2; Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.extraUpdates = 10; - Projectile.timeLeft = Lifetime * Projectile.extraUpdates; + Projectile.timeLeft = 60 * Projectile.extraUpdates; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 3600; //Adjusted to take note of the extra updates // Readjust the velocity magnitude the moment this projectile is created // to make velocity setting outside the scope of this projectile less irritating @@ -60,8 +61,9 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.frameCounter++; float adjustedTimeLife = Projectile.timeLeft / Projectile.MaxUpdates; - Projectile.Opacity = Utils.GetLerpValue(0f, 9f, adjustedTimeLife, true) * Utils.GetLerpValue(Lifetime, Lifetime - 3f, adjustedTimeLife, true); - Projectile.scale = Projectile.Opacity; + Projectile.scale = (float)Math.Sin(MathHelper.Pi * Projectile.timeLeft / (45f * (Projectile.MaxUpdates - 1))) * 4f; + if (Projectile.scale > 1f) + Projectile.scale = 1f; Lighting.AddLight(Projectile.Center, Color.Blue.ToVector3()); if (Projectile.frameCounter >= Projectile.extraUpdates * 2) @@ -114,16 +116,6 @@ namespace CalamityMod.Projectiles.Rogue } } - public override void Kill(int timeLeft) - { - Projectile.ExpandHitboxBy(60); - Projectile.maxPenetrate = -1; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20; - Projectile.Damage(); - } - internal float WidthFunction(float completionRatio) { float baseWidth = MathHelper.Lerp(2f, 6f, (float)Math.Sin(MathHelper.Pi * 4f * completionRatio) * 0.5f + 0.5f) * Projectile.scale; diff --git a/Projectiles/Rogue/DynamicPursuerProjectile.cs b/Projectiles/Rogue/DynamicPursuerProjectile.cs index fee1337a9a..0c799a7eee 100644 --- a/Projectiles/Rogue/DynamicPursuerProjectile.cs +++ b/Projectiles/Rogue/DynamicPursuerProjectile.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue } public const float MaxTargetSearchDistance = 480f; public float ReturnAcceleration = 0.5f; - public float ReturnMaxSpeed = 18f; + public float ReturnMaxSpeed = 24f; public float ElectricVelocityCharge = 0f; public float LaserVelocityCharge = 0f; public bool Ricochet = false; @@ -48,6 +48,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = -1; Projectile.extraUpdates = 1; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 360; } public override void AI() @@ -77,13 +79,13 @@ namespace CalamityMod.Projectiles.Rogue else if (Ricochet) { if (nextTarget != null) - Projectile.velocity = (float)Math.Pow(Math.E, Time / 100)*(nextTarget.Center - Projectile.Center).SafeNormalize(Vector2.One); + Projectile.velocity = (float)Math.Pow(Math.E, Time / 250)*(nextTarget.Center - Projectile.Center).SafeNormalize(Vector2.One); ElectricVelocityCharge += Projectile.velocity.Length(); if (ElectricVelocityCharge >= 300f) { - ElectricVelocityCharge -= 300f; + ElectricVelocityCharge = 0f; AttemptToFireElectricity((int)(Projectile.damage * 0.25)); } } @@ -167,7 +169,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.myPlayer == Projectile.owner) Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * 2f, Projectile.owner); - if (!Main.dedServ) + { for (int i = 0; i < 220; i++) { @@ -192,7 +194,7 @@ namespace CalamityMod.Projectiles.Rogue //Retarget Ricochet = true; NPC newTarget = null; - float closestNPCDistance = 10000f; + float closestNPCDistance = 3000f; float targettingDistance = 1000f; diff --git a/Tiles/Ores/ChaoticOre.cs b/Tiles/Ores/ChaoticOre.cs index a78a100c17..221e1320c2 100644 --- a/Tiles/Ores/ChaoticOre.cs +++ b/Tiles/Ores/ChaoticOre.cs @@ -6,6 +6,8 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using static Terraria.ModLoader.PlayerDrawLayer; + namespace CalamityMod.Tiles.Ores { public class ChaoticOre : ModTile @@ -34,6 +36,21 @@ namespace CalamityMod.Tiles.Ores public override void NearbyEffects(int i, int j, bool closer) { + Tile tile = Main.tile[i, j]; + Tile up = Main.tile[i, j - 1]; + Tile up2 = Main.tile[i, j - 2]; + if (closer && Main.rand.NextBool(30) && !up.HasTile && !up2.HasTile) + { + Dust dust; + dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 16, 16, 127, 0f, -10f, 47, new Color(255, 255, 255), 1.0465117f)]; + dust.noGravity = true; + dust.fadeIn = 1.2209302f; + + dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 16, 16, 31, 0f, -1.9069767f, 195, new Color(255, 255, 255), 1f)]; + dust.noGravity = false; + dust.fadeIn = 1.4209302f; + + } if (!closer && j < Main.maxTilesY - 205) { if (Main.tile[i, j].LiquidAmount <= 0) @@ -71,8 +88,7 @@ namespace CalamityMod.Tiles.Ores { num = fail ? 1 : 3; } - - public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) { r = 0.04f; g = 0.00f;