Template:Condition: Difference between revisions

Jump to navigation Jump to search
Add inline use case
(do not show more results text)
(Add inline use case)
Line 1: Line 1:
<includeonly>{{#if:{{{border|}}}|<div style="padding-bottom: 1em"><div class="bg3wiki-tooltip-box">||}}{{#cargo_query: tables = conditions
<includeonly><onlyinclude>{{#if:{{{border|}}}|<div style="padding-bottom: 1em"><div class="bg3wiki-tooltip-box">||}}{{#cargo_query: tables = conditions
| fields = name, icon, effects, CONCAT('{{{save|}}}') = save, CONCAT('{{{duration|}}}') = duration
| fields = name, icon, effects, CONCAT('{{{save|}}}') = save, CONCAT('{{{duration|}}}') = duration, CONCAT('{{{skip effect|}}}') = skip effect
| where = name = '{{#replace: {{{1}}} | ' | '' }}'
| where = name = '{{#replace: {{{1}}} | ' | '' }}'
| format = template
| format = template
Line 8: Line 8:
| order by = _ID
| order by = _ID
| more results text=
| more results text=
}}{{#if:{{{border|1}}}|</div></div>||}}</includeonly><noinclude>
}}{{#if:{{{border|1}}}|</div></div>||}}</onlyinclude></includeonly><noinclude>
Use this to display a condition.  Examples follow.
Use this to display a condition.  Examples follow.


This template just runs the Cargo query.  For the formatting, see: [[Template:Condition/Format]]
This template just runs the Cargo query.  For the formatting, see: [[Template:Condition/Format]]


----
=== Base usage ===


Usage:
Usage:
Line 25: Line 25:
{{Condition | Bleeding }}
{{Condition | Bleeding }}
----
----
=== With duration ===


Usage:
Usage:
Line 36: Line 38:
{{Condition | Bleeding | duration = 2 }}
{{Condition | Bleeding | duration = 2 }}
----
----
=== With saving throw ===


Usage:
Usage:
Line 47: Line 51:
{{Condition | Bleeding | save = CON }}
{{Condition | Bleeding | save = CON }}
----
----
=== With duration and saving throw ===


Usage:
Usage:
Line 58: Line 64:
{{Condition | Bleeding | save = CON | duration = 2 }}
{{Condition | Bleeding | save = CON | duration = 2 }}
----
----
=== With a border ===


Use {{InfoBlob|<nowiki>border = 1</nowiki>}} to add a border.
Use {{InfoBlob|<nowiki>border = 1</nowiki>}} to add a border.
Line 69: Line 77:
{{Condition | Bleeding | save = CON | duration = 2 | border = 1}}
{{Condition | Bleeding | save = CON | duration = 2 | border = 1}}
----
----
=== Inline-friendly ===
Usage:
<pre>
{{Condition | Bleeding | skip effect = true }}
</pre>
Result: blabla {{Condition | Bleeding | skip effect = true }} blabla
</noinclude>
</noinclude>

Navigation menu