Damage

Damage is the amount of health points subtracted from an entity's current health. It can be inflicted by a multitude of entities, most prominently weapons, enemies, and NPCs (and all related projectiles). Furthermore, it can be caused by environmental hazards (such as thorny bushes, traps, or lava) and game mechanics (such as fall damage, drowning, or debuffs). Damage can generally only be inflicted on entities with a health statistic, i.e., players, most enemies, and NPCs. Most damage sources additionally inflict knockback on the damaged entity.

When an entity receives damage, several calculations increasing or decreasing the amount of damage (depending on several factors; see below) are performed before the actual damage is applied to the entity. Therefore, the damage statistic of any damaging entity is usually only the average damage it inflicts. Most hits' damage deviates from this average number.

Damage inflicted by player-wielded weapons is categorized into five different types: melee, ranged, magic, summon, and throwing. Accessories, buffs, and other damage-boosting or damage-decreasing effects often only affect one of these damage types. A few weapons as well as all other damaging entities are not categorized into any of the five types.

Melee
Melee weapons are used in close- to medium-ranged combat. Their defining trait is the fact that they do not consume ammunition or mana upon use. They are roughly categorized into swords, spears, flails, boomerangs, and. There are several other melee weapons not fitting any of these types.

In total, there are currently unique melee weapons.

Ranged
Ranged weapons are used in long-ranged combat. Their defining trait is the requirement of ammunition in order for the weapon to operate. They are roughly categorized into bows, repeaters, guns, and launchers. Note that Terraria classifies boomerangs as melee weapons and consumables as thrown weapons.

In total, there are currently unique ranged weapons.

Magic
Magic weapons are used in medium- to long-ranged combat. Their defining trait is the consumption of mana upon every use. Due to their unusual and unique forms of attack, the majority of magic weapons can hardly be categorized into distinct types.

In total, there are currently unique magic weapons.

Summon
Summoning weapons do not inflict any damage themselves when used. Instead, using them spawns a secondary character which will aid the player in battle by automatically attacking enemies. The summoned character is either mobile, i.e. following the player around (minion), or stationary, i.e. remaining at the location it was summoned at (sentry).

In total, there are currently unique summon weapons.

Throwing
Throwing weapons are used in medium-ranged combat. Their defining trait is the fact that they are generally consumed upon use. They stack in a player's inventory, with one unit being removed from the stack every time it is used to attack, leaving the slot empty when the last has been used. Many throwing weapons have a chance of being retrievable after being used.

In total, there are currently unique throwing weapons.

Throwing is only considered a separate damage type on the. Throwing weapons deal ranged damage instead on the.

Invincibility Frames
After being damaged, the player gets a period of time during which they cannot be damaged again. By default this is 2/3 of a second; use of a Cross Necklace or any of its upgrades will double that to 4/3 of a second. If a Black Belt (or its upgrade the Master Ninja Gear) is also worn, a successful dodge (10% chance) will extend the invincibility to a full 2 seconds. (By implication, the Black Belt's dodge by itself provides provides 2/3 seconds of invincibility.) Titanium Armor similarly provides the Shadow Dodge buff; this is triggered by attacking an enemy, and when active, the next time the player would have taken damage, they instead get 2 seconds of invincibility.

Enemies get a similar effect from piercing attacks; after being struck by a piercing attack, they cannot take damage from another piercing attack for a brief period. They also have a limited rate at which they can be hit by lava; otherwise, attacks in quick succession can still damage them.

Calculations
A weapon's damage stat is determined cumulatively such as:


 * Step 1: Apply weapon modifier
 * step1 = BaseDamage * (1 + WeaponModifier/100)


 * Step 2: Round to the nearest number
 * step2 = round(step1)


 * Step 3: Apply all other mods (Armor, Accessories, Accessory Modifier, Buffs) added up
 * step3 = step2 * [1 + (Head + Chest + Legs + Set bonus)/100 + (Accessory1 + Accessory2 + .. + Accessory5 + AccMod1 + AccMod2 + .. + AccMod5)/100 + (Buff1 + Buff2+ ..)/100]
 * Note, for ranged weapons the calculation is slightly different, the Arrow/Bullet/Rocket damage is multiplied with other mods (round down after each calculation), so it will be like this:
 * step3 = (step2 + Arrow/Bullet/Rocket) * [1 + (Head + Chest + Legs + Set bonus)/100 + (Accessory1 + Accessory2 + .. + Accessory5 + AccMod1 + AccMod2 + .. + AccMod5)/100 + (Buff1 + Buff2+ ..)/100]


 * Step 4: Round down
 * WeaponDamage = roundDown(step3)


 * Step 5: For Bows and Repeaters, the Archery Potion will additionally add 20% damage of them (round down after calculation).
 * WeaponDamage = roundDown(1.2*step4)

For example, Godly Dao of Pow with Turtle Armor, Menacing Warrior Emblem, Menacing Avenger Emblem, Menacing Destroyer Emblem, Menacing Mechanical Glove and Menacing Celestial Stone equipped, Well Fed active:

step1 = 63 * (1 + 14/100) = 71.82

step2 = round(71.82) = 72

step3 = 72 * [1 + (6+8+0+0)/100 + (15+12+10+12+10+4+4+4+4+4)/100 + (5)/100] = 72 * [1.98] = 142.56

WeaponDamage = roundDown(142.56) = 142

Careful: Only use the modifiers which have an influence on the specific weapon (e.g. don't use magic damage bonus for a melee weapon).

Damage done to an enemy is depending on the enemies defense and whether there is a related banner nearby.
 * EnemyDamageReduction = roundUp(EnemyDefense * 0.5)

So,
 * DamageDealtToEnemy = WeaponDamage - EnemyDamageReduction without a banner;
 * And DamageDealtToEnemy = 1.5*WeaponDamage-EnemyDamageReduction with a banner in normal mode,
 * Or DamageDealtToEnemy = 2*WeaponDamage-EnemyDamageReduction with a banner in Expert mode,

Damage dealt is always at least 1.

In addition the outgoing damage is modified by a random factor, 0.85~1.15, (but some types of damage, like the Slime Mount, will not be affected by this), The damage is rounded to the nearest whole number. So you can compute the minimal and maximal damage dealt to an enemy with your weapon:
 * MinDamage = round(WeaponDamage * 0.85 - EnemyDamageReduction)
 * MaxDamage = round(WeaponDamage * 1.15 - EnemyDamageReduction)

At critical hits you are dealing double damage
 * CriticalMinDamage = MinDamage * 2
 * CriticalMaxDamage = MaxDamage * 2

Schadenstypen Type de dégâts Sebzés 伤害