From 16a071d572dbe6171e4e110aa44a84ea2a9bb05c Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 24 Mar 2026 18:22:59 -0500 Subject: [PATCH] Lifesteal rebalancing Reduced the lifesteal counter recovery speed from 0.15 -> 0.1(9 -> 6 HP/s) (classic, 0.2 -> 0.15). This nerfs all lifesteal item's HP/s by 33%, counterbalancing the major buff BS gave lifesteal pool. - Mana Polarizer 1.75x -> 2x cooldown (3 HP/s) - Gilded Proboscis 1x -> 0.5x cooldown (12 hp/s, but Proboscis never hits the current cap it has so this leaves it overall the same) - Hydothermic Mage 1.25x -> 1x cooldown, but added it's own limiter of 3 HP/s. This nerfs its lifesteal but means it no longer consumes the entire lifesteal pool, allowing comboing with other lifesteal sources. - Omega Blue 0.5x (18/s) -> 0.4x. (15/s) This is slightly weaker than the old lifesteal amount in HP/s, but has a slightly larger lifesteal pool. - Spectre Healing 1x (9/s) -> 0.66x (9/s). Keeps it the same strength, but reworks Spectre Healing to not waste lifesteal so it can take advantage of the pool. Set Bonus now reduces dmg with it on by 20% - Removed lifesteal from Bloodflare Rogue, replaced with +2 HP/s flat. Nerf on it's own, but a buff overall since now it can be used with lifesteal gear. - Reduced Monstrous Knife count from 4-7 to 3-5 as it was vastly overperforming in damage, 4x -> 3x cooldown mult (2/s) --- Balancing/BalancingConstants.cs | 8 ++-- CalPlayer/CalamityPlayer.cs | 1 + CalPlayer/CalamityPlayerMiscEffects.cs | 4 ++ CalPlayer/CalamityPlayerOnHit.cs | 11 +++-- ILEditing/BalancingILChanges.cs | 44 +++++++++++++++++++ ILEditing/ILChangesLoading.cs | 2 +- Items/Armor/Bloodflare/BloodflareHeadRogue.cs | 4 +- .../Hydrothermic/HydrothermicHeadMagic.cs | 2 +- Items/CalamityGlobalItem.cs | 2 +- Items/Weapons/Melee/MonstrousKnives.cs | 2 +- ...CalamityMod.Items.Armor.PostMoonLord.hjson | 2 +- .../Mods.CalamityMod.Vanilla.Armor.hjson | 2 +- Projectiles/Melee/MonstrousKnife.cs | 2 +- .../Melee/Spears/GildedProboscisProj.cs | 2 +- Projectiles/Typeless/OmegaBlueTentacle.cs | 2 +- 15 files changed, 70 insertions(+), 20 deletions(-) diff --git a/Balancing/BalancingConstants.cs b/Balancing/BalancingConstants.cs index e8d05be133..9135f782d7 100644 --- a/Balancing/BalancingConstants.cs +++ b/Balancing/BalancingConstants.cs @@ -126,11 +126,11 @@ internal static readonly float LifeStealRecoveryRate_Classic = 0.6f; internal static readonly float LifeStealRecoveryRate_Expert = 0.5f; - // Nerfs the life steal recovery rate in Classic from 0.6 to 0.2 (36 HP/s to 12 HP/s) - internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.4f; + // Nerfs the life steal recovery rate in Classic from 0.6 to 0.15 (36 HP/s to 9 HP/s) + internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.45f; - // Nerfs the life steal recovery rate in Expert from 0.5 to 0.15 (30 HP/s to 9 HP/s) - internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.35f; + // Nerfs the life steal recovery rate in Expert from 0.5 to 0.1 (30 HP/s to 6 HP/s) + internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.4f; #endregion #region Rogue Base Stats diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 46ccedfca7..4049178508 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1272,6 +1272,7 @@ namespace CalamityMod.CalPlayer public bool plaguebringerPatronSet = false; public bool plaguebringerCarapace = false; public float ataxiaDmg; + public float hydroHealTimer = 0; public bool ataxiaMage = false; public bool ataxiaGeyser = false; public float xerocDmg; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index bfad7730dd..b5902d4576 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2250,6 +2250,10 @@ namespace CalamityMod.CalPlayer ataxiaDmg -= 1.5f; if (ataxiaDmg < 0f) ataxiaDmg = 0f; + if (hydroHealTimer > 0f) + hydroHealTimer -= 0.05f; + if (ataxiaDmg < 0f) + ataxiaDmg = 0f; if (xerocDmg > 0f) xerocDmg -= 2f; if (xerocDmg < 0f) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index ae18de7e06..1f4a128a71 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1327,21 +1327,20 @@ namespace CalamityMod.CalPlayer //Nanotech has the same heal as Electrician's glove Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, electricianGlove ? 10 : 5, 2f); - if (bloodflareThrowing && proj.CountsAsClass() && crit) - Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, 2, 1.5f); - if (proj.CountsAsClass() && Player.HeldItem.CountsAsClass()) { if (manaOverloader) { double healMult = 0.1D - proj.numHits * 0.025D; - Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), (int)Math.Round(damage * healMult), 1.75f); + Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), (int)Math.Round(damage * healMult), 2); } - if (ataxiaMage) + if (ataxiaMage && hydroHealTimer <= 0) { double healMult = HydrothermicHeadMagic.OrbHealingRatio - proj.numHits * HydrothermicHeadMagic.OrbHealingRatioLossPerPierce; - Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), (int)Math.Round(damage * healMult), HydrothermicHeadMagic.OrbHealingCooldownMult); + var heal = (int)Math.Round(damage * healMult); + hydroHealTimer += heal; + Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), heal, HydrothermicHeadMagic.OrbHealingCooldownMult); } } } diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index bb03985b48..60daf878c3 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -686,5 +686,49 @@ namespace CalamityMod.ILEditing return orig(self); } #endregion + + #region Adjust Spectre Healing lifesteal cost + /// + /// Reimplemnts our own implementation of Spectre Healing so we can customize effects + /// Also means it will no longer reduce lifesteal cooldown when hitting with non-magic attacks, and not proc if every player is full HP + /// + /// + /// + /// + /// + /// + private static void AdjustSpectreHealing(On_Projectile.orig_ghostHeal orig, Projectile self, int dmg, Vector2 Position, Entity victim) + { + float HealingMultiplier = 0.2f; + float LifestealCooldownMult = 0.66f; + + var owner = Main.player[self.owner]; + HealingMultiplier -= self.numHits * 0.05f; + int AmountToHeal = (int)Math.Round(dmg * HealingMultiplier); + if (!self.magic || AmountToHeal <= 0 || Main.player[Main.myPlayer].lifeSteal <= 0f) + { + return; + } + float MissingLifeGoal = 0f; + int targetPlayer = self.owner; + foreach (var player in Main.ActivePlayers) + { + if (!player.dead && ((!self.hostile && !owner.hostile) || owner.team == player.team) && self.Distance(player.Center) <= 3000f) + { + int MissingLife = player.statLifeMax2 - player.statLife; + if ((float)MissingLife > MissingLifeGoal) + { + MissingLifeGoal = MissingLife; + targetPlayer = player.whoAmI; + } + } + } + AmountToHeal = (int)MathHelper.Min(AmountToHeal, MissingLifeGoal); + if (AmountToHeal <= 0) + return; + owner.lifeSteal -= AmountToHeal * LifestealCooldownMult; + Projectile.NewProjectile(self.GetSource_OnHit(victim, ProjectileSourceID.ToContextString(ProjectileSourceID.SetBonus_GhostHeal)), Position.X, Position.Y, 0f, 0f, ProjectileID.SpiritHeal, 0, 0f, self.owner, targetPlayer, AmountToHeal); + } + #endregion } } diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 0e39b0ffa5..4b6f044f57 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -3,7 +3,6 @@ using CalamityMod.Tiles.FurnitureExo; using Terraria; using Terraria.DataStructures; using Terraria.GameContent; -using Terraria.GameContent.Biomes; using Terraria.GameContent.Drawing; using Terraria.GameContent.Events; using Terraria.GameContent.ItemDropRules; @@ -112,6 +111,7 @@ namespace CalamityMod.ILEditing On_Projectile.IsDamageDodgable += GFBNurseMeteorUndodgeable; IL_Player.UpdateBuffs += UpdateBuffsBalancingChanges; IL_Player.ApplyVanillaHurtEffectModifiers += RemoveBeetleAndSolarFlareMultiplicativeDR; + On_Projectile.ghostHeal += AdjustSpectreHealing; // Movement speed balance IL_Player.UpdateJumpHeight += FixJumpHeightBoosts; diff --git a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs index 1eb93b9746..1f2d58976c 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs @@ -16,7 +16,8 @@ namespace CalamityMod.Items.Armor.Bloodflare public static float RogueDamageBoost = 0.15f; public static int RogueCritBoost = 10; public static float MoveSpeedBoost = 0.05f; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost, MoveSpeedBoost.ToPercent()); + public static int RegenBonus = 4; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost, MoveSpeedBoost.ToPercent(),RegenBonus.ToRegenPerSecond()); // Set Bonus public static float SetBonusRogueStealth = 1.2f; @@ -52,6 +53,7 @@ namespace CalamityMod.Items.Armor.Bloodflare player.GetDamage() += RogueDamageBoost; player.GetCritChance() += RogueCritBoost; player.moveSpeed += MoveSpeedBoost; + player.lifeRegen += 4; } public override void AddRecipes() diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs b/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs index a6a9ad4c88..1eb312a365 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic public static float OrbDamageCooldownMult = 0.5f; public static double OrbHealingRatio = 0.1D; public static double OrbHealingRatioLossPerPierce = 0.05D; - public static float OrbHealingCooldownMult = 1.25f; + public static float OrbHealingCooldownMult = 1f; public override void SetDefaults() { diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index b43082acc4..d28cad197b 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -953,7 +953,7 @@ namespace CalamityMod.Items } else if (set == "SpectreHealing") { - player.GetDamage() += 0.4f; + player.GetDamage() += 0.2f; player.setBonus = CalamityUtils.GetTextValue("Vanilla.Armor.SetBonus.SpectreHealing"); } else if (set == "SolarFlare") diff --git a/Items/Weapons/Melee/MonstrousKnives.cs b/Items/Weapons/Melee/MonstrousKnives.cs index 72d7cdd46c..aeb2820dcd 100644 --- a/Items/Weapons/Melee/MonstrousKnives.cs +++ b/Items/Weapons/Melee/MonstrousKnives.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Melee xDist *= speedMult; yDist *= speedMult; - int knifeAmt = Main.rand.Next(4, 7); + int knifeAmt = Main.rand.Next(3, 5); for (int i = 0; i < knifeAmt; i++) { float xVec = xDist; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 071dab3909..b6b8d342ed 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -243,6 +243,7 @@ BloodflareHeadRogue: { ''' {$Common.RogueDamage} and {$Common.RogueCrit@1} {$CommonItemTooltip.PercentIncreasedMovementSpeed@2} + Increases regeneration by {3} HP/s ''' SetBonus: ''' @@ -252,7 +253,6 @@ BloodflareHeadRogue: { SetBonusEffect: ''' Grants {0} defense when above {1}% life - Rogue critical strikes have lifesteal {$BloodflareBodyArmor.CommonSetBonus} ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index 037e38f91c..bcc871f221 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -121,7 +121,7 @@ SetBonus: { ''' SpectreHealing: ''' - Converts magic damage to healing force + Reduces Magic damage by 20% and converts it to healing force Magic damage done to enemies heals the player with lowest health ''' } diff --git a/Projectiles/Melee/MonstrousKnife.cs b/Projectiles/Melee/MonstrousKnife.cs index 8f2abedb44..9ba7015b77 100644 --- a/Projectiles/Melee/MonstrousKnife.cs +++ b/Projectiles/Melee/MonstrousKnife.cs @@ -45,6 +45,6 @@ namespace CalamityMod.Projectiles.Melee } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, 1, 4f); //4x cooldown = 23.3 HP bank, 2.25 hp/s refill + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, 1, 3f); //3x cooldown = 23.3 HP bank, 2 hp/s refill } } diff --git a/Projectiles/Melee/Spears/GildedProboscisProj.cs b/Projectiles/Melee/Spears/GildedProboscisProj.cs index b61bd6042b..817f251d32 100644 --- a/Projectiles/Melee/Spears/GildedProboscisProj.cs +++ b/Projectiles/Melee/Spears/GildedProboscisProj.cs @@ -260,7 +260,7 @@ namespace CalamityMod.Projectiles.Melee.Spears public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 900); - Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, (int)Math.Round(hit.Damage * 0.0015)); + Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, (int)Math.Round(hit.Damage * 0.0015),0.5f); if (Projectile.damage > 1) Projectile.damage = (int)(Projectile.damage * 0.925f); } diff --git a/Projectiles/Typeless/OmegaBlueTentacle.cs b/Projectiles/Typeless/OmegaBlueTentacle.cs index 2febbae82d..e55fe098b7 100644 --- a/Projectiles/Typeless/OmegaBlueTentacle.cs +++ b/Projectiles/Typeless/OmegaBlueTentacle.cs @@ -174,7 +174,7 @@ namespace CalamityMod.Projectiles.Typeless modifiers.SetCrit(); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Owner.DoLifestealDirect(target, 10 * hit.Damage / Projectile.damage, 0.5f); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Owner.DoLifestealDirect(target, 10 * hit.Damage / Projectile.damage, 0.33f); public override bool PreDraw(ref Color lightColor) {