Template:StatTable: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary Tag: Reverted |
||
| Line 1: | Line 1: | ||
<includeonly><templatestyles src="Template:StatTable/styles.css"/> | <includeonly><templatestyles src="Template:StatTable/styles.css"/> | ||
<div class="statbox"> | <div class="statbox"> | ||
<table style="border-color:{{{frame|#444}}}"> | <table style="border-color:{{{frame|#444}}}"> | ||
<!-- | <!-- 1. define four columns: auto | bar | range50 | range100 --> | ||
< | <colgroup> | ||
<col class="col-stat"/> | |||
<col class="col-bar"/> | |||
<col class="col-range"/> | |||
<col class="col-range"/> | |||
</ | </colgroup> | ||
<!-- | <!-- 2. headers --> | ||
<tr class=" | <thead> | ||
<tr> | |||
<th class="hdr-stat" colspan="2" rowspan="2">Stat</th> | |||
<th class="hdr-range" colspan="2">Range</th> | |||
</tr> | |||
</ | <tr> | ||
<th class="hdr-sub">At Lv 50</th> | |||
<th class="hdr-sub">At Lv 100</th> | |||
</tr> | |||
</thead> | |||
<!-- | <tbody> | ||
<tr class="row- | <!-- HP --> | ||
<tr class="row-hp"> | |||
<td class="lab">HP:<span>{{{HP}}}</span></td> | |||
<td class="bar"> | |||
<div class="fill" style="width:{{#expr: ( {{{HP|0}}} * 100 / 255 ) round 0}}%;"></div> | |||
</tr> | </td> | ||
<td class="range"> | |||
<small> | |||
{{#ifexpr: {{{HP|1}}} = 1 | 1 | |||
| {{#expr: ((0 + 2 * {{{HP}}} + (0/4)) * 50 / 100) + 10 + 50}}}} | |||
– | |||
{{#ifexpr: {{{HP|1}}} = 1 | 1 | |||
| {{#expr: ((31 + 2 * {{{HP}}} + (252/4)) * 50 / 100) + 10 + 50}}}} | |||
</small> | |||
</td> | |||
<td class="range"> | |||
<small> | |||
{{#ifexpr: {{{HP|1}}} = 1 | 1 | |||
| {{#expr: ((0 + 2 * {{{HP}}} + (0/4)) * 100 / 100) + 10 + 100}}}} | |||
– | |||
{{#ifexpr: {{{HP|1}}} = 1 | 1 | |||
| {{#expr: ((31 + 2 * {{{HP}}} + (252/4)) * 100 / 100) + 10 + 100}}}} | |||
</small> | |||
</td> | |||
</tr> | |||
<!-- | <!-- Repeat for Attack, Defense, SpAtk, SpDef, Speed, just swapping names/formulas --> | ||
<!-- | <!-- Total row (no bar, collapse last two into footnote/link) --> | ||
<tr class="total"> | |||
<td class="lab">Total:<span>{{#expr: | |||
{{{HP}}} + {{{Attack}}} + {{{Defense}}} + | |||
{{{SpAtk}}} + {{{SpDef}}} + {{{Speed}}} | |||
}}</span></td> | |||
<td class="bar"></td> | |||
<!-- you can leave these empty or colspan them if you prefer: --> | |||
<td class="range"></td> | |||
<td class="range"></td> | |||
</tr> | |||
</tbody> | |||
</table> | |||
</div></includeonly> | |||
<noinclude> | |||
<tr class="total"> | |||
</tr> | |||
</table> | |||
</div></includeonly><noinclude> | |||
<pre>{{StatTable | <pre>{{StatTable | ||
|HP=80 |Attack=82 |Defense=83 |SpAtk=100 |SpDef=100 |Speed=80 | |HP=80 |Attack=82 |Defense=83 |SpAtk=100 |SpDef=100 |Speed=80 | ||
Revision as of 06:08, 19 May 2025
{{StatTable
|HP=80 |Attack=82 |Defense=83 |SpAtk=100 |SpDef=100 |Speed=80
}}