Template:AP: Difference between revisions

From Cassette Beasts
Solari (talk | contribs)
added documentation
Solari (talk | contribs)
m fixed bad spacing
Line 1: Line 1:
<includeonly>
<includeonly><!--
{{#if:{{{cost|}}}|{{#ifeq:{{{cost}}}|0|{{#if:{{{length|}}}||[[File:AP empty.png|link=AP|16px|class=inline-icon]]}}|{{#ifeq:{{{archangel}}}|yes|{{#invoke:String|rep|[[File:AP archangel.png|link=AP|16px|class=inline-icon]]|{{{cost}}}}}|{{#invoke:String|rep|[[File:AP.png|link=AP|16px|class=inline-icon]]|{{{cost}}}}}}}}}|{{#if:{{{length|}}}||{{#ifeq:{{{archangel}}}|yes|[[File:AP archangel.png|link=AP|16px|class=inline-icon]]|[[File:AP.png|link=AP|16px|class=inline-icon]]}}}}}}<!--
-->{{#if:{{{cost|}}}|{{#ifeq:{{{cost}}}|0|{{#if:{{{length|}}}||[[File:AP empty.png|link=AP|16px|class=inline-icon]]}}|{{#ifeq:{{{archangel}}}|yes|{{#invoke:String|rep|[[File:AP archangel.png|link=AP|16px|class=inline-icon]]|{{{cost}}}}}|{{#invoke:String|rep|[[File:AP.png|link=AP|16px|class=inline-icon]]|{{{cost}}}}}}}}}|{{#if:{{{length|}}}||{{#ifeq:{{{archangel}}}|yes|[[File:AP archangel.png|link=AP|16px|class=inline-icon]]|[[File:AP.png|link=AP|16px|class=inline-icon]]}}}}}}<!--


-->{{#if:{{{length|}}}|{{#invoke:String|rep|[[File:AP empty.png|link=AP|16px|class=inline-icon]]|{{#if:{{{cost|}}}|{{#expr: {{{length}}} - {{{cost}}}}}|{{{length}}}|}}|}}}}</includeonly><noinclude>
-->{{#if:{{{length|}}}|{{#invoke:String|rep|[[File:AP empty.png|link=AP|16px|class=inline-icon]]|{{#if:{{{cost|}}}|{{#expr: {{{length}}} - {{{cost}}}}}|{{{length}}}|}}|}}}}</includeonly><noinclude>

Revision as of 03:11, 5 September 2026

Creates a bar of Action Points.

Has the parameters cost, length, and archangel.
cost and length are expected as integers. If neither are specified, one full AP will be displayed.
{{AP}}

If only cost is defined, that many full AP will be displayed.
{{AP|cost=3}}
If it is defined as 0, it will instead show one empty AP.
{{AP|cost=0}}

If only length is defined, that many empty AP will be displayed.
{{AP|length=5}}

If both cost and length are defined, then cost amount of full AP and length - cost amount of empty AP will be shown.
{{AP|cost=4|length=10}}

archangel turns any full AP purple if it is equal to yes.
{{AP|archangel=yes}}