Template:StatTable: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
(Created page with "<includeonly> {| class="pkmn-stats" ! scope="row" class="hp" | HP: | {{HP}} | style="width:{{#expr: min({{HP}},255)}}px" | |- ! scope="row" class="atk" | Attack: | {{Attack}} | style="width:{{#expr: min({{Attack}},255)}}px" | |- ! scope="row" class="def" | Defense: | {{Defense}} | style="width:{{#expr: min({{Defense}},255)}}px" | |- ! scope="row" class="spa" | Sp. Atk: | {{SpAtk}} | style="width:{{#expr: min({{SpAtk}},255)}}px" | |- ! scope="row" class="spd" | Sp.&n...")
 
No edit summary
Line 2: Line 2:
{| class="pkmn-stats"
{| class="pkmn-stats"
! scope="row" class="hp" | HP:
! scope="row" class="hp" | HP:
| {{HP}}
| {{{HP|N/A}}}
| style="width:{{#expr: min({{HP}},255)}}px" |
| style="width:{{#ifexpr: {{{HP|0}}} > 255 | 255 | {{{HP|0}}} }}px" |
|-
|-
! scope="row" class="atk" | Attack:
! scope="row" class="atk" | Attack:
| {{Attack}}
| {{{Attack|N/A}}}
| style="width:{{#expr: min({{Attack}},255)}}px" |
| style="width:{{#ifexpr: {{{Attack|0}}} > 255 | 255 | {{{Attack|0}}} }}px" |
|-
|-
! scope="row" class="def" | Defense:
! scope="row" class="def" | Defense:
| {{Defense}}
| {{{Defense|N/A}}}
| style="width:{{#expr: min({{Defense}},255)}}px" |
| style="width:{{#ifexpr: {{{Defense|0}}} > 255 | 255 | {{{Defense|0}}} }}px" |
|-
|-
! scope="row" class="spa" | Sp.&nbsp;Atk:
! scope="row" class="spa" | Sp.&nbsp;Atk:
| {{SpAtk}}
| {{{SpAtk|N/A}}}
| style="width:{{#expr: min({{SpAtk}},255)}}px" |
| style="width:{{#ifexpr: {{{SpAtk|0}}} > 255 | 255 | {{{SpAtk|0}}} }}px" |
|-
|-
! scope="row" class="spd" | Sp.&nbsp;Def:
! scope="row" class="spd" | Sp.&nbsp;Def:
| {{SpDef}}
| {{{SpDef|N/A}}}
| style="width:{{#expr: min({{SpDef}},255)}}px" |
| style="width:{{#ifexpr: {{{SpDef|0}}} > 255 | 255 | {{{SpDef|0}}} }}px" |
|-
|-
! scope="row" class="spe" | Speed:
! scope="row" class="spe" | Speed:
| {{Speed}}
| {{{Speed|N/A}}}
| style="width:{{#expr: min({{Speed}},255)}}px" |
| style="width:{{#ifexpr: {{{Speed|0}}} > 255 | 255 | {{{Speed|0}}} }}px" |
|-
|-
! class="total" | Total:
! class="total" | Total:
| {{#expr: {{HP}}+{{Attack}}+{{Defense}}+{{SpAtk}}+{{SpDef}}+{{Speed}} }}
| {{#ifexpr:
|-
    ({{{HP|0}}}+{{{Attack|0}}}+{{{Defense|0}}}+{{{SpAtk|0}}}+{{{SpDef|0}}}+{{{Speed|0}}}) > 0
  | {{#expr: {{{HP|0}}}+{{{Attack|0}}}+{{{Defense|0}}}+{{{SpAtk|0}}}+{{{SpDef|0}}}+{{{Speed|0}}} }}
  | N/A
  }}
|}
|}
</includeonly><noinclude>
</includeonly>
This template draws the Bulbapedia-style base–stat bar chart.   
<noinclude>
This template draws the Bulbapedia-style base-stat bar chart.   
Parameters: `HP Attack Defense SpAtk SpDef Speed`.
Parameters: `HP Attack Defense SpAtk SpDef Speed`.
</noinclude>
</noinclude>

Revision as of 23:24, 18 May 2025


This template draws the Bulbapedia-style base-stat bar chart. Parameters: `HP Attack Defense SpAtk SpDef Speed`.