From 029642a42bb8c1d55ac2e5b2805d65589b32f00a Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Thu, 29 Sep 2022 21:09:28 -0400 Subject: [PATCH] Cursed Inferno no longer reduces dr. Armor Crunch now reduces enemy dr instead of enemy defense. --- Buffs/CalamityGlobalBuff.cs | 4 ---- Buffs/StatDebuffs/ArmorCrunch.cs | 2 ++ CalPlayer/CalamityPlayer.cs | 9 ++------- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 5 ++--- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index 59914be4af..6554df4349 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -179,10 +179,6 @@ namespace CalamityMod.Buffs tip = "Rod of Discord teleports are disabled"; break; - case BuffID.CursedInferno: - tip += ". All damage taken increased by 20%"; - break; - case BuffID.Warmth: tip += ". Grants immunity to Chilled, Frozen and Glacial State"; break; diff --git a/Buffs/StatDebuffs/ArmorCrunch.cs b/Buffs/StatDebuffs/ArmorCrunch.cs index ca1db3922e..6be56b0b77 100644 --- a/Buffs/StatDebuffs/ArmorCrunch.cs +++ b/Buffs/StatDebuffs/ArmorCrunch.cs @@ -7,6 +7,8 @@ namespace CalamityMod.Buffs.StatDebuffs public class ArmorCrunch : ModBuff { public static int DefenseReduction = 15; + public static float MultiplicativeDamageReductionPlayer = 0.33f; + public static float MultiplicativeDamageReductionEnemy = 0.8f; public override void SetStaticDefaults() { diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 329e3356ba..09d172e66a 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4700,7 +4700,7 @@ namespace CalamityMod.CalPlayer if (contactDamageReduction > 0D) { if (aCrunch) - contactDamageReduction *= 0.33; + contactDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer; // Contact damage reduction is reduced by DR Damage, which itself is proportional to defense damage int currentDefense = Player.GetCurrentDefense(false); @@ -4974,7 +4974,7 @@ namespace CalamityMod.CalPlayer if (projectileDamageReduction > 0D) { if (aCrunch) - projectileDamageReduction *= 0.33; + projectileDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer; // Projectile damage reduction is reduced by DR Damage, which itself is proportional to defense damage int currentDefense = Player.GetCurrentDefense(false); @@ -5614,11 +5614,6 @@ namespace CalamityMod.CalPlayer if (Player.beetleDefense && Player.beetleOrbs > 0) damageMult += 0.05 * Player.beetleOrbs; - // If inflicted with Cursed Inferno, take 20% more damage. - // This is the equivalent to reducing DR by 20%, except it works on you even when you have less than 20% DR. - if (Player.onFire2) - damageMult += 0.2; - // Blood Pact gives you a 1/4 chance to be crit, increasing the incoming damage by 25%. if (bloodPact && Main.rand.NextBool(4)) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 15c85136cd..7e4dc1c6a0 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2739,7 +2739,7 @@ namespace CalamityMod.CalPlayer if (aCrunch && !laudanum) { Player.statDefense -= ArmorCrunch.DefenseReduction; - Player.endurance *= 0.33f; + Player.endurance *= ArmorCrunch.MultiplicativeDamageReductionPlayer; } if (wither) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a30e65604a..25e56d9142 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2564,7 +2564,6 @@ namespace CalamityMod.NPCs // Apply modifications to enemy's current defense based on Calamity debuffs. // As with defense and DR, flat reductions apply first, then multiplicative reductions. int effectiveDefense = defense - - (aCrunch > 0 ? ArmorCrunch.DefenseReduction : 0) - (marked > 0 && DR <= 0f ? MarkedforDeath.DefenseReduction : 0) - (wither > 0 ? WitherDebuff.DefenseReduction : 0) - (int)Main.LocalPlayer.GetArmorPenetration() - @@ -2670,8 +2669,8 @@ namespace CalamityMod.NPCs calcDR *= 0.66f; if (npc.Calamity().kamiFlu > 0) calcDR *= KamiFlu.MultiplicativeDamageReduction; - if (npc.onFire2) - calcDR *= 0.8f; + if (npc.Calamity().aCrunch > 0) + calcDR *= ArmorCrunch.MultiplicativeDamageReductionEnemy; return calcDR; }