From 7e5abf39d3bf2b69b670afce2dd85a30a1e2f796 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 23 Jun 2025 12:07:06 +0700 Subject: [PATCH] coalesced reaver tank healing functions --- Balancing/BalancingConstants.cs | 1 - CalPlayer/CalamityPlayer.cs | 5 ----- CalPlayer/CalamityPlayerLifeRegen.cs | 8 -------- CalPlayer/CalamityPlayerMiscEffects.cs | 4 ---- CalPlayer/CalamityPlayerOnHit.cs | 15 --------------- Items/Armor/Reaver/ReaverHeadTank.cs | 3 +-- .../Mods.CalamityMod.Items.Armor.Hardmode.hjson | 4 +--- 7 files changed, 2 insertions(+), 38 deletions(-) diff --git a/Balancing/BalancingConstants.cs b/Balancing/BalancingConstants.cs index 562772742a..22226fc9c7 100644 --- a/Balancing/BalancingConstants.cs +++ b/Balancing/BalancingConstants.cs @@ -125,7 +125,6 @@ // Life steal cooldown multipliers used for armor set bonuses internal static readonly float LifeStealSetBonusCooldownMultiplier = 2f; - internal static readonly float LifeStealReaverTankCooldownMultiplier = 4f; // Base life steal caps from vanilla (aka, how much life steal the player is allowed before it goes on cooldown) internal static readonly float LifeStealCap_Classic = 80f; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f36ff21e34..a0b4847f8e 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1146,8 +1146,6 @@ namespace CalamityMod.CalPlayer public int titanCooldown = 0; public bool umbraphileSet = false; public bool reaverSpeed = false; - public bool reaverRegen = false; - public int reaverRegenCooldown = 0; public bool reaverDefense = false; public bool reaverExplore = false; public bool fathomSwarmer = false; @@ -2347,7 +2345,6 @@ namespace CalamityMod.CalPlayer avertorBonus = false; - reaverRegen = false; reaverSpeed = false; reaverDefense = false; reaverExplore = false; @@ -3138,8 +3135,6 @@ namespace CalamityMod.CalPlayer lunicCorpsSet = false; lunicCorpsLegs = false; reaverSpeed = false; - reaverRegen = false; - reaverRegenCooldown = 0; reaverDefense = false; reaverExplore = false; shadeRegen = false; diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 68fda829e7..4bda2f21f5 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -693,14 +693,6 @@ namespace CalamityMod.CalPlayer else pinkCandleHealFraction = 0D; - if (reaverRegen && reaverRegenCooldown >= 60) - { - reaverRegenCooldown = 0; - - if (Player.statLife != Player.statLifeMax2 && !noLifeRegen) - Player.HealPlayer(1, HealTextType.None); - } - if (BloomStoneRegen) { float dayTimeCompletion = !Main.dayTime ? 1f : (float)(Main.time / Main.dayLength); diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index e8d40638b6..d9654341ec 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2209,10 +2209,6 @@ namespace CalamityMod.CalPlayer canFireGodSlayerRangedProjectile = true; canFireBloodflareRangedProjectile = true; } - if (reaverRegenCooldown < 60 && reaverRegen) - reaverRegenCooldown++; - else - reaverRegenCooldown = 0; if (auralisAurora > 0) auralisAurora--; if (auralisAuroraCooldown > 0) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 153d831629..067448175b 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -618,9 +618,6 @@ namespace CalamityMod.CalPlayer if (!item.CountsAsClass() && Player.meleeEnchant == 7) Projectile.NewProjectile(source, position, Player.velocity, ProjectileID.ConfettiMelee, 0, 0f, Player.whoAmI); - if (reaverDefense) - Player.lifeRegenTime += 1; - if (npcCheck) { if (item.CountsAsClass() && hideOfDeus && hideOfDeusTimer == 0) @@ -699,9 +696,6 @@ namespace CalamityMod.CalPlayer if (theBee && lifeAndShieldCondition) SoundEngine.PlaySound(SoundID.Item110, proj.Center); - if (reaverDefense) - Player.lifeRegenTime += 1; - if (npcCheck) { if (astralStarRain && crit && astralStarRainCooldown <= 0) @@ -1395,12 +1389,6 @@ namespace CalamityMod.CalPlayer } } - if (reaverDefense) - { - double healMult = 0.1D - proj.numHits * 0.05D; - Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), (int)Math.Round(damage * healMult), BalancingConstants.LifeStealReaverTankCooldownMultiplier); - } - if (proj.CountsAsClass()) { if (xerocSet && xerocDmg <= 0 && Player.ownedProjectileCounts[ProjectileType()] < 3 && Player.ownedProjectileCounts[ProjectileType()] < 3) @@ -1438,9 +1426,6 @@ namespace CalamityMod.CalPlayer gladiatorTimer = 300; } } - - if (reaverDefense) - Player.DoLifestealDirect(target, (int)Math.Round(damage * 0.1f), BalancingConstants.LifeStealReaverTankCooldownMultiplier); } } #endregion diff --git a/Items/Armor/Reaver/ReaverHeadTank.cs b/Items/Armor/Reaver/ReaverHeadTank.cs index 0aff26f2c8..cfed218502 100644 --- a/Items/Armor/Reaver/ReaverHeadTank.cs +++ b/Items/Armor/Reaver/ReaverHeadTank.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor.Reaver player.thorns += 0.33f; player.moveSpeed -= 0.3f; player.statDefense += 10; - player.lifeRegen += 3; + player.lifeRegen += 10; player.aggro += 600; modPlayer.reaverDefense = true; modPlayer.wearingRogueArmor = true; @@ -54,7 +54,6 @@ namespace CalamityMod.Items.Armor.Reaver { player.GetDamage() -= 0.3f; player.endurance += 0.15f; - player.Calamity().reaverRegen = true; player.statLifeMax2 += 50; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson index 23e2a20942..3c36a9195c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson @@ -480,14 +480,12 @@ ReaverHeadTank: { ''' 15% increased damage reduction but 30% decreased damage +50 max life - Restores 1 HP every second, this applies separately from life regen ''' SetBonus: ''' - +10 defense and +1.5 HP/s life regen + +10 defense and +5 HP/s life regen Enemies are more likely to target you Reduces the life regen lost from damage over time debuffs by 20% - All attacks steal life and speed up the rate of life regen 30% decreased movement speed and flight time Enemy damage is reflected and summons a thorn spike Reaver Rage activates when you are damaged