Template:Adv: Difference between revisions

From A KoL Wiki
imported>Quietust
adventure gain/loss template
 
imported>Quietust
mNo edit summary
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><table align="center"><tr><td>[[image:hourglass.gif|Adventures]]</td><td>You {{#switch:{{{1}}}|1=gain|2=lose}} {{{amount}}} [[Adventures|{{plural:{{{amount}}}|Adventure|Adventures}}]].</td></tr></table></includeonly><noinclude>
<includeonly><table align="center"><tr><td>[[File:hourglass.gif|Adventures]]</td><td>You {{{type|gain}}} {{#if:{{{min|}}}|<span title="Adventure range: {{{min}}}-{{{max}}}">{{#if:{{{max|}}}|{{#ifexpr:{{{min}}}<{{{max}}}|{{#expr: floor {{{min}}}}}-{{#expr: ceil {{{max}}}}}|{{#ifexpr:{{{min}}}={{{max}}}|{{{min}}}|{{#expr: floor {{{max}}}}}-{{#expr: ceil {{{min}}}}}}}}}|{{{min}}}}}</span>|{{#if:{{{max|}}}|{{{max}}}|{{{amount|some}}}}}}} [[Adventures|{{plural:{{#ifeq:{{{amount|some}}}|1|1|2}}|Adventure|Adventures}}]]. {{#if:{{{min|}}}|{{#if:{{{max|}}}|(avg. {{#expr: ({{{min}}}+{{{max}}}) * 0.5}})|}}|}}</td></tr></table></includeonly><noinclude>
{{Code2}}
{{prot_high-use}}{{Code2}}


==Usage==
==Syntax==
Gain: <pre>{{Adv|1|amount=1}}</pre>
This template supports a number of ways of displaying adventure gains and losses.
{{Adv|1|amount=1}}
*<nowiki>{{adv|min=1|max=20}}</nowiki>
Gain: <pre>{{Adv|1|amount=2}}</pre>
{{adv|min=1|max=20}}
{{Adv|1|amount=2}}
*<nowiki>{{adv|min=2|max=2}}</nowiki>
Gain: <pre>{{Adv|1|amount=5-10}}</pre>
{{adv|min=2|max=2}}
{{Adv|1|amount=5-10}}
*<nowiki>{{adv|min=10}}</nowiki>
Loss: <pre>{{Adv|2|amount=1}}</pre>
{{adv|min=10}}
{{Adv|2|amount=1}}
*<nowiki>{{adv}}</nowiki>
Loss: <pre>{{Adv|2|amount=3}}</pre>
{{adv}}
{{Adv|2|amount=3}}
*<nowiki>{{adv|amount=10-12}}</nowiki>
Loss: <pre>{{Adv|2|amount=10-15}}</pre>
{{adv|amount=10-12}}
{{Adv|2|amount=10-15}}
*<nowiki>{{adv|amount=10-12|type=lose}}</nowiki>
{{adv|amount=10-12|type=lose}}
*<nowiki>{{adv|min=1|max=20|type=lose}}</nowiki>
{{adv|min=1|max=20|type=lose}}
*<nowiki>{{adv|min=2|max=2|type=lose}}</nowiki>
{{adv|min=2|max=2|type=lose}}


[[Category:Standardization Templates| {{PAGENAME}}]]</noinclude>
[[Category:Standardization Templates|{{PAGENAME}}]]</noinclude>

Revision as of 15:23, 17 January 2012

This high-use template has been protected from editing to prevent inaccurate edits and/or vandalism. Please use the talk page to discuss changes, and/or to ask an administrator to make an edit for you.
{{Adv}}
<table align="center"><tr><td>[[File:hourglass.gif|Adventures]]</td><td>You {{{type|gain}}} {{#if:{{{min|}}}|<span title="Adventure range: {{{min}}}-{{{max}}}">{{#if:{{{max|}}}|{{#ifexpr:{{{min}}}<{{{max}}}|{{#expr: floor {{{min}}}}}-{{#expr: ceil {{{max}}}}}|{{#ifexpr:{{{min}}}={{{max}}}|{{{min}}}|{{#expr: floor {{{max}}}}}-{{#expr: ceil {{{min}}}}}}}}}|{{{min}}}}}</span>|{{#if:{{{max|}}}|{{{max}}}|{{{amount|some}}}}}}} [[Adventures|{{plural:{{#ifeq:{{{amount|some}}}|1|1|2}}|Adventure|Adventures}}]]. {{#if:{{{min|}}}|{{#if:{{{max|}}}|(avg. {{#expr: ({{{min}}}+{{{max}}}) * 0.5}})|}}|}}</td></tr></table>

Syntax

This template supports a number of ways of displaying adventure gains and losses.

  • {{adv|min=1|max=20}}
AdventuresYou gain 1-20 Adventures. (avg. 10.5)
  • {{adv|min=2|max=2}}
AdventuresYou gain 2 Adventures. (avg. 2)
  • {{adv|min=10}}
AdventuresYou gain 10 Adventures.
  • {{adv}}
AdventuresYou gain some Adventures.
  • {{adv|amount=10-12}}
AdventuresYou gain 10-12 Adventures.
  • {{adv|amount=10-12|type=lose}}
AdventuresYou lose 10-12 Adventures.
  • {{adv|min=1|max=20|type=lose}}
AdventuresYou lose 1-20 Adventures. (avg. 10.5)
  • {{adv|min=2|max=2|type=lose}}
AdventuresYou lose 2 Adventures. (avg. 2)