Template:Spell action: Difference between revisions
Jump to navigation
Jump to search
HiddenDragon (talk | contribs) (Updated doc) |
mNo edit summary |
||
(20 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#cargo_query: tables = spells | <includeonly>{{#cargo_query: tables = spells | ||
| fields = _pageName = link, name, | | fields = _pageName = link, name, cost, hit_cost, description, extra_description, {{#if: {{{2|}}} | CONCAT("{{{2}}}")=alias}}, {{#if: {{{nolist|}}} | CONCAT("{{{nolist}}}")=nolist}}, {{#if: {{{extra|}}} | CONCAT("{{{extra}}}")=extra}}, {{#if: {{{w|}}} | CONCAT("{{{w}}}")=size}}, {{#if: {{{recharge|}}} | CONCAT("{{{recharge}}}")=recharge | recharge}}, {{#if: {{{level|}}} | CONCAT("{{{level}}}")=level | spell_level=level}}, controller_icon=icon, {{#if: {{{cost|}}}{{{action type|}}} | CONCAT("{{{cost| {{{action type|}}} }}}")=cost }}, {{#if: {{{hit cost|}}} | CONCAT("{{{hit cost|}}}")=hit cost }} | ||
| where = _pageName = "{{#replace: {{{1}}} | " | \" }}" | | where = _pageName = "{{#replace: {{{1}}} | " | \" }}" | ||
| format = template | | format = template | ||
| template = | | template = Spell action/format | ||
| named args = yes | | named args = yes | ||
}}</includeonly><noinclude> | | default = [[{{{1}}}]]{{Main namespace only|[[Category:Pages with unknown abilities]]}} | ||
}}</includeonly><noinclude>{{Documentation|content= | |||
Use this to display a spell as a class action on an equipment page. Examples follow. | Use this to display a spell as a class action on an equipment page. Examples follow. | ||
This template just runs the Cargo query; see [[Template: | This template just runs the Cargo query; see [[Template:Spell action/format]] for the formatting. | ||
For displaying spells or actions in a more detailed format, see {{t link|Feature box}}. | |||
== Examples == | == Examples == | ||
{{Template demo | {{Template demo | ||
|<nowiki>{{SpellAction|Hunter's Mark|level=1|recharge=Long Rest}}</nowiki> | |<nowiki>{{SpellAction|Hunter's Mark|level=1|recharge=Long Rest}}</nowiki> | ||
|<nowiki>{{SpellAction| | |<nowiki>{{SpellAction|Click Heels}}</nowiki> | ||
|<nowiki>{{SpellAction|Click Heels|Bonus Dash}}</nowiki> | |||
|<nowiki>{{SpellAction|True Strike|level=0|recharge=Short Rest|action type=Bonus}}</nowiki> | |<nowiki>{{SpellAction|True Strike|level=0|recharge=Short Rest|action type=Bonus}}</nowiki> | ||
|<nowiki>{{SpellAction|Absorb Elements|recharge=Short Rest}}</nowiki> | |<nowiki>{{SpellAction|Absorb Elements|recharge=Short Rest}}</nowiki> | ||
|<nowiki>{{SpellAction|Intimidating Presence|extra=y}}</nowiki> | |||
|<nowiki>{{SpellAction|Fire Shield: Warm|recharge=Long Rest|cost=bonus}}</nowiki> | |||
|<nowiki>{{SpellAction|Searing Smite|hit cost=bonus}}</nowiki> | |||
}} | }} | ||
== Template data == | == Template data == | ||
<templatedata> | <templatedata> | ||
Line 30: | Line 34: | ||
"type": "string", | "type": "string", | ||
"required": true | "required": true | ||
}, | |||
"2": { | |||
"label": "alias", | |||
"description": "If specified, replaces the name queried from the table", | |||
"type": "string" | |||
}, | }, | ||
"level": { | "level": { | ||
Line 40: | Line 49: | ||
"label": "recharge", | "label": "recharge", | ||
"description": "How often this spell refreshes", | "description": "How often this spell refreshes", | ||
"type": "string", | |||
"default": "" | |||
}, | |||
"w": { | |||
"label": "w", | |||
"description": "Size of the icon. Defaults to 40 if empty", | |||
"type": "number", | |||
"default": "" | |||
}, | |||
"extra": { | |||
"label": "extra", | |||
"description": "If specified, displays the extra description as well (if it has one)", | |||
"type": "string", | |||
"default": "" | |||
}, | |||
"nolist": { | |||
"label": "nolist", | |||
"description": "If specified, does not wrap the definition in <dl> tags, allowing it to be embedded in other lists", | |||
"type": "string", | "type": "string", | ||
"default": "" | "default": "" | ||
Line 46: | Line 73: | ||
"paramOrder": [ | "paramOrder": [ | ||
"1", | "1", | ||
"2", | |||
"level", | "level", | ||
"recharge" | "recharge", | ||
"w", | |||
"extra", | |||
"nolist" | |||
] | ] | ||
} | } | ||
</templatedata></noinclude> | </templatedata> | ||
}} | |||
[[Category:Templates]] | |||
[[Category:Cargo templates]] | |||
</noinclude> |
Latest revision as of 23:30, 21 February 2025
Template documentation
Use this to display a spell as a class action on an equipment page. Examples follow.
This template just runs the Cargo query; see Template:Spell action/format for the formatting.
For displaying spells or actions in a more detailed format, see {{Feature box}}.
Examples
Markup | Renders as |
---|---|
{{SpellAction|Hunter's Mark|level=1|recharge=Long Rest}} |
|
{{SpellAction|Click Heels}} |
|
{{SpellAction|Click Heels|Bonus Dash}} |
|
{{SpellAction|True Strike|level=0|recharge=Short Rest|action type=Bonus}} |
|
{{SpellAction|Absorb Elements|recharge=Short Rest}} |
|
{{SpellAction|Intimidating Presence|extra=y}} |
|
{{SpellAction|Fire Shield: Warm|recharge=Long Rest|cost=bonus}} |
|
{{SpellAction|Searing Smite|hit cost=bonus}} |
|
Template data
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
name | 1 | The name of the spell | String | required |
alias | 2 | If specified, replaces the name queried from the table | String | optional |
level | level | The level the spell is cast at.
| Number | optional |
recharge | recharge | How often this spell refreshes
| String | optional |
w | w | Size of the icon. Defaults to 40 if empty
| Number | optional |
extra | extra | If specified, displays the extra description as well (if it has one)
| String | optional |
nolist | nolist | If specified, does not wrap the definition in <dl> tags, allowing it to be embedded in other lists
| String | optional |