Template:Pokémon Infobox: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
(Created page with "<includeonly> {| class="infobox pokemon-infobox" style="width:220px; text-align:left; font-size:90%;" |- ! colspan="2" style="text-align:center; padding:4px 0;" | [[File:{{{image|}}}|200px|link=]] |- ! Name | {{{name|}}} |- ! Type | {{{type|}}} |- ! Catch rate | {{{catchRate|}}} |- ! Abilities | {{{abilities|}}} |- ! Spawn locations | {{{spawnLocations|}}} |- ! Gender ratio | {{{genderRatio|}}}% ♂ |- ! EV yield | {{{evYield|}}} |- ! Egg group | {{{eggGroup|}}} |- ! Mou...")
 
No edit summary
 
(57 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
{| class="infobox pokemon-infobox" style="width:220px; text-align:left; font-size:90%;"
<templatestyles src="Template:Pokémon_Infobox/styles.css"/><table class="pkmn-infobox"
|-
      style="
! colspan="2" style="text-align:center; padding:4px 0;"
        width:280px;
| [[File:{{{image|}}}|200px|link=]]
        /* 5-px twin border: outer dark, inner normal */
|-
        border-width:5px;
! Name
        border-style:solid;
| {{{name|}}}
        border-color:#{{#if:{{{primarytype|}}}
|-
                          |{{{{lc:{{{primarytype}}}}} color dark}}
! Type
                          |{{{color|4CAF50}}}}};
| {{{type|}}}
        box-shadow:0 0 0 3px #{{#if:{{{primarytype|}}}
|-
                                  |{{{{lc:{{{primarytype}}}}} color}}
! Catch rate
                                  |{{{color|4CAF50}}}}};
| {{{catchRate|}}}
        /* light background shade */
|-
      ">
! Abilities
  <!-- ─── title & image ───────────────────────────────────────── -->
| {{{abilities|}}}
  <tr>
|-
    <th colspan="3" class="header-main"
! Spawn locations
        style="background:#{{#if:{{{primarytype|}}}|{{{{lc:{{{primarytype}}}}} color}}|{{{color|FFFFFF}}}}}; color:#FFF;">{{{name}}} #{{{dex}}}
| {{{spawnLocations|}}}
    </th>
|-
  </tr>
! Gender ratio
 
| {{{genderRatio|}}}% ♂
  <tr>
|-
    <td colspan="3" style="text-align:center; padding:6px 0;">{{{image}}}
! EV yield
    </td>
| {{{evYield|}}}
  </tr>
|-
 
! Egg group
  <!-- type badges -->
| {{{eggGroup|}}}
  <tr>
|-
    <td colspan="3" style="text-align:center;">
! Mountable
      <div class="type-box">{{{typeBadges}}}</div>
| {{{mount|}}}
    </td>
|-
  </tr>
! Behavior
 
| {{{behavior|}}}
  <!-- ─── abilities ───────────────────────────────────────────── -->
|}
  <tr><th colspan="3" class="subhead">Abilities</th></tr>
</includeonly>
  <tr><td colspan="3">
<noinclude>
    <div class="abil-grid">
== Template documentation ==
      <div class="abil-box">{{{ability1|—}}}</div>{{#if:{{{hiddenAbility|}}}|<div class="abil-box"><span class="abil-name">{{{hiddenAbility}}}</span><br><span class="hidden-small">Hidden&nbsp;Ability</span></div>}}
This template renders a Pokémon-style infobox.
    </div>
Parameters:
  </td></tr>
 
  <!-- ─── breeding ────────────────────────────────────────────── -->
  {{#if:{{{eggGroup|}}}
    | <!-- only show breeding if an egg group was provided -->
      <tr><th colspan="3" class="subhead">Breeding</th></tr>
      <tr><td colspan="3">
        <div class="breed-grid">
          <div class="breed-box">Egg&nbsp;Groups<br><b>{{{eggGroup|}}}</b>
          </div>
          <div class="breed-box">Hatch&nbsp;time<br><b>{{{eggCycles|?}}}&nbsp;cycles</b>
          </div>
        </div>
      </td></tr>
 
      <tr><th scope="row">Gender ratio</th><td colspan="2">{{{genderRatio}}}</td></tr>
  }}
 
  <!-- ─── EV yield ────────────────────────────────────────────── -->
  <tr><th colspan="3" class="subhead">EV yield</th></tr>
  <tr><td colspan="3">
    <div class="ev-wrapper">
      <div class="ttl">Total: {{{evTotal}}}</div>
      <div class="ev-row">{{{evBoxes}}}</div>
    </div>
  </td></tr>


* <code>image</code>: Filename of the image (e.g. <code>Bulbasaur.png</code>)
  <!-- ─── misc ────────────────────────────────────────────────── -->
* <code>name</code>: Species name
  <tr><th colspan="3" class="subhead">Misc info</th></tr>
* <code>type</code>: One or two types separated by “/
  <tr><th scope="row">Catch rate</th>       <td colspan="2">{{{catchRate}}}</td></tr>
* <code>catchRate</code>: Catch rate number
  <tr><th scope="row">Behavior</th>         <td colspan="2">{{{behavior}}}</td></tr>
* <code>abilities</code>: Comma-separated abilities (with “Hidden:&nbsp;X” for hidden)
  <tr><th scope="row">Mountable</th>        <td colspan="2">{{{mount}}}</td></tr>
* <code>spawnLocations</code>: Comma-separated spawn areas
  <tr><th scope="row">Gigantamax</th>      <td colspan="2">{{{canGigantamax}}}</td></tr>
* <code>genderRatio</code>: Percent male (e.g. “87.5”)
  <tr><th scope="row">Fly</th>              <td colspan="2">{{{canFly}}}</td></tr>
* <code>evYield</code>: EV yields, e.g. <code>specialAttack:1</code>
  <tr><th scope="row">Surf</th>             <td colspan="2">{{{canSurf}}}</td></tr>
* <code>eggGroup</code>: Comma-separated egg groups
  <tr><th scope="row">Shoulder ride</th>   <td colspan="2">{{{canRideShoulder}}}</td></tr>
* <code>mount</code>: “Yes” or “No”
* <code>behavior</code>: Timid/Passive/Aggressive percentages


Usage example:
</table>
<pre>
</includeonly>
{{Pokémon Infobox
<noinclude>{{documentation}}</noinclude>
|image=Bulbasaur.png
|name=Bulbasaur
|type=GRASS / POISON
|catchRate=45
|abilities=Overgrow, Hidden: Chlorophyll
|spawnLocations=LAND
|genderRatio=87.5
|evYield=specialAttack:1
|eggGroup=MONSTER, GRASS
|mount=No
|behavior=Timid 80% / Passive 0% / Aggressive 20%
}}
</pre>
</noinclude>

Latest revision as of 07:32, 1 June 2025