Template:KeitaBossPokemon: Difference between revisions

From Pokemon Revolution Online Wiki
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 35: Line 35:




<includeonly>{{#ifeq:{{ucfirst:{{{Form}}}}}|Mega|{{MegaPokemonArray}}}}{{#vardefine:pname|{{ucfirst:{{{Name}}}}}}}{{#vardefine:iteration|{{#arraysearch:pname|{{#var:pname}}}}}}{{#vardefine:type1|{{#arrayindex:type1|{{#var:iteration}}}}}}{{#vardefine:type2|{{#arrayindex:type2|{{#var:iteration}}}}}}{{#vardefine:rows|{{#expr:{{#var:rows}}+1}}}}
<includeonly>
    {{#ifeq:{{ucfirst:{{{Form}}}}}|Mega|{{MegaPokemonArray}}}}
    {{#vardefine:pname|{{ucfirst:{{{Name}}}}}}}
    {{#vardefine:iteration|{{#arraysearch:pname|{{#var:pname}}}}}}
    {{#vardefine:type1|{{#arrayindex:type1|{{#var:iteration}}}}}}
    {{#vardefine:type2|{{#arrayindex:type2|{{#var:iteration}}}}}}
    {{#vardefine:rows|{{#expr:{{#var:rows}}+1}}}}
     <td style="background-color:#{{{{#var:type1}}_color_light}}; border-radius: 25px; border: 3px solid #{{{{#var:type1}}_color_dark}}; padding: 3px; margin: auto auto; width: 50%;">
     <td style="background-color:#{{{{#var:type1}}_color_light}}; border-radius: 25px; border: 3px solid #{{{{#var:type1}}_color_dark}}; padding: 3px; margin: auto auto; width: 50%;">
    <table width="100%" style="text-align: center;">
      <table width="100%" style="text-align: center;">
    <tr>
        <tr>
    <td colspan="5"><div>[[File:{{#if:{{{Counterpart|}}}|{{ucfirst:{{{Counterpart}}}}}_{{#var:pname}}|{{#if:{{{Form|}}}|{{{Form}}}_{{#var:pname}}|{{#var:pname}}_Front_Sprite}}}}.png]]<div style="background-color:#{{{{#var:type1}}_color}}; border: 1px solid #{{{{#var:type1}}_color_dark}}; border-radius: 25px; padding: 3px; margin: auto auto; margin-top: 2px; margin-bottom: 3px; width: 45%; color: #FFFFFF; font-weight: bold;">{{#if:{{{Counterpart|}}}|{{ucfirst:{{{Counterpart}}}}}}}{{#if:{{{Form|}}}|{{{Form}}}}} [[{{#var:pname}}|<span style="color:#FFFFFF;">{{#var:pname}}</span>]]</div></div></td>
          <td colspan="5">
    </tr>
            <div>
    <tr>
              [[File:{{#if:{{{Counterpart|}}}|{{ucfirst:{{{Counterpart}}}}}_{{#var:pname}}|{{#if:{{{Form|}}}|{{{Form}}}_{{#var:pname}}|{{#var:pname}}_Front_Sprite}}}}.png]]
    <td>
              <div style="background-color:#{{{{#var:type1}}_color}}; border: 1px solid #{{{{#var:type1}}_color_dark}}; border-radius: 25px; padding: 3px; margin: auto auto; margin-top: 2px; margin-bottom: 3px; width: 45%; color: #FFFFFF; font-weight: bold;">
    <table width="75%" align="center" style="text-align: center;">
                {{{#if:{{{Counterpart|}}}|{{ucfirst:{{{Counterpart}}}}}}}{{#if:{{{Form|}}}|{{{Form}}}}} [[{{#var:pname}}|<span style="color:#FFFFFF;">{{#var:pname}}</span>]]
    <tr style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF;">
              </div>
    <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33% ">[[Natures|<span style="color: #FFFFFF">Nature</span>]]</th><th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33% ">[[Abilities|<span style="color: #FFFFFF">Ability</span>]]</th><th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33% ">Item</th></tr>
            </div>
    <tr style="background-color: #FFFFFF; cellpadding: 3px">
          </td>
    <td>{{#if:{{{Nature|}}}|{{{Nature}}}|Random}}</td>
        </tr>
    <td>{{#if:{{{Ability|}}}|[[{{{Ability}}}_(ability)|{{{Ability}}}]]|Random}}</td>
        <tr>
    <td>{{#if:{{{Item|}}}|[[{{{Item}}}]]|None}}</td>
          <td>
    </tr>
            <table width="75%" align="center" style="text-align: center;">
    </table>
              <tr style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF;">
    </td>
                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33% ">
    </tr>
                  [[Natures|<span style="color: #FFFFFF">Nature</span>]]
    <tr>
                </th>
    <td>
                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33% ">
    <!-- Non-collapsible moves table -->
                  [[Abilities|<span style="color: #FFFFFF">Ability</span>]]
    <div class="moves-container-{{#var:pname}}">
                </th>
      <table id="moves-table-{{#var:pname}}" width="100%" style="text-align: center; display: none;">
                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33% ">
        <tr style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF;">
                  Item
          <th style="border: 1px solid #{{{{#var:type1}}_color_dark}};">Move</th>
                </th>
          <th style="border: 1px solid #{{{{#var:type1}}_color_dark}};">Type</th>
              </tr>
          <th style="border: 1px solid #{{{{#var:type1}}_color_dark}};">Category</th>
              <tr style="background-color: #FFFFFF; cellpadding: 3px">
          <th style="border: 1px solid #{{{{#var:type1}}_color_dark}};">Base Power</th>
                <td>{{#if:{{{Nature|}}}|{{{Nature}}}|Random}}</td>
          <th style="border: 1px solid #{{{{#var:type1}}_color_dark}};">Accuracy</th>
                <td>{{#if:{{{Ability|}}}|[[{{{Ability}}}_(ability)|{{{Ability}}}]]|Random}}</td>
                <td>{{#if:{{{Item|}}}|[[{{{Item}}}]]|None}}</td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td>
            <!-- Moves Table with unique ID -->
            <table id="movesTable" width="100%" class="collapsible collapsed" style="text-align: center;">
              <tr style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF;">
                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}};">Move</th>
                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}};">Type</th>
                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}};">Category</th>
                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}};">Base Power</th>
                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}};">Accuracy</th>
              </tr>
              {{{Moveset|}}}
            </table>
            <!-- Custom Toggle Button placed below the table -->
            <div style="text-align: center; margin-top: 10px;">
              <button type="button" id="toggleMovesBtn" onclick="toggleMovesTable()">Show Moves</button>
            </div>
          </td>
         </tr>
         </tr>
        {{{Moveset|}}}
       </table>
       </table>
    </div>
   
    <!-- Show/Hide button using MediaWiki's built-in collapsible functionality -->
    <div class="mw-collapsible mw-collapsed" data-collapsetext="Hide Moves" data-expandtext="Show Moves" style="margin-top: 5px; text-align: center;">
      <div class="mw-collapsible-toggle" style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF; border: 1px solid #{{{{#var:type1}}_color_dark}}; border-radius: 10px; padding: 2px 8px; display: inline-block; cursor: pointer;">
        Show Moves
      </div>
      <div class="mw-collapsible-content" style="display:none;">
        <!-- This is empty, as it's just used as a trigger -->
        <script>
          /* This will be added to common.js */
          /*
          $(document).ready(function() {
            $('.mw-collapsible').each(function() {
              var $this = $(this);
              var pokemonName = $this.closest('td').find('.moves-container-').attr('class').split('-').pop();
              var $movesTable = $('#moves-table-' + pokemonName);
             
              $this.find('.mw-collapsible-toggle').click(function() {
                if ($movesTable.is(':visible')) {
                  $movesTable.hide();
                } else {
                  $movesTable.show();
                }
              });
            });
          });
          */
        </script>
      </div>
    </div>
    </td>
    </tr>
    </table>
     </td>
     </td>
     {{#ifexpr:{{#var:rows}} = 2|{{#vardefine:rows|0}}</tr><tr>}}{{#ifeq:{{ucfirst:{{{Form}}}}}|Mega|{{PokemonArray}}}}</includeonly>
     {{#ifexpr:{{#var:rows}} = 2|{{#vardefine:rows|0}}</tr><tr>}}
    {{#ifeq:{{ucfirst:{{{Form}}}}}|Mega|{{PokemonArray}}}}
    </includeonly>

Revision as of 22:02, 8 March 2025

BossPokemon Template is the template that adds the Pokemon lineup to the BossNPCLineup Template.
It's used in correspondence with BossNPCLineup Template and with the NPCMove template being an optional addon for adding moves.

Parameters and arguments

  • Name: Input the Pokemon name (e.g Gyarados)
  • Form: Input the Pokemon form/counterpart, if any (e.g Shiny Mega Gyarados or Christmas Zekrom)
  • Nature: Input the Pokemon's Nature, if any (e.g Jolly)
  • Ability: Input the Pokemon's Ability, if any (e.g Intimidate)
  • Item: Input the Pokemon's Held Item, if any (e.g Leftovers)
  • Moveset: If the Pokemon have any moves, use the NPCMove template

Example

This example also features the NPCMove template.
The first Pokemon in the lineup has a complete set of moves and a special form, while the second Pokemon doesn't.

{{BossNPCLineup| Boss=Professor Oak| Lineup=
{{BossPokemon | Name=Zekrom | Form=Christmas | Nature=Adamant | Ability=Teravolt | Item=Leftovers | Moveset=
{{NPCMove | Bolt Strike}}{{NPCMove | Stone Edge}}{{ NPCMove | Outrage}}{{NPCMove | Outrage}} }}

{{BossPokemon | Name=Darkrai | Form= | Nature=Timid | Ability=Bad Dreams | Item=Leftovers }}
}}

Result

Professor Oak's Lineup
Christmas Zekrom
NatureAbilityItem
Adamant Teravolt Leftovers
NatureAbilityItem
Timid Bad Dreams Leftovers
  • Emboldened moves avail from a STAB bonus when deployed by that Pokémon.
  • Italicized moves are functionally broken; see their individualized pages for more information.