Template:MoveInfobox: Difference between revisions

From Cassette Beasts
ExcaliburZero (talk | contribs)
Add variables to omit several rows (to support Fusion Power)
Solari (talk | contribs)
made many changes. reordered headers. ap now uses the new ap template. hits is only listed if it is not 1. added autotarget header to list the default target when a move is used automatically. listed physicality for non-attack moves that can target enemies (for snowed in data). priority is not listed if it is neither raised nor lowered. added links to most headers. added exclude_physicality field for fusion power
 
Line 6: Line 6:
<div class="infobox-body">
<div class="infobox-body">
<div class="infobox-data"><table>
<div class="infobox-data"><table>
{{#ifeq: {{{exclude_type|}}}|True||<tr><th>Type</th><td>{{TypeButton|{{#invoke:Database|get_move|{{{id}}}|elemental_type}}}}</td></tr>}}{{#ifeq: {{{exclude_power|}}}|True||{{#if: {{#invoke:Database|get_move|{{{id}}}|power|if_0=}} |
{{#ifeq: {{{exclude_type|}}}|True||<tr><th>[[Type|<span style="color: #ffffff;">Type</span>]]</th><td>{{TypeButton|{{#invoke:Database|get_move|{{{id}}}|elemental_type}}}}</td></tr>}}<tr><th>[[AP|<span style="color: #ffffff;">Use Cost</span>]]</th><td>{{#if: {{#invoke:Database|get_move|{{{id}}}|is_passive_only}} | Passive | {{AP|length=10|cost={{#invoke:Database|get_move|{{{id}}}|ap_cost}}}}}}</td></tr>
<tr><th>Power</th><td>{{#invoke:Database|get_move|{{{id}}}|power|if_0=&#8212;}}</td></tr> |}}}}
{{#ifeq: {{{exclude_power|}}}|True||{{#if: {{#invoke:Database|get_move|{{{id}}}|power|if_0=}} |
<tr><th>Accuracy</th><td>{{#invoke:Database|get_move|{{{id}}}|accuracy|if_number=%d%%}}</td></tr>
<tr><th>[[Damage|<span style="color: #ffffff;">Power</span>]]</th><td>{{#invoke:Database|get_move|{{{id}}}|power|if_0=&#8212;}}</td></tr> |}}}}{{#if: {{#invoke:Database|get_move|{{{id}}}|max_hits|if_1=}} |
{{#if: {{#invoke:Database|get_move|{{{id}}}|target_type|if_TARGET_NONE=}} |
<tr><th>Hits</th><td>{{#ifeq: {{#invoke:Database|get_move|{{{id}}}|min_hits}}|{{#invoke:Database|get_move|{{{id}}}|max_hits}}|{{#invoke:Database|get_move|{{{id}}}|max_hits}}|{{#invoke:Database|get_move|{{{id}}}|min_hits}} - {{#invoke:Database|get_move|{{{id}}}|max_hits}}}}</td></tr> |}}
{{#ifeq: {{{exclude_targets|}}}|True||<tr><th>Targets</th><td>{{#invoke:Database|get_move|{{{id}}}|target_type|if_TARGET_NONE=None|if_TARGET_ONE=Single|if_TARGET_TEAM=Team|if_TARGET_ALL=All|if_TARGET_ONE_ALLY=Single Ally|if_TARGET_ONE_ALLY_NOT_SELF=Single Ally (Not Self)|if_TARGET_ONE_ENEMY=One Enemy|if_TARGET_ALL_NOT_SELF=All Except Self}}</td></tr> |}}}}{{#if: {{#invoke:Database|get_move|{{{id}}}|min_hits}}|<tr><th>Num Hits</th><td>{{#ifeq: {{#invoke:Database|get_move|{{{id}}}|min_hits}}|{{#invoke:Database|get_move|{{{id}}}|max_hits}}|{{#invoke:Database|get_move|{{{id}}}|max_hits}}|{{#invoke:Database|get_move|{{{id}}}|min_hits}} - {{#invoke:Database|get_move|{{{id}}}|max_hits}}}}</td></tr>}}
<tr><th>[[Hit chance|<span style="color: #ffffff;">Accuracy</span>]]</th><td>{{#invoke:Database|get_move|{{{id}}}|accuracy|if_number=%d%%}}</td></tr>{{#if: {{#invoke:Database|get_move|{{{id}}}|target_type|if_TARGET_NONE=}} |
<tr><th>Use Cost</th><td>{{#if: {{#invoke:Database|get_move|{{{id}}}|is_passive_only}} | Passive | {{#invoke:Database|get_move|{{{id}}}|ap_cost}} AP}}</td></tr>
{{#ifeq: {{{exclude_targets|}}}|True||<tr><th>Targets</th><td>{{#invoke:Database|get_move|{{{id}}}|target_type|if_TARGET_NONE=None|if_TARGET_ONE=Single|if_TARGET_TEAM=Team|if_TARGET_ALL=All|if_TARGET_ONE_ALLY=Single Ally|if_TARGET_ONE_ALLY_NOT_SELF=Single Other Ally|if_TARGET_ONE_ENEMY=Single Enemy|if_TARGET_ALL_NOT_SELF=All Other Fighters}}</td></tr> {{#if: {{#invoke:Database|get_move|{{{id}}}|target_type|if_TARGET_NONE=|if_TARGET_ALL=|if_TARGET_ONE_ALLY_NOT_SELF=|if_TARGET_ONE_ENEMY=|if_TARGET_ALL_NOT_SELF=}}|<tr><th>Autotarget</th><td>{{#invoke:Database|get_move|{{{id}}}|default_target|if_DEFAULT_TARGET_NONE=None|if_DEFAULT_TARGET_SELF=Self|if_DEFAULT_TARGET_ALLY=Ally|if_DEFAULT_TARGET_ENEMY=Enemy}}</td></tr> |}} |}}}}
<tr><th>Copyable</th><td>{{#invoke:Database|get_move|{{{id}}}|can_be_copied|if_true=Yes|if_false=No}}</td></tr>
{{#ifeq: {{{exclude_physicality|}}}|True||{{#if: {{#invoke:Database|get_move|{{{id}}}|target_type|if_TARGET_NONE=|if_TARGET_ONE_ALLY=|if_TARGET_ONE_ALLY_NOT_SELF=}}|{{#if: {{#invoke:Database|get_move|{{{id}}}|category|if_Melee Attack=|if_Ranged Attack=}} | <tr><th>[[Physicality|<span style="color: #ffffff;">Physicality</span>]]</th><td>{{#invoke:Database|get_move|{{{id}}}|physicality|if_MELEE=Melee|if_RANGED=Ranged}}</td></tr> |}}}}}}
<tr><th>Priority</th><td>{{#ifexpr: {{#invoke:Database|get_move|{{{id}}}|priority}} > 0 | Raised | {{#ifexpr: {{#invoke:Database|get_move|{{{id}}}|priority}} < 0 | Lowered | Normal }} }} ({{#invoke:Database|get_move|{{{id}}}|priority}})</td></tr>
<tr><th>[[Copycat|<span style="color: #ffffff;">Copyable</span>]]</th><td>{{#invoke:Database|get_move|{{{id}}}|can_be_copied|if_true=Yes|if_false=No}}</td></tr>
{{#ifexpr: {{#invoke:Database|get_move|{{{id}}}|priority}} = 0||<tr><th>[[Priority|<span style="color: #ffffff;">Priority</span>]]</th><td>{{#ifexpr: {{#invoke:Database|get_move|{{{id}}}|priority}} > 0 | Raised | {{#ifexpr: {{#invoke:Database|get_move|{{{id}}}|priority}} < 0 | Lowered | Normal }} }} ({{#invoke:Database|get_move|{{{id}}}|priority}})</td></tr>}}
</table></div></div></div>
</table></div></div></div>
<noinclude>
<noinclude>
Line 35: Line 36:
| exclude_power = True
| exclude_power = True
| exclude_targets = True
| exclude_targets = True
| exclude_physicality = True
}}
}}
</noinclude>
</noinclude>

Latest revision as of 02:07, 19 November 2026

Unknown
Miscellaneous
Type
Use Cost
Accuracy100%
TargetsSingle
AutotargetEnemy
PhysicalityMelee
CopyableYes


Test cases

Smack
Melee Attack
Type
Use Cost
Power30
Accuracy100%
TargetsSingle
AutotargetEnemy
CopyableYes
Multi Shot
Ranged Attack
Type
Use Cost
Power20
Hits3 - 5
Accuracy100%
TargetsSingle
AutotargetEnemy
CopyableYes
Metal Wall
Status Effect Move
Type
Use Cost
Accuracy100%
TargetsSingle
AutotargetSelf
PhysicalityRanged
CopyableYes
Raise Arms
Status Effect Move
Fusion Power
Miscellaneous