Template:StatTable: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
No edit summary
Tag: Reverted
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}}};">


  <thead>
    <thead>
    <tr>
      <tr>
      <th class="hdr-stat" colspan="2" rowspan="2">Stat</th>
        <th class="hdr-stat" colspan="2" rowspan="2">Stat</th>
      <th class="hdr-range" colspan="2">Range</th>
        <th class="hdr-range" colspan="2">Range</th>
    </tr>
      </tr>
    <tr>
      <tr>
      <th class="hdr-sub">At Lv 50</th>
        <th class="hdr-sub">At Lv 50</th>
      <th class="hdr-sub">At Lv 100</th>
        <th class="hdr-sub">At Lv 100</th>
    </tr>
      </tr>
  </thead>
    </thead>


  <tbody>
    <tbody>
    <!-- HP -->
      <!-- HP -->
    <tr class="row-hp">
      <tr class="row-hp">
      <td class="lab">HP:<span>{{{HP}}}</span></td>
        <td class="lab">HP:<span>{{{HP}}}</span></td>
      <td class="bar">
        <td class="bar">
        <div class="fill"
          <div class="fill"
            style="width:{{#expr: ({{{HP|0}}}*100/255) round 0}}%;"></div>
              style="width:{{#expr:({{{HP|0}}}*100/255) round 0}}%;"></div>
      </td>
        </td>
      <td class="range"><small>
        <td class="range"><small>
        {{#ifexpr:{{{HP}}}=1|1
          {{#ifexpr:{{{HP}}}=1|1
          |{{#expr:((0+2*{{{HP}}}+(0/4))*50/100)+10+50}}}} –  
            |{{#expr:((0+2*{{{HP}}}+(0/4))*50/100)+10+50}}}} –  
        {{#ifexpr:{{{HP}}}=1|1
          {{#ifexpr:{{{HP}}}=1|1
          |{{#expr:((31+2*{{{HP}}}+(252/4))*50/100)+10+50}}}}
            |{{#expr:((31+2*{{{HP}}}+(252/4))*50/100)+10+50}}}}
      </small></td>
        </small></td>
      <td class="range"><small>
        <td class="range"><small>
        {{#ifexpr:{{{HP}}}=1|1
          {{#ifexpr:{{{HP}}}=1|1
          |{{#expr:((0+2*{{{HP}}}+(0/4))*100/100)+10+100}}}} –  
            |{{#expr:((0+2*{{{HP}}}+(0/4))*100/100)+10+100}}}} –  
        {{#ifexpr:{{{HP}}}=1|1
          {{#ifexpr:{{{HP}}}=1|1
          |{{#expr:((31+2*{{{HP}}}+(252/4))*100/100)+10+100}}}}
            |{{#expr:((31+2*{{{HP}}}+(252/4))*100/100)+10+100}}}}
      </small></td>
        </small></td>
    </tr>
      </tr>


    <!-- Attack -->
      <!-- Attack -->
    <tr class="row-atk">
      <tr class="row-atk">
      <td class="lab">Attack:<span>{{{Attack}}}</span></td>
        <td class="lab">Attack:<span>{{{Attack}}}</span></td>
      <td class="bar">
        <td class="bar">
        <div class="fill"
          <div class="fill"
            style="width:{{#expr: ({{{Attack|0}}}*100/255) round 0}}%;"></div>
              style="width:{{#expr:({{{Attack|0}}}*100/255) round 0}}%;"></div>
      </td>
        </td>
      <td class="range"><small>
        <td class="range"><small>
        {{#ifexpr:{{{Attack}}}=1|1
           {{#expr:floor((((0+2*{{{Attack}}}+(0/4))*50/100)+5)*.9)}}}} –  
           |{{#expr:floor((((0+2*{{{Attack}}}+(0/4))*50/100)+5)*.9)}}}} –  
          {{#expr:floor((((31+2*{{{Attack}}}+(252/4))*50/100)+5)*1.1)}}}}
        {{#expr:floor((((31+2*{{{Attack}}}+(252/4))*50/100)+5)*1.1)}}}}
        </small></td>
      </small></td>
        <td class="range"><small>
      <td class="range"><small>
          {{#expr:floor((((0+2*{{{Attack}}}+(0/4))*100/100)+5)*.9)}}}} –  
        {{#expr:floor((((0+2*{{{Attack}}}+(0/4))*100/100)+5)*.9)}}}} –  
          {{#expr:floor((((31+2*{{{Attack}}}+(252/4))*100/100)+5)*1.1)}}}}
        {{#expr:floor((((31+2*{{{Attack}}}+(252/4))*100/100)+5)*1.1)}}}}
        </small></td>
      </small></td>
      </tr>
    </tr>


    <!-- Defense -->
      <!-- …and repeat the same 4-<td> pattern for Defense, SpAtk, SpDef, Speed… -->
    <tr class="row-def">
      <td class="lab">Defense:<span>{{{Defense}}}</span></td>
      <td class="bar">
        <div class="fill"
            style="width:{{#expr: ({{{Defense|0}}}*100/255) round 0}}%;"></div>
      </td>
      <td class="range"><small>
        {{#expr:floor((((0+2*{{{Defense}}}+(0/4))*50/100)+5)*.9)}}}} –
        {{#expr:floor((((31+2*{{{Defense}}}+(252/4))*50/100)+5)*1.1)}}}}
      </small></td>
      <td class="range"><small>
        {{#expr:floor((((0+2*{{{Defense}}}+(0/4))*100/100)+5)*.9)}}}} –
        {{#expr:floor((((31+2*{{{Defense}}}+(252/4))*100/100)+5)*1.1)}}}}
      </small></td>
    </tr>


    <!-- Sp. Atk -->
      <!-- Total -->
    <tr class="row-spa">
      <tr class="total">
      <td class="lab">Sp.&nbsp;Atk:<span>{{{SpAtk}}}</span></td>
        <td class="lab">Total:<span>
      <td class="bar">
          {{#expr:
        <div class="fill"
            {{{HP}}}+{{{Attack}}}+{{{Defense}}}+
            style="width:{{#expr: ({{{SpAtk|0}}}*100/255) round 0}}%;"></div>
            {{{SpAtk}}}+{{{SpDef}}}+{{{Speed}}}
      </td>
          }}
      <td class="range"><small>
        </span></td>
        {{#expr:floor((((0+2*{{{SpAtk}}}+(0/4))*50/100)+5)*.9)}}}}
        <td class="bar"></td>
        {{#expr:floor((((31+2*{{{SpAtk}}}+(252/4))*50/100)+5)*1.1)}}}}
        <td class="range"></td>
      </small></td>
        <td class="range"></td>
      <td class="range"><small>
       </tr>
        {{#expr:floor((((0+2*{{{SpAtk}}}+(0/4))*100/100)+5)*.9)}}}}
    </tbody>
        {{#expr:floor((((31+2*{{{SpAtk}}}+(252/4))*100/100)+5)*1.1)}}}}
  </table>
      </small></td>
</div></includeonly>
    </tr>
<noinclude>
 
<pre>{{StatTable
    <!-- Sp. Def -->
|HP=80 |Attack=82 |Defense=83 |SpAtk=100 |SpDef=100 |Speed=80
    <tr class="row-spd">
}}</pre>
      <td class="lab">Sp.&nbsp;Def:<span>{{{SpDef}}}</span></td>
[[Category:Template documentation]]
      <td class="bar">
</noinclude>
        <div class="fill"
            style="width:{{#expr: ({{{SpDef|0}}}*100/255) round 0}}%;"></div>
      </td>
      <td class="range"><small>
        {{#expr:floor((((0+2*{{{SpDef}}}+(0/4))*50/100)+5)*.9)}}}} –
        {{#expr:floor((((31+2*{{{SpDef}}}+(252/4))*50/100)+5)*1.1)}}}}
      </small></td>
       <td class="range"><small>
        {{#expr:floor((((0+2*{{{SpDef}}}+(0/4))*100/100)+5)*.9)}}}} –
        {{#expr:floor((((31+2*{{{SpDef}}}+(252/4))*100/100)+5)*1.1)}}}}
      </small></td>
    </tr>
 
    <!-- Speed -->
    <tr class="row-spe">
      <td class="lab">Speed:<span>{{{Speed}}}</span></td>
      <td class="bar">
        <div class="fill"
            style="width:{{#expr: ({{{Speed|0}}}*100/255) round 0}}%;"></div>
      </td>
      <td class="range"><s

Revision as of 06:25, 19 May 2025


{{StatTable
 |HP=80 |Attack=82 |Defense=83 |SpAtk=100 |SpDef=100 |Speed=80
}}