Knockback

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.

Equipping any Shield (with the exception of the Shield of Cthulhu) will grant the player knockback immunity. Grappling on any surface using any Hook will also grant the player knockback immunity.

The most player-caused/inflicted knockback comes from the Slap Hand, which has a knockback value of 20. This is followed immediately by the Shadow Jousting Lance with a knockback value of 14, then by the Hallowed Jousting Lance and Tonbogiri with a knockback value of 13, the regular Jousting Lance and Golem Fist with a knockback value of 12, and the Thorns Potion, which retaliates with 10 knockback when its effect triggers.

Knockback is capped at 16 (22.4 if it is a Critical hit). This cap is applied after calculating the enemy's knockback resistance.

Various modifiers, and the Titan Glove accessory and its upgrades, can increase player-inflicted knockback.

Formula
First, calculating knockback resistance: knockBack = knockBack * (1 - KB Resist) Then apply cap to it if needed: if knockBack > 8.0 then knockBack = (knockBack - 8.0) * 0.9 if knockBack > 10.0 then knockBack = (knockBack - 10.0) * 0.8 if knockBack > 12.0 then knockBack = (knockBack - 12.0) * 0.7 if knockBack > 14.0 then knockBack = (knockBack - 14.0) * 0.6 if knockBack > 16.0 then knockBack = 16 Then see if it is a Critical hit: if isCrit then knockBack = knockBack * 1.4 Then apply knockback to velocity, something like: velocity = velocity - knockBack There are some additional detail variations on applying knockback to velocity.

Immune enemies
Other:
 * All Bosses and their minions except Brain of Cthulhu in its second phase, Golem's Fists, and Servant of Cthulhu.
 * All Plants except Angry Trapper and Clinger.
 * All Worm AI enemies.
 * Ancient Vision
 * Antlion
 * Blazing Wheel
 * Desert Spirit
 * Drakin (T2/T3)
 * Dungeon Guardian
 * Gray Grunt
 * Headless Horseman
 * Lihzahrd (2nd form)
 * Lunatic Devote
 * Martian Officer (Bubble Shield)
 * Martian Probe
 * Martian Walker
 * Paladin
 * Pirate Captain
 * Shadowflame Apparation
 * Spike Ball
 * Sroller
 * The Possessed (On walls)
 * Tesla Turret
 * Wandering Eye Fish
 * Yeti
 * Zombie Merman

History
Rückstoß 넉백 击退