Defense damage is a mechanic that makes certain enemies' and bosses' attacks reduce the player's defense and Damage Reduction on hit. The amount of defense damage depends on the actual damage of the enemy or projectile, the mode and the stage of the game. Whenever defense damage is taken, a special sound effect plays and a gray number pops up above the Player, showing the amount of defense damage.
Upon getting hit by an attack with defense damage, the player's defense stat is reduced by 15% of the damage taken up to a maximum of 25% of the player's defense. The Draedon's Heart reduces defense damage by 50%. If a boss is alive, defense damage can't be lower than a certain value:
Defense can't be reduced below 0 due to defense damage, and is set to 0 in case enough defense damage is received.
After all invincibility frames wear off and an additionalof a second (10 ticks) has passed, defense damage will decrease (i.e. lost defense will start to recover). The rate is dependent on two values:
- How long the player has been recovering from defense damage (currentRecovery)
- The total amount of time the player is currently going to be recovering from defense damage for (totalRecovery)
TotalRecovery has a base value of of a second, and is incremented by anotherof a second each time the player takes more defense damage while recovering. This also resets currentRecovery back to 0. Defense damage is decreased linearly based on . So if a player is one third of the way through their recovery timer, they will have recovered one third of their lost defense.
Defense damage also reduces Damage Reduction by the following amount:.
NPCs capable of dealing defense damage
- The mode-based floor for defense damage is applied before the cap of 25% of the player's maximum defense. This means theoretically, a player can take less than that floor, if they have sufficiently low maximum defense.
- For example, if a player has less than 60 defense when fighting a post-Moon Lord boss in Malice Mode, they would take less than the 15 defense damage specified in the table.
- A tick is a time unit countable by the software. Most of Terraria's updating logic happens every tick. A tick has the length of 1/60th of a second, hence there are 60 ticks in a second and 3600 ticks in a minute.
|Combat||Damage Reduction • Defense damage • Hit Sounds • Immunity frames • Lifesteal • Minions • Proficiency • Rogue|
|Environment||Biome backgrounds • Events • Music • Status messages|
|Events||Acid Rain • Boss Rush|
|Items||Alternative crafting ingredients • Charge • Consumable • Crafting stations (By Hand) • Drops • Modifiers • Rarity • Recipes • Vanilla item recipes|
|Game||AI • Boss Health Bar • Configuration options • Death Mode • Fishing • Game controls • Lore • Malice Mode • Revengeance Mode • Vanilla changes|
|Player||Adrenaline Meter • Aggro • Buffs and Debuffs • Death Prevention • Defense • Rage Meter|