Template:KeitaBossPokemon: Difference between revisions

From Pokemon Revolution Online Wiki
Jump to navigation Jump to search
Undo revision 34132 by Keita (talk)
Tags: Undo Reverted
No edit summary
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
<b>BossPokemon Template</b> is the template that adds the <b>Pokemon lineup</b> to the [[Template:BossNPCLineup|BossNPCLineup Template]]. <br>
    <b>KeitaBossPokemon Template</b> is the template that adds the <b>Pokemon lineup</b> to the [[Template:KeitaBossNPCLineup|KeitaBossNPCLineup Template]]. <br>
It's used in correspondence with [[Template:BossNPCLineup|BossNPCLineup Template]] and with the [[Template:NPCMove|NPCMove template]] being an optional addon for adding moves. <br>
    It's used in correspondence with [[Template:KeitaBossNPCLineup|KeitaBossNPCLineup Template]] and with the [[Template:KeitaNPCMove|KeitaNPCMove template]] being an optional addon for adding moves. <br>
==Parameters and arguments==
    ==Parameters and arguments==
   
    <ul>
    <li>'''Name:''' Input the Pokemon name (e.g Gyarados)</li>
    <li>'''Form:''' Input the Pokemon form/counterpart, if any (e.g Shiny Mega Gyarados or Christmas Zekrom)</li>
    <li>'''Nature:''' Input the Pokemon's Nature, if any (e.g Jolly)</li>
    <li>'''Ability:''' Input the Pokemon's Ability, if any (e.g Intimidate)</li>
    <li>'''Item:''' Input the Pokemon's Held Item, if any (e.g Leftovers)</li>
    <li>'''Moveset:''' If the Pokemon have any moves, use the [[Template:KeitaNPCMove|KeitaNPCMove template]]</li>
    </ul>
    ===Example===
    This example also features the [[Template:KeitaNPCMove|KeitaNPCMove template]]. <br>
    The first Pokemon in the lineup has a complete set of moves and a special form, while the second Pokemon doesn't. <br>
    <pre style="color: red">
    <nowiki>{{KeitaBossNPCLineup| Boss=Professor Oak| Lineup=
    {{KeitaBossPokemon | Name=Zekrom | Form=Christmas | Nature=Adamant | Ability=Teravolt | Item=Leftovers | Moveset=
    {{KeitaNPCMove | Bolt Strike}}{{KeitaNPCMove | Stone Edge}}{{ KeitaNPCMove | Outrage}}{{KeitaNPCMove | Outrage}} }}
   
    {{KeitaBossPokemon | Name=Darkrai | Form= | Nature=Timid | Ability=Bad Dreams | Item=Leftovers }}


<ul>
{{KeitaBossPokemon | Name=Zekrom | Form=Christmas | Nature=Adamant | Ability=Teravolt | Item=Leftovers | Moveset=
<li>'''Name:''' Input the Pokemon name (e.g Gyarados)</li>
    {{KeitaNPCMove | Bolt Strike}}{{KeitaNPCMove | Stone Edge}}{{ KeitaNPCMove | Outrage}}{{KeitaNPCMove | Outrage}} }}
<li>'''Form:''' Input the Pokemon form/counterpart, if any (e.g Shiny Mega Gyarados or Christmas Zekrom)</li>
    }}</nowiki>
<li>'''Nature:''' Input the Pokemon's Nature, if any (e.g Jolly)</li>
    </pre>
<li>'''Ability:''' Input the Pokemon's Ability, if any (e.g Intimidate)</li>
    === Result ===
<li>'''Item:''' Input the Pokemon's Held Item, if any (e.g Leftovers)</li>
    {{KeitaBossNPCLineup| Boss=Professor Oak| Lineup=
<li>'''Moveset:''' If the Pokemon have any moves, use the [[Template:NPCMove|NPCMove template]]</li>
   
</ul>
    {{KeitaBossPokemon | Name=Zekrom | Form=Christmas | Nature=Adamant | Ability=Teravolt | Item=Leftovers | Moveset=
===Example===
    {{KeitaNPCMove | Bolt Strike}}{{KeitaNPCMove | Stone Edge}}{{ KeitaNPCMove | Outrage}}{{KeitaNPCMove | Outrage}} }}
This example also features the [[Template:NPCMove|NPCMove template]]. <br>
   
The first Pokemon in the lineup has a complete set of moves and a special form, while the second Pokemon doesn't. <br>
    {{KeitaBossPokemon | Name=Darkrai | Form= | Nature=Timid | Ability=Bad Dreams | Item=Leftovers }}
<pre style="color: red">
     }}
<nowiki>{{BossNPCLineup| Boss=Professor Oak| Lineup=
     </noinclude>
{{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 }}
}}</nowiki>
</pre>
=== Result ===
{{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 }}
}}
</noinclude>
 
 
 
<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%;">
    <table width="100%" style="text-align: center;">
    <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>
    </tr>
    <tr>
    <td>
    <table width="75%" align="center" style="text-align: center;">
    <tr style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF;">
    <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>
    <tr style="background-color: #FFFFFF; cellpadding: 3px">
    <td>{{#if:{{{Nature|}}}|{{{Nature}}}|Random}}</td>
    <td>{{#if:{{{Ability|}}}|[[{{{Ability}}}_(ability)|{{{Ability}}}]]|Random}}</td>
    <td>{{#if:{{{Item|}}}|[[{{{Item}}}]]|None}}</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>
    <!-- Non-collapsible moves table -->
    <div class="moves-container-{{#var:pname}}">
      <table id="moves-table-{{#var:pname}}" width="100%" style="text-align: center; display: none;">
        <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>
    </div>
      
      
    <!-- Show/Hide button using MediaWiki's built-in collapsible functionality -->
<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}}}}
    <div class="mw-collapsible mw-collapsed" data-collapsetext="Hide Moves" data-expandtext="Show Moves" style="margin-top: 5px; text-align: center;">
  <div class="wrapper-for-pokemonlineup">
      <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;">
      <td class="keita-pokemon-cell" style="background-color:#{{{{#var:type1}}_color_light}}; border-radius: 25px; border: 3px solid #{{{{#var:type1}}_color_dark}}; padding: 10px; margin: 10px; width: 45%; max-width: 450px; min-width: 300px; vertical-align: top;">
        Show Moves
        <table width="100%" style="text-align: center;">
      </div>
          <tr>
      <div class="mw-collapsible-content" style="display:none;">
            <td colspan="5">
        <!-- This is empty, as it's just used as a trigger -->
              <div>
        <script>
                [[File:{{#if:{{{Counterpart|}}}|{{ucfirst:{{{Counterpart}}}}}_{{#var:pname}}|{{#if:{{{Form|}}}|{{{Form}}}_{{#var:pname}}|{{#var:pname}}_Front_Sprite}}}}.png|responsive|max-width=150px]]
          /* This will be added to common.js */
                <div style="background-color:#{{{{#var:type1}}_color}}; border: 1px solid #{{{{#var:type1}}_color_dark}}; border-radius: 25px; padding: 5px; margin: auto auto; margin-top: 5px; margin-bottom: 5px; width: 80%; max-width: 200px; color: #FFFFFF; font-weight: bold;">
          /*
                  {{#if:{{{Counterpart|}}}|{{ucfirst:{{{Counterpart}}}}}}}{{#if:{{{Form|}}}|{{{Form}}}}} [[{{#var:pname}}|<span style="color:#FFFFFF;">{{#var:pname}}</span>]]
           $(document).ready(function() {
                </div>
             $('.mw-collapsible').each(function() {
              </div>
              var $this = $(this);
            </td>
              var pokemonName = $this.closest('td').find('.moves-container-').attr('class').split('-').pop();
          </tr>
              var $movesTable = $('#moves-table-' + pokemonName);
          <tr>
             
            <td>
              $this.find('.mw-collapsible-toggle').click(function() {
              <table width="100%" align="center" style="text-align: center; margin-bottom: 10px;">
                if ($movesTable.is(':visible')) {
                <tr style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF;">
                  $movesTable.hide();
                  <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33%; padding: 5px;">[[Natures|<span style="color: #FFFFFF">Nature</span>]]</th>
                } else {
                  <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33%; padding: 5px;">[[Abilities|<span style="color: #FFFFFF">Ability</span>]]</th>
                  $movesTable.show();
                  <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33%; padding: 5px;">Item</th>
                }
                </tr>
              });
                <tr style="background-color: #FFFFFF;">
            });
                  <td style="padding: 5px;">{{#if:{{{Nature|}}}|{{{Nature}}}|Random}}</td>
          });
                  <td style="padding: 5px;">{{#if:{{{Ability|}}}|[[{{{Ability}}}_(ability)|{{{Ability}}}]]|Random}}</td>
          */
                  <td style="padding: 5px;">{{#if:{{{Item|}}}|[[{{{Item}}}]]|None}}</td>
        </script>
                </tr>
      </div>
              </table>
    </div>
           <tr>
    </td>
             <td>
    </tr>
              <div class="keita-moves-container">
    </table>
                  <div class="mw-collapsible mw-collapsed" style="width: 100%">
    </td>
                      <div class="mw-collapsible-toggle" style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF; padding: 5px; border-radius: 5px; text-align: center; cursor: pointer; margin-bottom: 5px; display: block; width: 100%;">
    {{#ifexpr:{{#var:rows}} = 2|{{#vardefine:rows|0}}</tr><tr>}}{{#ifeq:{{ucfirst:{{{Form}}}}}|Mega|{{PokemonArray}}}}</includeonly>
                          Show Moves
                      </div>
                      <div class="mw-collapsible-content" style="overflow-x: auto; display: block; clear: both">
                          <table width="100%" class="keita-moves-table" style="text-align: center;">
                              <tr style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF;">
                                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;">Move</th>
                                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;">Type</th>
                                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;">Category</th>
                                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;">Base Power</th>
                                <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;">Accuracy</th>
                              </tr>
                              {{{Moveset|}}}
                            </table>
                      </div>
                  </div>
                  </div>
              </div>
            </td>
          </tr>
        </table>
      </td>
      {{#ifexpr:{{#var:rows}} = 2|{{#vardefine:rows|0}}</tr><tr class="keita-lineup-row">}}{{#ifeq:{{ucfirst:{{{Form}}}}}|Mega|{{PokemonArray}}}}
     
  </div>
  </includeonly>

Latest revision as of 07:46, 3 April 2025

   KeitaBossPokemon Template is the template that adds the Pokemon lineup to the KeitaBossNPCLineup Template. 
It's used in correspondence with KeitaBossNPCLineup Template and with the KeitaNPCMove 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 KeitaNPCMove template
   ===Example===
   This example also features the KeitaNPCMove template. 
The first Pokemon in the lineup has a complete set of moves and a special form, while the second Pokemon doesn't.
    {{KeitaBossNPCLineup| Boss=Professor Oak| Lineup=
    {{KeitaBossPokemon | Name=Zekrom | Form=Christmas | Nature=Adamant | Ability=Teravolt | Item=Leftovers | Moveset=
    {{KeitaNPCMove | Bolt Strike}}{{KeitaNPCMove | Stone Edge}}{{ KeitaNPCMove | Outrage}}{{KeitaNPCMove | Outrage}} }}
    
    {{KeitaBossPokemon | Name=Darkrai | Form= | Nature=Timid | Ability=Bad Dreams | Item=Leftovers }}

{{KeitaBossPokemon | Name=Zekrom | Form=Christmas | Nature=Adamant | Ability=Teravolt | Item=Leftovers | Moveset=
    {{KeitaNPCMove | Bolt Strike}}{{KeitaNPCMove | Stone Edge}}{{ KeitaNPCMove | Outrage}}{{KeitaNPCMove | Outrage}} }}
    }}
    
   === Result ===
   





         Professor Oak's Lineup
max-width=200px
max-width=200px
               max-width=150px
                 Christmas Zekrom
Nature Ability Item
Adamant Teravolt Leftovers
                         Show Moves
Move Type Category Base Power Accuracy
Bolt Strike Electric Physical 130 85
Stone Edge Rock Physical 100 80
Outrage Dragon Physical 120 100
Outrage Dragon Physical 120 100
Nature Ability Item
Timid Bad Dreams Leftovers
                         Show Moves
Move Type Category Base Power Accuracy
  • 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.