Template:SpellAction: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(6 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, action_type, CONCAT("{{{recharge|}}}")=recharge, CONCAT("{{{level|}}}")=level, CONCAT("{{#replace:{{#replace:{{#replace:{{#replace:{{{1}}}|:|}}|/|<nowiki/> <nowiki/>}}|(|<nowiki/> <nowiki/>}}|)|<nowiki/> <nowiki/>}} Icon.webp")=icon
| fields = _pageName = link, name, action_type, description, {{#if: {{{recharge|}}} | CONCAT("{{{recharge}}}")=recharge | recharge}}, {{#if: {{{level|}}} | CONCAT("{{{level}}}")=level | spell_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.


----


Usage:
== Examples ==
 
{{Template demo
<pre>
|<nowiki>{{SpellAction|Hunter's Mark|level=1|recharge=Long Rest}}</nowiki>
{{SpellAction | Hunter's Mark | level=1 | recharge=Long Rest }}
|<nowiki>{{SpellAction|Click Heels}}</nowiki>
</pre>
|<nowiki>{{SpellAction|True Strike|level=0|recharge=Short Rest|action type=Bonus}}</nowiki>
 
|<nowiki>{{SpellAction|Absorb Elements|recharge=Short Rest}}</nowiki>
Result:
}}
 
{{SpellAction | Hunter's Mark | level=1 | recharge=Long Rest }}
 
----
 
Usage:
 
<pre>
{{SpellAction | Haste | level=3 | recharge=Short Rest }}
</pre>
 
Result:
 
{{SpellAction | Haste | level=3 | recharge=Short Rest }}


[[Category:Templates]]
[[Category:Templates]]

Latest revision as of 20:47, 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}}
Hunter's Mark Hunter's Mark ()
Cast as a level 1 spell ( Recharge: Long rest.)
{{SpellAction|Click Heels}}
Click Heels Click Heels ()
Click the heels of your boots to gain speed and freedom of movement.
{{SpellAction|True Strike|level=0|recharge=Short Rest|action type=Bonus}}
True Strike True Strike ()
Cast as a cantrip ( Recharge: Short rest.)
{{SpellAction|Absorb Elements|recharge=Short Rest}}
Absorb Elements Absorb Elements ()
Absorb elemental damage once per Short Rest. Take half damage from the next elemental attack targeting you, and deal an additional 1d6 of that element type on your next attack. ( Recharge: Short rest.)

Template data

No description.

Template parameters

ParameterDescriptionTypeStatus
name1

The name of the spell

Stringrequired
levellevel

The level the spell is cast at.

Default
1
Numberoptional
rechargerecharge

How often this spell refreshes

Default
Stringoptional