Cursed Inferno no longer reduces dr. Armor Crunch now reduces enemy dr instead of enemy defense.

This commit is contained in:
ben-tk authored and Cameron Ewell committed 2022-10-03 12:03:21 -04:00
1 parent 9536cdcb6a
commit 029642a42b
5 files changed
+7 -15

No files matched your search

-4
View File
@@ -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;
+2
View File
@@ -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()
{
+2 -7
View File
@@ -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))
{
+1 -1
View File
@@ -2739,7 +2739,7 @@ namespace CalamityMod.CalPlayer
if (aCrunch && !laudanum)
{
Player.statDefense -= ArmorCrunch.DefenseReduction;
Player.endurance *= 0.33f;
Player.endurance *= ArmorCrunch.MultiplicativeDamageReductionPlayer;
}
if (wither)
+2 -3
View File
@@ -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<GenericDamageClass>() -
@@ -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;
}