生命再生

出自 Terraria Wiki
前往: 導覽搜尋
此頁面的(部分)內容需要被翻譯。
你可以幫助我們來翻譯此頁面

該頁面探討玩家的生命再生機制,包括配飾buff對生命再生速度的影響。[1]

玩家一段時間沒有受傷時,生命值會開始回復,直至再次受傷,回復的速度與以下變量有關:

  1. 玩家的最大生命值:最大生命值越高,生命再生速度越快。
  2. 移動狀態:如果玩家為站定狀態,則生命再生速度比移動時高2.5倍。
  3. 持續時間:再生時間越久,再生速度也會越快,持續60秒(遊戲內的一小時)後,再生速度不再隨時間提升。
  4. BuffDebuff:下文會詳細概括,但要注意的是,狀態效果並不對回復速度造成直接影響,而僅處於函數的中間部分。

從上次受傷到開始回復,時間並非固定,其數值可以在0.1-17秒之中(專家模式則為0.1-32秒),與再生速度同樣受上述變量影響。

細節[編輯 | 編輯原始碼]

每秒生命值的回覆量(HR)遵循下述公式:
Health regen formular.png

公式可分為3個部分:

  1. 自然回复(regen)部分包含:
    • 最大生命值(health_max)
    • 时间(time):「從上次受傷到現在的時間」的相關變量。
    • 时间(time)在函數中,從0開始,每過5秒增加1,30秒後,每過10秒增加1,最大提至9(0≤time≤9)(閃亮石允許這個值最大提升至38). 這意味著在受傷後最初的5秒鐘內,這個值一直為零。
  2. 状态效果(buffs)部分包含:
    • 状态效果(buffs):玩家身上所有Buff和Debuff的再生效果相加(沒影響的除外),少數狀態效果不影響buffs變量,而影響其他變量,這裡暫且不提。狀態效果對生命回復的影響較為簡單,只有加減關係。
  3. 特殊(specials)部分包含:
    • 移动状态(move):移動時取0.5,站定時取1.25。
    • 专家模式(expert):普通模式取1,專家模式取0.5。

有多餘小數的,取最近的整數為準。

玩家每秒會恢復HR點生命值(閃亮石快速治療兩個特殊buff不算在內)。這意味著當HR=0.5時,玩家每2秒會恢復1點生命值;HR=5時每1秒恢復5點生命值。

注意事項[編輯 | 編輯原始碼]

  • 狀態效果可以幫助玩家削短生命再生的延時。
  • 對於初始玩家,受傷後持續站立12秒,會開始回復生命值(專家模式為17秒),保持移動則為17秒(專家模式為32秒)。

技術性說明[編輯 | 編輯原始碼]

玩家擁有如下的生命再生統計數據:

  • 再生時間Regeneration Time (RT):玩家進入再生狀態的時間。通常情況下,該值每遊戲刻會增加1,上限為3600。玩家受傷時該值會重置為零(停止再生)。
  • 再生率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.

計算[編輯 | 編輯原始碼]

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.

物品與增益[編輯 | 編輯原始碼]

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.

增益[編輯 | 編輯原始碼]

物品/增益 效果
紅心燈籠 R +2
篝火 R +1 and base R x1.1
猩紅盔甲 Base R x1.5
RT +1 per tick
奪命杖(增益) R +3 (and 1 per 2 additional mobs affected)
RT +5 per tick (and 1 per 2 additional mobs affected)
快速治療(增益) RC +6 per tick

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

物品/增益 效果
再生手環
神話護身符
狼人(增益)
R +1
太陽石/月亮石/天界石
天界殼
R +2
再生藥水 R +4
樹妖祝福(增益) R +6
生命星雲 Sets R = 0 if it's less than 0
R +10 for each buff level (30 at the third level)

生命再生減益[編輯 | 編輯原始碼]

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

生命流失減益[編輯 | 編輯原始碼]

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.

蜂蜜[編輯 | 編輯原始碼]

如果 那麼
R <= -4 R 提高 6
-4 < R <= 0 R 變為 2
R > 0 R 提高 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).

閃亮石[編輯 | 編輯原始碼]

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.

一個更複雜的例子[編輯 | 編輯原始碼]

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.

參考[編輯 | 編輯原始碼]

  1. 代碼儲存於(PC版本1.3.0.8)Player.cs中的UpdateLifeRegen()