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 3: Line 3:
   <table style="border-color:{{{frame|#444}}};">
   <table style="border-color:{{{frame|#444}}};">


    <!-- ← HERE is your thead, nested inside the table! -->
     <thead>
     <thead>
       <tr>
       <tr>
Line 14: Line 15:
     </thead>
     </thead>


    <!-- ← and here’s the tbody, also inside the table -->
     <tbody>
     <tbody>
      <!-- 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" style="width:{{#expr: ({{{HP|0}}}*100/255) round 0}}%;"></div>
           <div class="fill"
        </td>
              style="width:{{#expr:({{{HP|0}}}*100/255) round 0}}%;"></div>
        <td class="range">
          <small>
            {{#ifexpr: {{{HP}}}=1 | 1
              | {{#expr: ((0+2*{{{HP}}}+(0/4))*50/100)+10+50}}}}
            –
            {{#ifexpr: {{{HP}}}=1 | 1
              | {{#expr: ((31+2*{{{HP}}}+(252/4))*50/100)+10+50}}}}
          </small>
        </td>
        <td class="range">
          <small>
            {{#ifexpr: {{{HP}}}=1 | 1
              | {{#expr: ((0+2*{{{HP}}}+(0/4))*100/100)+10+100}}}}
            –
            {{#ifexpr: {{{HP}}}=1 | 1
              | {{#expr: ((31+2*{{{HP}}}+(252/4))*100/100)+10+100}}}}
          </small>
         </td>
         </td>
        <td class="range"><small>
          {{#ifexpr:{{{HP}}}=1|1
            |{{#expr:((0+2*{{{HP}}}+(0/4))*50/100)+10+50}}}} –
          {{#ifexpr:{{{HP}}}=1|1
            |{{#expr:((31+2*{{{HP}}}+(252/4))*50/100)+10+50}}}}
        </small></td>
        <td class="range"><small>
          {{#ifexpr:{{{HP}}}=1|1
            |{{#expr:((0+2*{{{HP}}}+(0/4))*100/100)+10+100}}}} –
          {{#ifexpr:{{{HP}}}=1|1
            |{{#expr:((31+2*{{{HP}}}+(252/4))*100/100)+10+100}}}}
        </small></td>
       </tr>
       </tr>


       <!-- Repeat Attack, Defense, SpAtk, SpDef, Speed in exactly the same 4-cell pattern -->
       <!-- …repeat for Attack, Defense, SpAtk, SpDef, Speed… -->


      <!-- Total -->
       <tr class="total">
       <tr class="total">
         <td class="lab">Total:<span>{{#expr:
         <td class="lab">Total:<span>{{#expr:
             {{{HP}}}+{{{Attack}}}+{{{Defense}}}+
             {{{HP}}}+{{{Attack}}}+{{{Defense}}}+
             {{{SpAtk}}}+{{{SpDef}}}+{{{Speed}}}
             {{{SpAtk}}}+{{{SpDef}}}+{{{Speed}}}
           }}</span>
           }}</span></td>
        </td>
         <td class="bar"></td>
         <td class="bar"></td>
         <td class="range"></td>
         <td class="range"></td>

Revision as of 06:12, 19 May 2025


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