Terraria.tools

Home / Guides

Invincibility frame

Invincibility frameCombat

what an invincibility frame is for

An invincibility frame is a short window during which something cannot be hurt, handed out the instant it takes damage. Without it, standing in lava would deal damage sixty times a second and continuous sources would delete you before you could react. With it, repeating and overlapping damage is throttled to a survivable rate.

The same system runs on enemies, and there it is the largest hidden factor in how much damage your weapons actually deal. Two weapons with identical numbers on paper can differ by a factor of three in practice because of how their projectiles hand out immunity.

your own frames

Taking a hit from anything grants you about two thirds of a second of immunity. If the hit was for exactly 1 damage that window is halved, and in PvP it is shorter again. Respawning, dodging, parrying and damaging something with a mount all grant frames of their own.

The Cross Necklace and its upgrades extend the window, and that is worth far more than the raw duration suggests. Against fast melee enemies it directly cuts how many hits per second can land on you, which is the same thing as a damage reduction, except it also buys you time to move.

not every hit shares a timer

Damage sources are sorted into groups, and the groups do not share immunity with each other. Most of the game sits in one large group, but spikes and thorny growths have their own, Moon Lord has his own, Empress of Light has hers, and a few lava dwelling critters share another.

The consequence is what kills people. Brushing a Spike does not protect you from the zombie next to it, and the immunity the zombie gave you does not protect you from the spike. In a dungeon corridor or a fight staged over a trap, you can take two complete hits in the same instant. Build arenas so that hazard tiles are never inside the space you are dodging in.

enemy frames only come from piercing attacks

An enemy is only given immunity by attacks that survive the hit and could strike again: piercing projectiles, continuous beams, minions, sentries, trap fire. A projectile that dies on contact neither grants immunity nor checks for it. Internally this is the penetrate value, where anything above 1 counts as piercing, and a projectile becomes non-piercing on its final hit.

This is why single target guns and plain arrows never feel like they are losing damage, while a screen full of piercing projectiles produces far less than the numbers imply. The default enemy window is roughly a sixth of a second, ten ticks, with plenty of per-projectile exceptions in both directions.

global, static and local

There are three implementations, and which one a weapon uses matters more than its damage stat once you start stacking sources.

  • Global: the target becomes immune to all of your piercing damage and all of your melee hits for the window, not only to the thing that hit it. Most older weapons work this way, and many were given higher damage to compensate for the restriction.
  • Static: the target becomes immune only to further projectiles of that exact type from you. A Wasp Gun's wasps block each other, but a Nimbus Rod raindrop or a Raven Staff minion connects normally during that window.
  • Local: the immunity is attached to the individual projectile. Two projectiles of the same type fired a moment apart each run their own timer and neither interferes with the other.

In multiplayer every one of these is tracked per player, so one person's piercing damage never suppresses another's. The old consoles are the exception, where everything falls back to the global rule and stacking piercing weapons is much worse.

what this means for your build

The rule of thumb is to avoid running two global immunity piercers at once. The second one spends most of its uptime hitting a target that is already immune to it, and you are paying full inventory space for a fraction of the damage.

Summoners hit this first. Minions are piercing attacks, so a Spider Staff swarm and a piercing main weapon can compete for the same window rather than adding up.

Weapons on local timers behave the opposite way. Extra copies scale close to linearly, which is why minion sets built on them, like the Deadly Sphere Staff, pull ahead sharply once your summon count is high. When two options look equal on their stat lines, the one with local timers is almost always the better real pick.

lava and non-player damage

Enemies get half a second of immunity after taking lava damage, and the same after contact damage from another non-player entity. That second case is rare but it does come up: critters and town NPCs hurt by enemies, bees fighting enemies on your behalf, and the Eternia Crystal taking hits during the Old One's Army, where its window is shorter at a third of a second. None of these timers interfere with the ones your own attacks apply, so a lava trap under your arena keeps working while you shoot into it.

More on combat