Difference between revisions of "Template:Health"
Jump to navigation
Jump to search
If you find a typo, inconsistency, or error, please sign up and help out the wiki! We can't do it without your help! :D Thank you!
m |
(Size parameter now only needs a number for it to work (see last example in the documentation)) |
||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{{1}}} ({{# | + | <includeonly>{{#switch: {{{1}}} |
− | == | + | | 0 = 0 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}-empty.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|0 hearts]]) |
− | + | | 1 = 1 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}-half.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|0.5 hearts]]) | |
− | + | | 2 = 2 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|1 heart]]) | |
− | + | | 3 = 3 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|1.5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}-half.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|1.5 hearts]]) | |
− | + | | 4 = 4 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|2 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|2 hearts]]) | |
− | + | | 5 = 5 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|2.5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|2.5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}-half.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|2.5 hearts]]) | |
− | + | | 6 = 6 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|3 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|3 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|3 hearts]]) | |
− | + | | 7 = 7 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|3.5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|3.5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|3.5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}-half.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|3.5 hearts]]) | |
− | + | | 8 = 8 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|4 hears]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|4 hears]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|4 hears]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|4 hears]]) | |
− | + | | 9 = 9 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|4.5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|4.5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|4.5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|4.5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}-half.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|4.5 hearts]]) | |
− | + | | 10 = 10 ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|5 hearts]][[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|5 hearts]]) | |
− | + | | #default = {{{1}}} ([[File:ui-health{{#ifeq: {{{hardcore}}}|true|-hardcore}}.png|{{{2|12}}}x{{{2|12}}}px|class=item-icon pixel|alt=♥|link=|1 heart]] × {{#expr: {{{1}}} / 2}}) | |
− | + | }}</includeonly><noinclude> | |
− | + | {{Documentation}} | |
− | + | <!-- Put categories/interwiki on the documentation page. --> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</noinclude> | </noinclude> |
Latest revision as of 14:07, 11 July 2023
This template serves to display health points in a page.
Usage
The syntax of this template is {{Health|<number>|<size>?|hardcore=true?}}
. If the value is higher than 10
, it will display n × <health>
where n
is the number you specified.
Examples
{{Health|0}}
→ 0 (){{Health|1}}
→ 1 (){{Health|2}}
→ 2 (){{Health|3}}
→ 3 (){{Health|4}}
→ 4 (){{Health|5}}
→ 5 (){{Health|6}}
→ 6 (){{Health|7}}
→ 7 (){{Health|8}}
→ 8 (){{Health|9}}
→ 9 (){{Health|10}}
→ 10 ()
Hardcore variants:
{{Health|0|hardcore=true}}
→ 0 (){{Health|1|hardcore=true}}
→ 1 (){{Health|2|hardcore=true}}
→ 2 (){{Health|100|hardcore=true}}
→ 100 ( × 50)
Rounding examples:
{{Health|1.25}}
→ 1.25 ( × 0.625){{Health|1.5}}
→ 1.5 ( × 0.75){{Health|1.75}}
→ 1.75 ( × 0.875)
More than 10 health points:
{{Health|20.5}}
→ 10.5 ( × 5.25){{Health|30}
→ 30 ( × 15){{Health|600}}
→ 600 ( × 300)
Custom icon size:
{{Health|6|16}}
→ 6 ()