From 39e477b2cf9501a634d8783e2d3b9db623a34462 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 21 Jan 2021 19:31:35 -0500 Subject: [PATCH] Fixed rage not being gained on damage --- CalPlayer/CalamityPlayer.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 8dc17b746c..0a676e0579 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -7147,11 +7147,10 @@ namespace CalamityMod.CalPlayer if ((godSlayerDamage && damage <= 80) || damage < 1) damage = 1; - // Gain rage based on the amount of damage taken. Safety check on iframes to prevent rage buildup spam. - // Also set the Rage gain cooldown to prevent bizarre abuse cases. - if (!player.immune) + // Gain rage based on the amount of damage taken. Also set the Rage gain cooldown to prevent bizarre abuse cases. + if (CalamityWorld.revenge && CalamityConfig.Instance.Rippers && rageGainCooldown == 0) { - float HPRatio = damage / player.statLifeMax2; + float HPRatio = (float)damage / player.statLifeMax2; rage += rageMax * HPRatio; rageGainCooldown = DefaultRageGainCooldown; // Rage capping is handled in MiscEffects