模板:Hp

出自Terraria Wiki
跳至導覽 跳至搜尋
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
See Template:Hp/l10n for the localization of this template.
Template-info.svg 文檔 以下文檔來自Template:Hp/doc。(編輯 | 歷史

A template that displays health values in a similar fashion to Terraria.

Usage

{{ hp | <health value> | small = 1 (optional) | link = 1 (optional) }}

參數描述類型狀態
Health value1
Health value to display.
示例:
150
數字
必填
Compressedsmall
Reduces the display to a compact format, useful when space is an issue.
自動值:
True (1/y/yes)
布爾值
可選

此模板首選參數行內格式。

Examples

  • {{hp|100}} returns
    PlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.png
  • {{hp|100|small=1}} returns
    Heart.png × 5
  • {{hp|460}} returns
PlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.png
  • {{hp|460|small=1}} returns
    Heart.png × 20 + Life Fruit.png × 12

Notes

  • The standard form of the template cannot round values and does not account for the Lifeforce Potion. Between 0 and 400, use increments of 20. Between 400 and 500, increments of 5.
    • The small parameter will allow rounded values, but rounds down regardless of value, i.e, {{hp|119|small=1}} returns
      Heart.png × 5
  • By default, the template's output is provided with a hover text, displaying the health value that was used as the input. Use the parameter link=1 to suppress this hover text and make the icons clickable:
{{hp|100|link=1}} returns
PlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.png
{{hp|460|small=1|link=1}} returns
Heart.png × 20 + Life Fruit.png × 12