Health regeneration

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

The player has three stats related to the health regeneration: The Regeneration Time (RT) is normally increased by 1 every tick(so, 60 per second), and would normally capped at 3600. Also, when player takes damage, it will reset to 0. There longer the RT, the bigger for the R.
 * Regeneration Time (RT);
 * Regeneration Rate (R);
 * Regeneration Counter (RC);

The Regeneration Counter (RC) is a value that would increased by the number of Regeneration Rate (R) every tick, when it become no less than 120 (or no more than -120), 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 and due to the mechanism RC works, 1 point of R is equal to 0.5 HP/s. It is normally 0 or positive, but could be negative if player get any life losing debuffs (like Poisoned).

Calculation
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.

Firstly, the RT would be converted to Effective Regeneration Time (eRT), if RT<=1800, then each 300 RT would increase the eRT by 1; if it's more than 1800, then each additional 600 RT would increase eRT by 1.

Here is a table about the relationship of RT and eRT. Then, the base Regeneration Rate R=(mHP/400*0.85+0.15)*eRT, if player is standing still, the R will be multiplied by 1.25; if player is moving, it will be multiplied by 0.5. Finally, it will be rounded to the nearest whole number.

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

Item and buff effects
The R would also be affected by other items or buffs than affect the life regeneration. But their mechanisms are not the same.

Band of Regeneration, Charm of Myths and Werewolf buff increase the R by 1 if player doesn't have any life losing debuffs.

Moon/Sun/Celestial Stone and Celestial Shell increase the R by 2 if player doesn't have any life losing debuffs.

The Regeneration buff increases the R by 4 if player doesn't have any life losing debuffs.

The Dryad's Blessing buff increases the R by 6 if player doesn't have any life losing debuffs.

The Feral Bite debuff will get the base R multiplied by 0.5.

The Bleeding debuff will keep the RT reset to 0, so that the base R will remain 0.

The life losing debuffs will cancel the R increasing effect above, reset the RT to 0 and reduce the R by related value: Honey will increase R by 6 if R<=4, set R to 2 if 40. (Which means honey will reduce life losing speed if player is in any life losing debuff) It will also additionally increase the RT by 2 every tick. (So the RT increasing will be 3 times as fast).
 * Poisoned: Reduce R by 4.
 * On Fire!: Reduce R by 8.
 * Venom, Cursed Inferno, Frostburn: Reduce R by 12.
 * Burning: Reduce R by 60.
 * Suffocation: Reduce R by 40.
 * Electrified: Reduce R by 8 if standing still and by 32 if moving.
 * The Tongue: Reduce R by 100 if in Expert.

Heart Lantern will increase R by 2, regardless of the life losing debuffs.

Campfire will increase R by 1, regardless of the life losing debuffs. It will also get the base R multiplied by 1.1.

Crimson armor set will get the base R multiplied by 1.5, and it will also additionally increase the RT by 1 every tick.

Life Drain will increase R by 3, regardless of the life losing debuffs. It will also additionally increase the RT by 5 every tick.

Rapid Healing will directly increase the RC by 6 every tick(it does not affect the R).

Life Nebula will set the R to 0 if it's less than 0, and will increase R by 10 for each level of the buff (so 30 at the third level) if player doesn't have any life losing debuffs.

Shiny Stone works more complexly:

Firstly, if the player is almost standing still (it allows player moving in a very low speed) but still using items, it will reset the multiply of the Feral Bite debuff and the Expert mode to 0.75 from 0.5.(the both of them only reduce the regeneration speed by 25% instead of previously 50%), also it will get the base R multiplied by 1.1.

Then, if the player is almost standing still and NOT using any items, it give the following effect in addition of the effect mentioned above: So, if you are at 600 maxim HP, with the Shiny Stone and stand still in Expert mode(without Well Fed), you'll finally get an R=(600/400*0.85+0.15)*38*1.25*0.75*1.1+4=63, and consider it also directly increase the RC by 1 every tick. you'll get about 32 HP/s regeneration rate.
 * 1) If player have any life losing debuffs and the R is less than 0, it will reduced the R by half (this works after the Honey buff).
 * 2) Then, it will increase R by 4.
 * 3) It will also increase the RT by 4 every tick.
 * 4) Then, if 903000, it will remove the cap of RT and each 300 of RT above 3000 will increase the eRT by 1 (this part is capped at 30, so it will give an eRT maxed at 38 instead of previously 9).
 * 6) Finally, if the R>0, is will directly increase the RC by 1 every tick.

Note: Despite the drowning works similar as a life losing debuff, it only resets the RT and does not affect the RC and R. It directly reduced the life instead.