Defense
Defense is a statistic that determines the decrease in damage taken per hit. The player's defense can be increased by wearing armor and accessories, and temporarily boosted/decreased by various buffs/debuffs. Enemies also have a defense statistic.
Defense cannot be reduced to below 0.[1] Also, the damage dealt to an entity will always be at least 1, regardless of defense (with the exception of a player whose multiplayer ally is wearing a Paladin's Shield).
Some forms of damage are impossible to reduce through defense, e.g. damage from damage over time debuffs like Cursed Inferno or from drowning in water. Damage taken from lava, however, can be reduced through defense.
Some items have the ability of armor penetration, which effectively allows them to ignore part of the target's defense when calculating damage.
Players
Defense gives a flat reduction in damage, i.e. damage is reduced by a fixed amount per hit (as opposed to a multiplicative damage reduction, which would reduce damage by a percentage). It is calculated after the general ±15% damage randomization.
The formula is:net dmg = \lfloorattack dmg - def × factor\rfloor
, where factor
is 0.5
in Classic Mode, 0.75
in Expert Mode(Desktop, Console and Mobile versions), and 1
in Master Mode(Desktop, Console and Mobile versions).[2]
Examples
Enemies
Enemies have a defense statistic just like players do, but they do not gain more protection from defense in Expert Mode or Master Mode. They will always reduce incoming damage by 50% of their defense: net dmg = \lfloorattack dmg - def × 0.5\rfloor
.
Examples
Weapon | Green Slime0 defense | Chaos Elemental30 defense | Paladin50 defense | Sharkron100 defense |
---|---|---|---|---|
Gold Broadsword15 damage | 15 | 1 (0) | 1 (-10) | 1 (-35) |
Meowmere200 damage | 200 | 185 | 175 | 150 |
Boosts
Armor and accessories
A player's defense score can be increased by equipping armor and accessories. Armor usually consists of three items, granting an additional bonus if all pieces match, the set bonus, which may increase the defense score further. Some accessories grant direct defense boosts (see the following table), but all accessories can also be reforged to have defense-increasing modifiers.
See armor for detailed defense information about every piece of armor.
Item | Accessory defense |
---|---|
Frozen Turtle Shell | (Old-gen console and 3DS versions) 30 (25% health or lower) |
Cobalt Shield | 1 |
Obsidian Skull | 1 |
Shackle | 1 |
Obsidian Shield | 2 |
Shield of Cthulhu(Desktop, Console and Mobile versions) | 2 |
Ankh Shield | 4 |
Frozen Shield(Desktop, Console and Mobile versions) | 6 |
Paladin's Shield | 6 |
Berserker's Glove | 8 |
Flesh Knuckles(Desktop, Console and Mobile versions) | 8 |
Hero Shield(Desktop, Console and Mobile versions) | 10 |
Item | Accessory defense |
---|---|
Moon Charm | 3 (only during the night) |
Moon Shell | 3 (only during the night) |
Moon Stone | 4 (only during the night) |
Sun Stone | 4 (only during the day) |
Celestial Shell(Desktop, Console and Mobile versions) | 4 (during the day) 7 (during the night) |
Frozen Turtle Shell | (Old-gen console and 3DS versions) 30 (when below 25% health) |
Modifier | Defense |
---|---|
Hard | 1 |
Guarding | 2 |
Armored | 3 |
Warding | 4 |
Buffs and debuffs
Buffs and debuffs can temporarily alter a player's or an enemy's defense. Currently, there is no buff increasing enemies' defense.
Buff/Debuff | Buff/debuff defense |
---|---|
Well Fed | 2 |
Plenty Satisfied(Desktop, Console and Mobile versions) | 3 |
Exquisitely Stuffed(Desktop, Console and Mobile versions) | 4 |
The Bast Defense(Desktop, Console and Mobile versions) | 5 |
Dryad's Blessing(Desktop, Console and Mobile versions) | 8 |
Ironskin | 8 |
Tipsy | −4 |
Weak | −4 |
Ichor | −15(Desktop, Console and Mobile versions) / −20(Old-gen console and 3DS versions) |
Betsy's Curse(Desktop, Console and Mobile versions) | −40 |
Broken Armor | −50% |
Armor penetration (Desktop, Console and Mobile versions)
Armor penetration is a hidden player statistic that determines the effective amount of the enemy's defense portion that is ignored when dealing damage to it. It works by increasing the damage dealt, and this increment is determined by the following way:[3]
- Calculate the total armor penetration the player has.
- Then, compare the armor penetration value with the target's original defense (i.e. before defense is reduced by certain debuffs).
- If
armor penetration > defense
anddefense >= 0
, the damage is increased by half of the target's defense. - Otherwise, the damage is increased by half of the armor penetration value.
- If
For example, a Duke Fishron in its first phase has 50 defense, and is inflicted with Betsy's Curse(Desktop, Console and Mobile versions), reducing its defense to 10. When using the Blade Staff(Desktop, Console and Mobile versions) and having the Shark Tooth Necklace equipped, the player's armor penetration value will be 30. Since 30 is lower than 50, the Blade Staff's damage would be increased by half of the armor penetration value (15). The Betsy's Curse in this case is irrelevant to related calculations.
The following items grant armor penetration:
Item | Armor penetration | |
---|---|---|
Shark Tooth Necklace(Desktop, Console and Mobile versions) | 5 | |
Stinger Necklace(Desktop, Console and Mobile versions) | 5 | |
Sharpening Station(Desktop, Console and Mobile versions) | (Desktop, Console and Mobile versions) 12 / ( versions) 4 (for melee weapons only) |
In addition, the projectiles of certain weapons and accessories have an own armor penetration stat, which is added to the player's armor penetration when inflicting damage upon an enemy with them:[4]
Item | Armor penetration | |
---|---|---|
Blade Staff(Desktop, Console and Mobile versions) | 25 | |
Dark Harvest(Desktop, Console and Mobile versions)("dark energy") | 50 | |
Cool Whip(Desktop, Console and Mobile versions)(snowflake) | 30 | |
Bone Glove(Desktop, Console and Mobile versions) | (Desktop, Console and Mobile versions) 25 | |
Crystal Vile Shard(Desktop, Console and Mobile versions) | (Desktop, Console and Mobile versions) 10 | |
Nettle Burst | (Desktop, Console and Mobile versions) 10 | |
Wasp Gun | (Desktop, Console and Mobile versions) 10 | |
Star Cloakand its upgrades | (Desktop, Console and Mobile versions) 25 | |
Arkhalis(Desktop, Console and Mobile versions) | (Desktop, Console and Mobile versions) 20 | |
Weather Pain(Desktop, Console and Mobile versions) | (Desktop, Console and Mobile versions) 10 |
Maximum defense
The highest possible defense can be attained using the setups described in the following sections.
Desktop version, Console version, and Mobile version
The maximum possible defense is 186 / 196 / 204:
- Solar Flare Helmet or Hallowed Mask
- Solar Flare Breastplate(Desktop, Console and Mobile versions)
- Valhalla Knight's Greaves(Desktop, Console and Mobile versions)
- Hero Shield(Desktop, Console and Mobile versions)
- Flesh Knuckles(Desktop, Console and Mobile versions)
- Berserker's Glove(Desktop, Console and Mobile versions)
- Celestial Shell(Desktop, Console and Mobile versions)
- Frozen Shield(Desktop, Console and Mobile versions)
- Paladin's Shield(Expert/Master)
- Ankh Shield(Master)
- Ironskin
- Exquisitely Stuffed(Desktop, Console and Mobile versions)
- Dryad's Blessing(Desktop, Console and Mobile versions)
- The Bast Defense(Desktop, Console and Mobile versions)
Guarding with the Brand of the Inferno(Desktop, Console and Mobile versions) or Sergeant United Shield(Desktop, Console and Mobile versions)
no version
The maximum possible defense is 165 / 173:
- Chlorophyte Mask
- Solar Flare Breastplate(Desktop, Console and Mobile versions)
- Valhalla Knight's Greaves or Solar Flare Leggings or Vortex Leggings
- Flesh Knuckles(Desktop, Console and Mobile versions)
- Celestial Shell(Desktop, Console and Mobile versions)
- Paladin's Shield
- Moon Stone
- Celestial Stone
- Ankh Shield(Expert)
- Ironskin
- Well Fed
- Dryad's Blessing(Desktop, Console and Mobile versions)
- Guarding with the Brand of the Inferno(Desktop, Console and Mobile versions)
Old-gen console version and Nintendo version
The maximum possible defense is 128:
- Dragon Mask(Old-gen console and 3DS versions)
- Beetle Shell
- Beetle Leggings
Trivia
- Although not possible in-game, if a piece of armor were to gain a modifier, it would apply the effects just like an accessory would. For example, a set of Warding modified armor would add 12 defense total; each piece adding 4 defense to the total.
- Damage dealt by enemies is doubled in Expert Mode(Desktop, Console and Mobile versions) and tripled in Master Mode(Desktop, Console and Mobile versions) compared to Classic Mode. This means that despite the higher factors of defense in those modes, defense is still generally less effective than in Classic Mode.
- If the player somehow has negative defense, they will take more damage according to the damage taken added with half / three quarters / full amount the defense.
See also
References
- ↑ Information taken from the Desktop 1.4.3.6 source code, method
StrikeNPC()
inTerraria.NPC.cs
. There may be inaccuracies, as the current Desktop version is 1.4.4.9. - ↑ Information taken from the Desktop 1.4.1.2 source code, method
CalculateDamagePlayersTake()
inTerraria.Main.cs
. There may be inaccuracies, as the current Desktop version is 1.4.4.9. - ↑ Information taken from the Desktop 1.4.3.6 source code, method
checkArmorPenetration()
inTerraria.NPC.cs
. There may be inaccuracies, as the current Desktop version is 1.4.4.9. - ↑ Information taken from the Desktop 1.4.2.1 source code, method
Damage()
inTerraria.Projectile.cs
. There may be inaccuracies, as the current Desktop version is 1.4.4.9.