Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 09:01, 18 March 2025 by Alex (talk | contribs) (Created page with "<includeonly>x25px Duration: {{#switch:{{{1}}}|1 = 1 turn|#default = {{{1}}} turns}}</includeonly><noinclude>{{Documentation}}Category:Templates</noinclude>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Template documentation

Examples

{{Duration|1}} {{Duration|10}}
Duration: 1 turn Duration: 10 turns

Code

[[File:Duration Icon DOS2.png|x25px]]
This displays the image file (an hourglass) and sets the size as 25px.
Duration: {{#switch:{{{1}}}|1 = 1 turn|#default = {{{1}}} turns}}
Duration: {{{1}}} turns

#switch is a parser function from Extension:Parser Functions. If the user inputs "1", then this automatically changes their input to "1 turn". Otherwise, the default state is that whatever the user puts in (presumably a number greater than 1), their input is automatically changed to "{{{whatever their input number}}} turns".