Damage Reduction

**Damage Reduction (DR)** is a stat that decreases damage received by the player or other NPCs based on a percentage. This is different from defense, which decreases damage by flat values. Each percentage point of DR is additive, incrementing a total value that the damage then gets decreased by.

## Player Damage Reduction

The Calamity Mod adjusts the effective percentage of this stat for the player with a diminishing scale, with all DR reducing effects (such as Cursed Inferno) being calculated after it has been scaled. NPC DR is not affected by this diminishing scaling.

The scaling formula is: 1 - 1⁄(1 + dr)

For example, if the player has 25% DR, it will be scaled to 1 - 1⁄(1 + 0.25) = 0.2, or 20% DR.

Certain vanilla items also have their damage reduction boosts adjusted:

* The Worm Scarf only provides a 10% damage reduction instead of 17%. This brings it in line with the Bloody Worm Scarf.
* The Frozen Turtle Shell only provides a 15% damage reduction when under 50% health instead of 25%.

### List of Damage Reduction Boosts

The following include a list of items, buffs, and debuffs added in the Calamity Mod that can increase or decrease damage reduction stat.

### Alternative Damage Reduction

Alternative damage reduction is a hidden player statistic separate from normal damage reduction. It directly modifies damage taken, and is affected differently by the scaling formula. The following tables show a list of damage reductions that are **additive** of each other, including sources inflicted to the player and external sources such as enemy debuffs.

#### Calculation

After the total damage reduction is calculated, several effects may take place that will modify this stat:

* If the player is inflicted with Armor Crunch, the final value is multiplied by 0.33.
* If the player is inflicted with War Cleave, the final value is multiplied by 0.75.
* If the player has normal DR stat, the final value is multiplied by (1 - DR). The DR stat used is calculated *after* being accounted for regular DR scaling.
* After *all* calculations, the final value is scaled using the same formula as the normal DR stat: 1 - 1⁄(1 + dr)

For example, if a player receives **200** contact damage from an enemy inflicted by Temporal Sadness while under the effects of Blazing Core, Bloody Worm Scarf, Corruption Effigy, Endurance Potion, and War Cleave.

* First, all sources of contact damage reduction are added, including Temporal Sadness and Corruption Effigy, totaling `50% - 20%` = 30%.
* Next, the value is multiplied by War Cleave's multiplier, totaling `30% * 0.75` = 22.5%.
* Then, the normal DR from Blazing Core, Bloody Worm Scarf, Corruption Effigy, and Endurance Potion is accounted. The player's unscaled normal DR is `10% + 10% + 10% - 20%` = 10%, and final normal DR is `(1 - 1 / (1 + 0.10)) * 100%` = **9.09%**.
* Therefore, the alternative DR reduces to `22.5% * (1 - 0.0909)` = 20.45%.
* Finally, the alternative DR goes through scaling and results in a final alternative DR of `(1 - 1 / (1 + 0.2045)) * 100%` = **16.98%**.
* In the end, the player will take `200 * (1 - 0.0909) * (1 - 0.1698)` = **151** damage.

## Enemy Damage Reduction

Unlike player damage reduction, enemy damage reduction is a stat not available in vanilla, but rather added by the Calamity Mod to various NPCs including vanilla ones. Similar to the player, the enemy DR is calculated after defense.

Certain debuffs can reduce enemy damage reduction:

* Kami Flu has a damage reduction multiplier of 0.8x.
* Cursed Inferno has a damage reduction multiplier of 0.8x.
* War Cleave has a damage reduction multiplier of 0.75x.
* Betsy's Curse has a damage reduction multiplier of 0.66x.
* Marked has a damage reduction multiplier of 0.5x.

Certain enemies such as enraged Supreme Calamitas and the Dungeon Guardian have a 99.9999% damage reduction, effectively taking 1/1,000,000 of the original damage dealt. These enemies' damage reduction cannot be altered by any debuffs.

### List of NPCs with Damage Reduction

#### Vanilla NPCs

 This table requires JavaScript to be enabled and site tooltips to be turned on to be displayed.You can also view the data on another page.

### Reactive Damage Reduction

Every boss from both Vanilla Terraria and the Calamity Mod has a value associated with it that represents a rough estimate of how long it should take to kill outside of the Boss Rush, timed from when it spawns. If the player appears to be dealing too much damage within the intended kill time, then the boss gains extra DR. This DR gain is calculated after everything else, meaning it cannot be affected by debuffs.

This mechanic takes into account the time elapsed and the boss's health. The time elapsed is divided by kill time for the **Time Ratio** value, while the boss's current health is divided by its total health for the **Health Ratio** value. Reactive DR does not apply under the following conditions:

* If the sum of the two aforementioned values is greater than or equal to 1
* There is no kill time value assigned
* The player is in Boss Rush.
* Any boss of the higher assigned tier is defeated. If the boss is in tier 6, defeating it will permanently disable Reactive DR for that boss.
	+ The only exception is Providence, the Profaned Goddess at night or in Malice Mode.

In addition, there is a **Scale Factor** that varies on certain conditions. The default value of the multiplier is 1.5, which increases to 2 in Malice Mode. Certain bosses have a higher multiplier, including:

* XM-05 Thanatos: 2
* Aquatic Scourge, Astrum Deus, The Destroyer, and Storm Weaver: 3
* Aquatic Scourge, Astrum Deus, Desert Scourge, The Destroyer, and Storm Weaver in Malice Mode: 4
* Providence, the Profaned Goddess at night or in Malice Mode: 10

In Normal Mode and Expert Mode, the scale factor is multiplied by 0.67 and 0.85 respectively.

The damage reduction gained is based on a boss's Base DR, which is prior to any other effects such as debuffs. Using the four values mentioned, the total amount of damage reduction gained is equal to:
[(1 - Base DR) \* Scale Factor] - [(1 - Base DR) \* Scale Factor]⁄(2 - Time Ratio - Health Ratio)

For example, suppose Cryogen reaches 30% health within 36 seconds while it is inflicted with the Cursed Inferno debuff, in Revengeance Mode:

* Cryogen's base DR is 10% or 0.10.
* The multiplier is equal to 1.5, as it is not in Malice Mode.
* Cryogen's kill time value is 180 seconds. As such, the time ratio is equal to `36 / 180` = 0.20.
* The health ratio is equal to 30% or 0.30.
* Therefore, the amount of reactive DR gained is equal to `(1 - 0.10) * 1.5 - (1 - 0.10) \* 1.5⁄(2 - 0.20 - 0.30)` = `1.35 - (1.35 / 1.50)` = 0.45 or **45%**.
* Cryogen is also affected by Cursed Inferno, which multiplies damage reduction by 0.8x, from 10% to **8%**.
* The two values combine into a total, instantaneous damage reduction of **53%**.

#### Timed Aggression

All bosses in Revengeance Mode or higher become more aggressive and enter their later phases regardless of their current HP if the player takes too long to defeat them. The condition for this to activate is for the player to be calculated to take 50% longer than the expected kill time, or higher.

For example, King Slime has an expected kill time of 60, and summons the Crown Jewel at 50% of its health. This means it is expected that King Slime will summon the Crown Jewel at 30 seconds into the fight. However, if the player takes at least 50% longer (i.e. King Slime is still not below 50% at 45 seconds into the fight), it will enter that phase regardless, and summon the Crown Jewel.

#### Kill Time Table

The following includes the kill time values for each boss. Several bosses have multiple values for different phases.

## Trivia

* The kill time-based Damage Reduction system is inspired by a similar mechanic from *The Binding of Isaac: Rebirth*.