Template:SpellAction: Difference between revisions
Jump to navigation
Jump to search
(added option to alter action type) |
HiddenDragon (talk | contribs) (Updated doc) |
||
Line 1: | Line 1: | ||
<includeonly>{{#cargo_query: tables = spells | <includeonly>{{#cargo_query: tables = spells | ||
| fields = _pageName = link, name, action_type, CONCAT("{{{recharge|}}}")=recharge, CONCAT("{{{level|}}}")=level, CONCAT("{{#replace:{{#replace:{{#replace:{{#replace:{{{1}}}|:|}}|/|<nowiki/> <nowiki/>}}|(|<nowiki/> <nowiki/>}}|)|<nowiki/> <nowiki/>}} Icon.webp")=icon, {{#if: {{{action type|}}} | CONCAT("{{{action type|}}}")=action type }} | | fields = _pageName = link, name, action_type, description, CONCAT("{{{recharge|}}}")=recharge, CONCAT("{{{level|}}}")=level, CONCAT("{{#replace:{{#replace:{{#replace:{{#replace:{{{1}}}|:|}}|/|<nowiki/> <nowiki/>}}|(|<nowiki/> <nowiki/>}}|)|<nowiki/> <nowiki/>}} Icon.webp")=icon, {{#if: {{{action type|}}} | CONCAT("{{{action type|}}}")=action type }} | ||
| where = _pageName = "{{#replace: {{{1}}} | " | \" }}" | | where = _pageName = "{{#replace: {{{1}}} | " | \" }}" | ||
| format = template | | format = template | ||
Line 10: | Line 10: | ||
This template just runs the Cargo query; see [[Template:ClassAction/Format]] for the formatting. | This template just runs the Cargo query; see [[Template:ClassAction/Format]] for the formatting. | ||
== Examples == | |||
{{Template demo | |||
< | |<nowiki>{{SpellAction|Hunter's Mark|level=1|recharge=Long Rest}}</nowiki> | ||
{{SpellAction | Hunter's Mark | level=1 | recharge=Long Rest }} | |<nowiki>{{SpellAction|Haste|level=3|recharge=Short Rest}}</nowiki> | ||
</ | |<nowiki>{{SpellAction|True Strike|level=0|recharge=Short Rest|action type=Bonus}}</nowiki> | ||
|<nowiki>{{SpellAction|Absorb Elements|recharge=Short Rest}}</nowiki> | |||
}} | |||
< | |||
{{SpellAction | Haste | level=3 | recharge=Short Rest }} | |||
</ | |||
< | |||
{{SpellAction | True Strike | level=0 | recharge=Short Rest | action type=Bonus }} | |||
</ | |||
{{SpellAction | | |||
[[Category:Templates]] | [[Category:Templates]] |
Revision as of 19:50, 20 August 2024
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:ClassAction/Format for the formatting.
Examples
Markup | Renders as |
---|---|
{{SpellAction|Hunter's Mark|level=1|recharge=Long Rest}} |
|
{{SpellAction|Haste|level=3|recharge=Short Rest}} |
|
{{SpellAction|True Strike|level=0|recharge=Short Rest|action type=Bonus}} |
|
{{SpellAction|Absorb Elements|recharge=Short Rest}} |
|
Template data
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
name | 1 | The name of the spell | String | required |
level | level | The level the spell is cast at.
| Number | optional |
recharge | recharge | How often this spell refreshes
| String | optional |