Knockback is a basic mechanism in Terraria whereby players and enemies are repelled in the opposite direction of an attack. Most weapons and environment objects that cause damage also cause knockback, to varying degrees. Some enemies are immune to knockback, particularly bosses and other enemies that travel through blocks, like worms and Man Eaters. Some enemies also have varying degrees of knockback resistance.
The player can become immune to knockback by equipping the Cobalt Shield, Paladin's Shield, or any of their upgrades, or by grappling on any surface using any hook. Wearing the full Gladiator armor set also grants the player knockback immunity.
Player-inflicted knockback can be increased by various modifiers, the Titan Glove accessory and its upgrades, the Titan Potion, and the Shroomite and Vortex armors' stealth effects. Critical hits increase the inflicted knockback by 40%. Enemies that are afflicted with Cursed Inferno receive 10% more knockback.
The knockback inflicted by an item is usually displayed in its tooltip. The exact values are not displayed, they are grouped into the following categories instead:
|≤ 1.5||Extremely weak knockback|
|≤ 3||Very weak knockback|
|≤ 4||Weak knockback|
|≤ 6||Average knockback|
|≤ 7||Strong knockback|
|≤ 9||Very strong knockback|
|≤ 11||Extremely strong knockback|
|> 11||Insane knockback|
The following steps are taken when an enemy is struck with a weapon that inflicts knockback.
First, calculating knockback resistance:
knockBack = knockBack * (1 - enemyKnockbackResist)
Then multiplying knockback by 110% if the target is suffering from Cursed Inferno:
if cursedInferno then knockBack = knockBack * 1.1
Then applying cap to it if needed:
if knockBack > 8.0 then knockBack = 8 + (knockBack - 8.0) * 0.9 if knockBack > 10.0 then knockBack = 10 + (knockBack - 10.0) * 0.8 if knockBack > 12.0 then knockBack = 12 + (knockBack - 12.0) * 0.7 if knockBack > 14.0 then knockBack = 14 + (knockBack - 14.0) * 0.6 if knockBack > 16.0 then knockBack = 16
Then multiplying knockback by 140% if it is a critical hit:
if isCrit then knockBack = knockBack * 1.4
Finally, the computed knockback value is converted to speed. There are differing multipliers depending on whether the hit is more than 10% / 15% of the enemy's maximum health, and there is a special 1.5× multiplier to vertical speed for Snow Flinxes.
- All bosses and their minions except Brain of Cthulhu in its second phase, Servant of Cthulhu, and Golem's Fists.
- All plants except Angry Trapper and Clinger.
- All Worm AI enemies.
- Ancient Vision
- Blazing Wheel
- Desert Spirit
- Drakin (T2/T3)
- Dungeon Guardian
- Gray Grunt
- Headless Horseman
- Lihzahrd (second form)
- Lunatic Devotee
- Martian Officer (Bubble Shield)
- Martian Probe
- Martian Walker
- Pirate Captain
- Shadowflame Apparation
- Spike Ball
- The Possessed (on walls)
- Tesla Turret
- Wandering Eye Fish
- Zombie Merman
Weapons inflicting the most knockback
The Jousting Lances have the potential to inflict the most knockback, as their knockback depends on the player's speed. The Slap Hand has the highest listed knockback value (20), followed by the Golem Fist (12), Morning Star (11), Celebration Mk2 (10), and the Thorns Potion, which retaliates with 10 knockback when its effect triggers.
The knockback values of all weapons can be seen at the list of weapons. Remember that knockback is capped at 16 (22.4 for critical hits), after calculating the enemy's knockback resistance.
- Information taken from the Desktop 22.214.171.124 source code, method
Terraria.NPC.cs. There may be inaccuracies, as the current Desktop version is 126.96.36.199.
- This is written properly, it follows the steps in order so that a Slap Hand against a target that is not alight with Cursed Inferno and does not critically hit ends up at 14.9168 knockback, having been reduced 4 times, barring other enemy-specific modifiers.