Template:H: Difference between revisions

Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
2,367 bytes added ,  January 28, 2013
Completely rewrote template to be more user-friendly.
No edit summary
(Completely rewrote template to be more user-friendly.)
Line 1: Line 1:
<onlyinclude>{{#switch: {{{1|4}}}
<onlyinclude>{{#vardefine:HNum|{{{1|0}}}}}{{#vardefine:0H|[[File:0 Heart.gif|link=]]}}{{#vardefine:1-4H|[[File:1-4 Heart.png|link=]]}}{{#vardefine:1-2H|[[File:1-2 Heart.png|link=]]}}{{#vardefine:3-4H|[[File:3-4 Heart.gif|link=]]}}{{#vardefine:1H|[[File:1 Heart.png|link=]]}}{{#vardefine:2H|{{#var:1H}}{{#var:1H}}}}{{#vardefine:3H|{{#var:2H}}{{#var:1H}}}}{{#vardefine:4H|{{#var:3H}}{{#var:1H}}}}{{#vardefine:5H|{{#var:4H}}{{#var:1H}}}}{{#vardefine:6H|{{#var:5H}}{{#var:1H}}}}{{#vardefine:7H|{{#var:6H}}{{#var:1H}}}}{{#vardefine:8H|{{#var:7H}}{{#var:1H}}}}{{#vardefine:9H|{{#var:8H}}{{#var:1H}}}}{{#vardefine:10H|{{#var:9H}}{{#var:1H}}}}<span title="{{#var:HNum}}">{{#switch:{{{2|}}}
| 0 = [[File:0 Heart.gif]]
|#default|16={{#ifexpr:{{#expr:(4*{{#var:HNum}}round1)/4}}<1|{{#switch:{{#expr:(4*{{#var:HNum}}round1)/4}}
| 1 = [[File:1-4 Heart.png]]
|0={{#var:0H}}|0.25={{#var:1-4H}}|0.5={{#var:1-2H}}|0.75={{#var:3-4H}}
| 2 = [[File:1-2 Heart.png]]
|1={{#var:1H}}}}|{{#switch:{{#expr:floor((4*{{#var:HNum}}round1)/4)}}
| 3 = [[File:3-4 Heart.gif]]
|1={{#var:1H}}
| 4 = [[File:1 Heart.png]]
|2={{#var:2H}}
}}</onlyinclude>
|3={{#var:3H}}
|4={{#var:4H}}
|5={{#var:5H}}
|6={{#var:6H}}
|7={{#var:7H}}
|8={{#var:8H}}{{#ifexpr:{{#expr:((4*{{#var:HNum}}round1)/4)-floor((4*{{#var:HNum}}round1)/4)}}>0|<br>}}
|9={{#var:8H}}<br>{{#var:1H}}
|10={{#var:8H}}<br>{{#var:2H}}
|11={{#var:8H}}<br>{{#var:3H}}
|12={{#var:8H}}<br>{{#var:4H}}
|13={{#var:8H}}<br>{{#var:5H}}
|14={{#var:8H}}<br>{{#var:6H}}
|15={{#var:8H}}<br>{{#var:7H}}
|16={{#var:9H}}<br>{{#var:8H}}}}{{#switch:{{#expr:((4*{{#var:HNum}}round1)/4)-floor((4*{{#var:HNum}}round1)/4)}}
|0={{Void}}
|0.25=[[File:1-4 Heart.png|link=]]
|0.5=[[File:1-2 Heart.png|link=]]
|0.75=[[File:3-4 Heart.gif|link=]]}}}}
|20={{#ifexpr:{{#expr:(4*{{#var:HNum}}round1)/4}}<1|{{#switch:{{#expr:(4*{{#var:HNum}}round1)/4}}
|0={{#var:0H}}
|0.25={{#var:1-4H}}
|0.5={{#var:1-2H}}
|0.75={{#var:3-4H}}
|1={{#var:1H}}}}|{{#switch:{{#expr:floor((4*{{#var:HNum}}round1)/4)}}
|1={{#var:1H}}
|2={{#var:2H}}
|3={{#var:3H}}
|4={{#var:4H}}
|5={{#var:5H}}
|6={{#var:6H}}
|7={{#var:7H}}
|8={{#var:8H}}
|9={{#var:9H}}
|10={{#var:10H}}{{#ifexpr:{{#expr:((4*{{#var:HNum}}round1)/4)-floor((4*{{#var:HNum}}round1)/4)}}>0|<br>}}
|11={{#var:10H}}<br>{{#var:1H}}
|12={{#var:10H}}<br>{{#var:2H}}
|13={{#var:10H}}<br>{{#var:3H}}
|14={{#var:10H}}<br>{{#var:4H}}
|15={{#var:10H}}<br>{{#var:5H}}
|16={{#var:10H}}<br>{{#var:6H}}
|17={{#var:10H}}<br>{{#var:7H}}
|18={{#var:10H}}<br>{{#var:8H}}
|19={{#var:10H}}<br>{{#var:9H}}
|20={{#var:10H}}<br>{{#var:10H}}}}{{#switch:{{#expr:((4*{{#var:HNum}}round1)/4)-floor((4*{{#var:HNum}}round1)/4)}}
|0={{Void}}|0.25=[[File:1-4 Heart.png|link=]]|0.5=[[File:1-2 Heart.png|link=]]|0.75=[[File:3-4 Heart.gif|link=]]}}}}}}</span></onlyinclude>


==Purpose==
==Purpose==
This provides a more intuitive way of indicating how much damage an attack does. For attacks that do more than one heart of damage, this template can be used several times in succession.
This provides a more intuitive way of indicating how much damage an attack does.


==Usage==
==Usage==
{{Usage|fraction}}
{{Usage|Number}}
{{Usage/Param|fraction|Number out of four (e.g. "1" for one-quarter heart).|optional|4 (full heart)}}
{{Usage/Param|Number|Number of hearts of damage done.}}
{{Usage/Example}}<pre>
{{Usage/Example}}<pre>
{{H|4}}{{H}}<br>
{{H|0.25}}<br>
{{H|3}}<br>
{{H|0.5}}<br>
{{H|2}}<br>
{{H|0.75}}<br>
{{H|1}}<br>
{{H|1}}<br>
{{H|0}}</pre>
{{H|1.25}}<br>
{{H|1.5}}<br>
{{H|1.75}}<br>
{{H|2}}</pre>
{{Usage/Result|
{{Usage/Result|
{{H|4}}{{H}}<br>
<br>
{{H|3}}<br>
{{H|0.25}}<br>
{{H|2}}<br>
{{H|0.5}}<br>
{{H|0.75}}<br>
{{H|1}}<br>
{{H|1}}<br>
{{H|0}}
{{H|1.25}}<br>
{{H|1.5}}<br>
{{H|1.75}}<br>
{{H|2}}
}}
}}




{{Cat|Utility Templates}}
{{Cat|Utility Templates}}
autopatrol
3,554

edits

Navigation menu