[ Disclaimer, Create new user --- Wiki markup help, Install P99 ]
Difference between revisions of "Template:Petstatsbox"
From Project 1999 Wiki
Line 1: | Line 1: | ||
+ | <!-- Main table to display pet stats. The 'petStatsBox' class can be styled externally, | ||
+ | but we're using inline styles to define the border and width for compatibility. --> | ||
<table cellspacing="3" class="petStatsBox" style="border: 1px solid #BECFE2; width: 220px;"> | <table cellspacing="3" class="petStatsBox" style="border: 1px solid #BECFE2; width: 220px;"> | ||
+ | |||
+ | <!-- Header row to display the pet's name with a custom background color. | ||
+ | {{{name}}} is a placeholder for the dynamic name field. --> | ||
<tr> | <tr> | ||
− | <th bgcolor="# | + | <th bgcolor="#CEDFF2">{{{name}}}</th> |
</tr> | </tr> | ||
− | + | ||
+ | <!-- Row for displaying the pet's race. The <strong> tag is used to make the label bold. | ||
+ | {{{race}}} is a placeholder for the dynamic race field. --> | ||
<tr> | <tr> | ||
<td><strong>Race:</strong> {{{race}}}</td> | <td><strong>Race:</strong> {{{race}}}</td> | ||
</tr> | </tr> | ||
+ | <!-- Row for displaying the pet's class, similar to the race row. --> | ||
<tr> | <tr> | ||
<td><strong>Class:</strong> {{{class}}}</td> | <td><strong>Class:</strong> {{{class}}}</td> | ||
</tr> | </tr> | ||
− | + | ||
+ | <!-- Row for displaying the pet's level. --> | ||
<tr> | <tr> | ||
<td><strong>Level:</strong> {{{level}}}</td> | <td><strong>Level:</strong> {{{level}}}</td> | ||
</tr> | </tr> | ||
+ | <!-- Subheader row for stats section, using a different background color. --> | ||
<tr> | <tr> | ||
− | <th bgcolor="# | + | <th bgcolor="#F3F8FD">Stats</th> |
</tr> | </tr> | ||
+ | <!-- Row for displaying Armor Class (AC). If {{{AC}}} is missing, | ||
+ | the editor may choose to display a placeholder like "?" elsewhere. --> | ||
<tr> | <tr> | ||
<td><strong>AC:</strong> {{{AC}}}</td> | <td><strong>AC:</strong> {{{AC}}}</td> | ||
</tr> | </tr> | ||
+ | <!-- Row for displaying the pet's hit points (HP). | ||
+ | The span with class 'ddb' is used for displaying the HP regeneration in parentheses. --> | ||
<tr> | <tr> | ||
<td><strong>HP:</strong> {{{HP}}} <span class="ddb">({{{HP_regen}}})</span></td> | <td><strong>HP:</strong> {{{HP}}} <span class="ddb">({{{HP_regen}}})</span></td> | ||
</tr> | </tr> | ||
+ | <!-- Row for displaying the damage the pet deals per hit. --> | ||
<tr> | <tr> | ||
<td><strong>Damage per hit:</strong> {{{damage_per_hit}}}</td> | <td><strong>Damage per hit:</strong> {{{damage_per_hit}}}</td> | ||
</tr> | </tr> | ||
− | <!-- Placeholder | + | <!-- Placeholder row for Bash. This row will only be shown if the 'bash' field exists. |
+ | If 'bash' is empty, the row will be hidden (display: none). --> | ||
<tr style="{{#if: {{{bash|}}}|display:table-row;|display:none;}}"> | <tr style="{{#if: {{{bash|}}}|display:table-row;|display:none;}}"> | ||
<td><strong>Bash:</strong> {{{bash}}}</td> | <td><strong>Bash:</strong> {{{bash}}}</td> | ||
</tr> | </tr> | ||
+ | <!-- Placeholder row for Kick. Functions similarly to the Bash row. --> | ||
<tr style="{{#if: {{{kick|}}}|display:table-row;|display:none;}}"> | <tr style="{{#if: {{{kick|}}}|display:table-row;|display:none;}}"> | ||
<td><strong>Kick:</strong> {{{kick}}}</td> | <td><strong>Kick:</strong> {{{kick}}}</td> | ||
</tr> | </tr> | ||
+ | <!-- Placeholder row for Backstab. Only shown if 'backstab' has a value. --> | ||
<tr style="{{#if: {{{backstab|}}}|display:table-row;|display:none;}}"> | <tr style="{{#if: {{{backstab|}}}|display:table-row;|display:none;}}"> | ||
<td><strong>Backstab:</strong> {{{backstab}}}</td> | <td><strong>Backstab:</strong> {{{backstab}}}</td> | ||
</tr> | </tr> | ||
+ | <!-- Row for displaying attacks per round, with attack speed shown in parentheses using the 'ddb' class. --> | ||
<tr> | <tr> | ||
<td><strong>Attacks per round:</strong> {{{attacks_per_round}}} <span class="ddb">({{{attack_speed}}})</span></td> | <td><strong>Attacks per round:</strong> {{{attacks_per_round}}} <span class="ddb">({{{attack_speed}}})</span></td> | ||
</tr> | </tr> | ||
+ | <!-- Row for displaying any special abilities the pet might have. --> | ||
<tr> | <tr> | ||
<td><strong>Special:</strong> {{{special}}}</td> | <td><strong>Special:</strong> {{{special}}}</td> | ||
</tr> | </tr> | ||
+ | |||
</table> | </table> |
Latest revision as of 05:59, 18 September 2024
{{{name}}} |
---|
Race: {{{race}}} |
Class: {{{class}}} |
Level: {{{level}}} |
Stats |
AC: {{{AC}}} |
HP: {{{HP}}} ({{{HP_regen}}}) |
Damage per hit: {{{damage_per_hit}}} |
Attacks per round: {{{attacks_per_round}}} ({{{attack_speed}}}) |
Special: {{{special}}} |