Template:KeitaBossPokemon: Difference between revisions

From Pokemon Revolution Online Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<!-- 2. KeitaBossPokemon Template -->
<noinclude>
<noinclude>
<b>KeitaBossPokemon Template</b> is the template that adds the <b>Pokemon lineup</b> to the [[Template:KeitaBossNPCLineup|KeitaBossNPCLineup Template]]. <br>
<b>KeitaBossPokemon Template</b> is the template that adds the <b>Pokemon lineup</b> to the [[Template:KeitaBossNPCLineup|KeitaBossNPCLineup Template]]. <br>
Line 34: Line 33:
</noinclude>
</noinclude>


<includeonly
<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}}}}
  >{{#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 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;">
 
  <table width="100%" style="text-align: center;">
  <div class="keita-card-wrapper" style="display: flex; padding: 1rem">
    <tr>
    <div
      <td colspan="5">
      class="pokemon-card"
        <div>
      style="background-color:#{{{{#var:type1}}_color_light}}; border-radius: 15px; border: 2px solid #{{{{#var:type1}}_color_dark}}; padding: 10px; flex: 1 1 300px; min-width: 300px; max-width: 100%;"
           [[File:{{#if:{{{Counterpart|}}}|{{ucfirst:{{{Counterpart}}}}}_{{#var:pname}}|{{#if:{{{Form|}}}|{{{Form}}}_{{#var:pname}}|{{#var:pname}}_Front_Sprite}}}}.png|responsive|max-width=150px]]
    >
          <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;">
      <div class="pokemon-header" style="text-align: center">
            {{#if:{{{Counterpart|}}}|{{ucfirst:{{{Counterpart}}}}}}}{{#if:{{{Form|}}}|{{{Form}}}}} [[{{#var:pname}}|<span style="color:#FFFFFF;">{{#var:pname}}</span>]]
        <div class="pokemon-image">
          </div>
           [[File:{{#if:{{{Counterpart|}}}|{{ucfirst:{{{Counterpart}}}}}_{{#var:pname}}|{{#if:{{{Form|}}}|{{{Form}}}_{{#var:pname}}|{{#var:pname}}_Front_Sprite}}}}.png|max-width=100%]]
        </div>
        <div
          class="pokemon-name"
          style="background-color:#{{{{#var:type1}}_color}}; border: 1px solid #{{{{#var:type1}}_color_dark}}; border-radius: 15px; padding: 5px; margin: 5px auto; max-width: 200px; color: #FFFFFF; font-weight: bold;"
        >
          {{#if:{{{Counterpart|}}}|{{ucfirst:{{{Counterpart}}}}}}}{{#if:{{{Form|}}}|{{{Form}}}}}
          [[{{#var:pname}}|<span style="color: #ffffff">{{#var:pname}}</span>]]
         </div>
         </div>
       </div>
       </td>
      <!--Nature, Ability, Item Table  -->
    </tr>
       <div class="pokemon-stats" style="margin-top: 10px">
    <tr>
         <table
       <td>  
          class="pokemon-info-table"
         <table width="100%" align="center" style="text-align: center; margin-bottom: 10px;">
          style="
           <tr style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF;">
            width: 100%;
             <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33%; padding: 5px;">[[Natures|<span style="color: #FFFFFF">Nature</span>]]</th>
            text-align: center;
             <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33%; padding: 5px;">[[Abilities|<span style="color: #FFFFFF">Ability</span>]]</th>
            border-collapse: collapse;
             <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; width: 33%; padding: 5px;">Item</th>
            margin-bottom: 10px;
          "
        >
           <tr
            style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF;"
          >
             <th
              style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;"
            >
              [[Natures|<span style="color: #ffffff">Nature</span>]]
            </th>
             <th
              style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;"
            >
              [[Abilities|<span style="color: #ffffff">Ability</span>]]
            </th>
             <th
              style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;"
            >
              Item
            </th>
           </tr>
           </tr>
           <tr style="background-color: #ffffff">
           <tr style="background-color: #FFFFFF;">
             <td style="padding: 5px">
             <td style="padding: 5px;">{{#if:{{{Nature|}}}|{{{Nature}}}|Random}}</td>
              {{#if:{{{Nature|}}}|{{{Nature}}}|Random}}
             <td style="padding: 5px;">{{#if:{{{Ability|}}}|[[{{{Ability}}}_(ability)|{{{Ability}}}]]|Random}}</td>
            </td>
             <td style="padding: 5px;">{{#if:{{{Item|}}}|[[{{{Item}}}]]|None}}</td>
             <td style="padding: 5px">
              {{#if:{{{Ability|}}}|[[{{{Ability}}}_(ability)|{{{Ability}}}]]|Random}}
            </td>
             <td style="padding: 5px">
              {{#if:{{{Item|}}}|[[{{{Item}}}]]|None}}
            </td>
           </tr>
           </tr>
         </table>
         </table>
      </div>
    <tr>
       <!--  Pokemon Moves Table -->
       <td>
      <div class="pokemon-moves">
        <div class="keita-moves-container">
        <div class="mw-collapsible mw-collapsed" style="width: 100%">
           <button class="keita-show-moves-btn" style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF; border: 2px solid #{{{{#var:type1}}_color_dark}}; border-radius: 15px; padding: 5px 15px; margin-bottom: 10px; cursor: pointer; font-weight: bold;">SHOW MOVES</button>
           <div
           <table width="100%" class="keita-moves-table collapsible collapsed" style="text-align: center; display: none;">
            class="mw-collapsible-toggle"
             <tr style="background-color: #{{{{#var:type1}}_color}}; color: #FFFFFF;">
            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%;"
               <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>
            Show Moves
              <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;">Category</th>
          </div>
              <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;">Base Power</th>
           <div
              <th style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;">Accuracy</th>
            class="mw-collapsible-content"
            </tr>
            style="overflow-x: auto; display: block; clear: both"
            {{{Moveset|}}}
          >
          </table>
            <table
              class="moves-table"
              style="width: 100%; text-align: center; border-collapse: collapse"
             >
              <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;"
                >
                  Power
                </th>
                <th
                  style="border: 1px solid #{{{{#var:type1}}_color_dark}}; padding: 5px;"
                >
                  Accuracy
                </th>
              </tr>
              {{{Moveset|}}}
            </table>
          </div>
         </div>
         </div>
       </div>
       </td>
     </div>
     </tr>
   </div>
   </table>
  {{#ifeq:{{ucfirst:{{{Form}}}}}|Mega|{{PokemonArray}}}}
</td>
{{#ifexpr:{{#var:rows}} = 2|{{#vardefine:rows|0}}</tr><tr class="keita-lineup-row">}}{{#ifeq:{{ucfirst:{{{Form}}}}}|Mega|{{PokemonArray}}}}
 
<script>
document.addEventListener('DOMContentLoaded', function() {
  const showButtons = document.querySelectorAll('.keita-show-moves-btn');
 
  showButtons.forEach(button => {
    button.addEventListener('click', function() {
      const movesTable = this.nextElementSibling;
      if (movesTable.style.display === 'none') {
        movesTable.style.display = 'table';
        this.textContent = 'HIDE MOVES';
      } else {
        movesTable.style.display = 'none';
        this.textContent = 'SHOW MOVES';
      }
    });
  });
});
</script>
 
<style>
/* Responsive styles for KeitaBossPokemon */
@media (max-width: 768px) {
  .keita-pokemon-cell {
    min-width: 280px !important;
    padding: 8px !important;
  }
 
  .keita-pokemon-cell table th,
  .keita-pokemon-cell table td {
    padding: 3px !important;
    font-size: 0.9em;
  }
}
 
@media (max-width: 480px) {
  .keita-pokemon-cell {
    border-radius: 15px !important;
    padding: 5px !important;
  }
 
  .keita-moves-table th,
  .keita-moves-table td {
    padding: 2px !important;
    font-size: 0.8em;
  }
 
  .keita-show-moves-btn {
    padding: 3px 10px !important;
    font-size: 0.9em;
  }
}
</style>
</includeonly>
</includeonly>

Revision as of 19:15, 31 March 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 }}
}}

Result

<script> document.addEventListener('DOMContentLoaded', function() { const showButtons = document.querySelectorAll('.keita-show-moves-btn'); showButtons.forEach(button => { button.addEventListener('click', function() { const movesTable = this.nextElementSibling; if (movesTable.style.display === 'none') { movesTable.style.display = 'table'; this.textContent = 'HIDE MOVES'; } else { movesTable.style.display = 'none'; this.textContent = 'SHOW MOVES'; } }); }); }); </script> <style> /* Responsive styles for KeitaBossPokemon */ @media (max-width: 768px) { .keita-pokemon-cell { min-width: 280px !important; padding: 8px !important; } .keita-pokemon-cell table th, .keita-pokemon-cell table td { padding: 3px !important; font-size: 0.9em; } } @media (max-width: 480px) { .keita-pokemon-cell { border-radius: 15px !important; padding: 5px !important; } .keita-moves-table th, .keita-moves-table td { padding: 2px !important; font-size: 0.8em; } .keita-show-moves-btn { padding: 3px 10px !important; font-size: 0.9em; } } </style> <script> document.addEventListener('DOMContentLoaded', function() { const showButtons = document.querySelectorAll('.keita-show-moves-btn'); showButtons.forEach(button => { button.addEventListener('click', function() { const movesTable = this.nextElementSibling; if (movesTable.style.display === 'none') { movesTable.style.display = 'table'; this.textContent = 'HIDE MOVES'; } else { movesTable.style.display = 'none'; this.textContent = 'SHOW MOVES'; } }); }); }); </script> <style> /* Responsive styles for KeitaBossPokemon */ @media (max-width: 768px) { .keita-pokemon-cell { min-width: 280px !important; padding: 8px !important; } .keita-pokemon-cell table th, .keita-pokemon-cell table td { padding: 3px !important; font-size: 0.9em; } } @media (max-width: 480px) { .keita-pokemon-cell { border-radius: 15px !important; padding: 5px !important; } .keita-moves-table th, .keita-moves-table td { padding: 2px !important; font-size: 0.8em; } .keita-show-moves-btn { padding: 3px 10px !important; font-size: 0.9em; } } </style>
         Professor Oak's Lineup
max-width=200px
max-width=200px
         max-width=150px
           Christmas Zekrom
Nature Ability Item
Adamant Teravolt Leftovers
         <button class="keita-show-moves-btn" style="background-color: #7038F8; color: #FFFFFF; border: 2px solid #4924A1; border-radius: 15px; padding: 5px 15px; margin-bottom: 10px; cursor: pointer; font-weight: bold;">SHOW MOVES</button>
Nature Ability Item
Timid Bad Dreams Leftovers
         <button class="keita-show-moves-btn" style="background-color: #705848; color: #FFFFFF; border: 2px solid #49392F; border-radius: 15px; padding: 5px 15px; margin-bottom: 10px; cursor: pointer; font-weight: bold;">SHOW MOVES</button>
  • 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.