Health regeneration

From Terraria Wiki
(Redirected from Health Regeneration)
Jump to: navigation, search

This page discusses how the player health regeneration mechanism works, and how equipment and buffs affect the regeneration rate.[1]

If the player is not hit for some time, health starts regenerating until the player is hit, and the pace at which he regenerates is dependent on:

  1. Player's maximum health: higher health means higher regeneration
  2. Movement: if the player is standing still, the regeneration rate is 2.5x higher
  3. Time since the last hit: the longer ago, the higher the regeneration rate; this has a cap of 60 seconds (1 in-game hour), after which the regeneration rate no longer rises
  4. Buffs and debuffs: for a feel you can have a look at the detailed explanation below, but keep in mind that the numbers do not represent health regeneration directly; they are just factors (higher is better)

The time the player has to wait until regeneration starts is highly variable from roughly 1/10th of a second to 17 seconds (32 seconds on expert mode) and is again dependent on maximum life, movement, and buffs/debuffs.

Details[edit | edit source]

Health regeneration (HR) is determined by the following formula:
Health regen formular.png
and gives the health per second the player regenerates.

The formula can be split in to 3 parts and a bit of rounding:

  1. The regen part consists of:
    • health_max: maximum Health of the player
    • time: factor for the time that passed until the last hit. A detailed definition can be found in the detailed explanation
    • As time starts at 0 and than rises by 1 first every 5 seconds and after 30 seconds every 10 seconds to a maximum of 9. (0<=time<=9) (excluding the Shiny Stone buff where it can raise till 38). That means the this part is 0 for at least 5 seconds
  2. The buffs part:
    • buff: modifiers from the buffs and debuffs. All R+n from the Buff and Debuff section can be added here (the n-part), there are some buffs effecting other parts not represented in this description (see technical description). This is the easiest part as the buffs are just added to the regeneration.
  3. The special part consists of:
    • move: either 0.5 if the player is moving or 1.25 if the player is standing still
    • expert: 1, except if the player is in expert mode and has not the well fed buff, then it is 0.5

All this is rounded to the nearest whole number and finally divided by 2 to get the regeneration per second.

The Player will regenerate HR per second (discounting 2 buffs (Shiny Stone, Rapid Healing)). This means if the Player has HR=0.5 it will regain 1 health per 2 seconds and if the player has HR=5 it will regain 5 health per second. Technically the player will not gain 5 health per second instead he will get 1 health every 12 ticks (game time > 1 second = 60 ticks)

Notes[edit | edit source]

  • Buffs can help to reduce the time when the regeneration starts
  • A starting Player will start regenerating health after 12 seconds (17 seconds on expert mode) if standing still or 17 seconds (32 expert mode) while moving, after consuming the first heart this drops to 7 seconds while standing still

Technical explanation[edit | edit source]

The player has these health regeneration stats:

  • Regeneration Time (RT): How long the character has been regenerating for. This normally increases +1 per tick, capped at 3600, and resets to zero when the character takes damage (stopping regeneration).
  • Regeneration Rate (R): Hit Points (HP) regenerated per tick (1 point of R is equal to 0.5 HP/s). This increases the longer the RT (the longer the player has been avoiding damage).
  • Regeneration Counter (RC): Increases by R per tick, becomes 120 or over, or -120 or less, it will be reduced or increased by 120, and player will gain or lose 1 health.

The Regeneration Rate (R) determines how fast the RC changes. R is normally 0 or positive, but could be negative if the player is inflicted with any life-draining debuffs, like Poisoned.

Calculation[edit | edit source]

The base Regeneration Rate (R) is mainly determined by the Regeneration Time (RT), player's max Health (mHP), and whether player is standing or moving.

First, The RT is converted to an Effective Regeneration Time (eRT).

  • If RT <= 1800, each 300 RT boosts eRT +1.
  • If RT > 1800, each 600 RT boosts eRT +1.

Here is an illustration of the relationship between RT and eRT:

RT 0~299 300~599 600~899 900~1199 1200~1499 1500~1799 1800~2399 2400~2999 3000~3599 3600
eRT 0 1 2 3 4 5 6 7 8 9

Then, the base Regeneration Rate R = (mHP / 400 * 0.85 + 0.15) * eRT

  • If the player is standing still, R will be multiplied by 1.25.
  • If the player is moving, it will be multiplied by 0.5.

Finally, it will be rounded to the nearest whole number.

So, for a brief conclusion: the longer player not getting hurt, the higher maxim health player has, the higher for the natural health regeneration rate. Also, standing still(using an item or not) give a 2.5X healing bonus comparing to keep moving.

In addition, if the player is in Expert mode and does not have a Well Fed buff, R will be additionally multiplied by 0.5.

Item and buff effects[edit | edit source]

R is also affected by other items and buffs.

Note: Despite drowning being similar to life-draining debuffs, it only resets the RT and does not affect the RC and R. It directly reduces Hit Points instead.

Buffs[edit | edit source]

Item/Buff Effect
Heart Lantern R +2
Campfire R +1 and base R x1.1
Crimson armor Base R x1.5
RT +1 per tick
Life Drain R +3 (and 1 per 2 additional mobs affected)
RT +5 per tick (and 1 per 2 additional mobs affected)
Rapid Healing RC +6 per tick

These apply if the player doesn't have any life-draining debuffs:

Item/Buff Effect
Band of Regeneration
Charm of Myths
R +1
Moon/Sun/Celestial Stone
Celestial Shell
R +2
Regeneration R +4
Dryad's Blessing R +6
Life Nebula Sets R = 0 if it's less than 0
R +10 for each buff level (30 at the third level)

Regen debuffs[edit | edit source]

  • Feral Bite debuff: Base R is multiplied x0.5.
  • Bleeding debuff: Keeps RT reset to 0, so base R remains at 0.

Life-draining debuffs[edit | edit source]

These cancel the R boosts above, reset RT to 0, and reduce R by these values:

Note: If you are under the debuff of Burning or Suffocation, instead of losing 1 health when RC reaches -120, you'll always lose 5 health when RC reaches -600.

Honey[edit | edit source]

If Then
R <= -4 R boosted +6
-4 < R <= 0 R set to 2
R > 0 R boosted +2
  • Which means Honey reduces the rate of any life-draining debuff.
  • Honey additionally boosts RT +2 per tick (RT increase is 3x as fast).

Shiny Stone[edit | edit source]

If the player is using items or not standing still, it will reset the multipliers of the Feral Bite debuff and Expert Mode to 0.75 from 0.5. Both of them only reduce the regeneration speed by 25% instead of the previous 50%. It will also multiply base R x1.1.

If the player is not using any items and almost standing still (it allows small amounts of movement), the following effects are applied in addition to those above:

  1. If the player has any life-draining debuffs so that R is less than 0, R is reduced by half (if you also have Honey buff, then it increases R by 4 first(but no more than 0), then, R is reduced by half, finally, the Honey buff additionally increase R by 2.).
  2. R +4.
  3. RT +4 per tick.
  4. If 90 < RT < 1800, RT is reset to 1800.
  5. When RT > 3000, it will remove the RT cap, and every 300 RT above 3000 will boost eRT +1 (this part is capped at 30, so it will give an eRT maxed at 38 instead of the previous 9).
  6. Finally, if R > 0, RC is boosted +1 per tick.

So, if the player is at 600 max HP, with the Shiny Stone and standing still, in Expert mode, without Well Fed:

  • R = (600 / 400 * 0.85 + 0.15) * 38 * 1.25 * 0.75 * 1.1 + 4 = 63
  • RC is additionally boosted +1 per tick
  • = 32 Hit Points per second regeneration rate.

A more complex example[edit | edit source]

To illustrate how the items, buffs and debuffs interact with each other, here is a more complex example:

Assume the player is having Venom, On Fire!, Regeneration and Honey buff, equipping Shiny Stone and Charm of Myth, Standing next to a Heart Lantern, and standing still.

It would work in the step shown below:

  1. The Regeneration buff and Charm of Myth increase the R by 4 and 1 respectively, so, R=5.
  2. The life-draining debuffs cancel the effect above and set R to 0.
  3. The Venom and On Fire! reduce R by 12 and 8 respectively, so, R=-20.
  4. As the R<0, the Honey buff increased the R by 4, so, R=-16.
  5. As the R is still less than 0, the Shiny Stone reduces it by half, so, R=-8.
  6. Then the Honey, Shiny Stone and Heart Lantern increase R by 2, 4 and 2 respectively, so, R=0.
  7. As player have life-draining debuffs, the RT will remain 0, so player would not get any natural health regeneration.
  8. As R is not more than 0, the Shiny Stone won't provide the RC +1 per tick bonus.

So, player has R=0, and will neither gain or lose health.

Then, if player place a Campfire nearby, it will give R +1 boost and give player a 0.5 HP/s regeneration rate; in addition, as R>0, the Shiny Stone will now provide the RC +1 per tick bonus, which means an additional 0.5 HP/s regeneration rate. So, player will have a 1 HP/s regeneration rate.

However, if player is have Rapid Healing buff (which gives the RC +6 per tick effect and does not affect R) instead of the Campfire, the Shiny Stone won't provide the RC +1 per tick bonus. So player will finally get a 3 HP/s regeneration rate.

References[edit | edit source]

  1. Terraria game code (PC version, in the function UpdateLifeRegen() in Player.cs
Game mechanics
Combat Attack speed • Autoswing • Desktop only.pngMobile only.png3DS logo.svg Combat Targeting • Critical hit • Damage • Knockback • Minions • Velocity
Environment Ambient objects • Day and night cycle • Environment • Event • Map size • Moon • Music • NPC despawning • NPC spawning • Status messages • Wind • Desktop only.png World Seed
Interface Minimap • Logo • Title messages
Items Consumable • Crafting stations (By Hand) • Crossover content • Explosion-proof objects • Mining speed • Modifiers • NPC drops • Placement • Pickaxe Power • Rarity • Storage • Tooltips • Use time • Value
Game Achievements • Desktop only.png Settings (desktop version) Desktop only.png Config.json • Desktop only.png Camera mode • Data IDs • Difficulty • Desktop only.png Expert mode • Game controls • Lighting mode • NPC names
Multiplayer Desktop only.png Chat • Multiplayer
Player Aggro • Breath meter • Buffs and Debuffs • Character styles • Death • Defense • Drowning • Fall damage • Ghost • Hairstyles • Health • Health regeneration • Inventory • Mana • Player stats • Spawn