Bulbapedia talk:Project Moves and Abilities: Difference between revisions

m
Line 609: Line 609:
::<code><nowiki>{{#iferror: {{#ifexpr: {{{power}}} > 0}}||[[Category: Moves with a power of {{{power}}}]]}}</nowiki></code>
::<code><nowiki>{{#iferror: {{#ifexpr: {{{power}}} > 0}}||[[Category: Moves with a power of {{{power}}}]]}}</nowiki></code>
::I know that because of this, moves with notes due to inter-generation changes will not be affected. One solution is to slightly change the MoveInfobox template so that power and notes regarding power are separate fields, so that the parser function can eventually work for all moves with a numeric power. This can be done cleanly, since moves without notes on their power will be unaffected, and moves that need to be changed will not look different until manually changed.  
::I know that because of this, moves with notes due to inter-generation changes will not be affected. One solution is to slightly change the MoveInfobox template so that power and notes regarding power are separate fields, so that the parser function can eventually work for all moves with a numeric power. This can be done cleanly, since moves without notes on their power will be unaffected, and moves that need to be changed will not look different until manually changed.  
::The code for doing so is simply <code>{{#if:{{{power note|}}}|{{tt|*|{{{power note}}}}}}}</code>, placed right after where the base power should appear.
::The code for doing so is simply <code><nowiki>{{#if:{{{power note|}}}|{{tt|*|{{{power note}}}}}}}</nowiki></code>, placed right after where the base power should appear.
::The same can also be done for accuracy, simply replacing all instances of "power" with "accuracy."
::The same can also be done for accuracy, simply replacing all instances of "power" with "accuracy."
::[[User:TehPerson|TehPerson]] ([[User talk:TehPerson|talk]]) 14:58, 17 July 2015 (UTC)
::[[User:TehPerson|TehPerson]] ([[User talk:TehPerson|talk]]) 14:58, 17 July 2015 (UTC)