Difference between revisions of "User:Paxed/Template:dice"

From NetHackWiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
<onlyinclude><includeonly>{{{1}}}d{{{2}}}{{#if: {{{3|}}} |{{#ifexpr: {{{3|0}}} > 0 |{{{3}}} |{{#ifexpr: {{{3|0}}} < 0 |-{{{3}}} | }} }} }}({{#expr:{{{1}}}+{{{3|0}}}}}-{{#expr:{{{1}}}*{{{2}}}+{{{3|0}}}}}</includeonly></onlyinclude>
+
<onlyinclude><includeonly>{{{1}}}d{{{2}}}{{#if: {{{3|}}} |{{#ifexpr: {{{3|0}}} > 0 |{{{3}}} |{{#ifexpr: {{{3|0}}} < 0 |-{{{3}}} | }} }} }}&nbsp;({{#expr:{{{1}}}+{{{3|0}}}}}&nbsp;-&nbsp;{{#expr:{{{1}}}*{{{2}}}+{{{3|0}}}}})</includeonly></onlyinclude>
  
 
This template shows dicerolls in the standard d-notation and their minimum and maximum values.
 
This template shows dicerolls in the standard d-notation and their minimum and maximum values.
Line 13: Line 13:
 
*<tt><nowiki>{{dice|1|6}}</nowiki></tt> shows {{:User:Paxed/Template:dice|1|6}}
 
*<tt><nowiki>{{dice|1|6}}</nowiki></tt> shows {{:User:Paxed/Template:dice|1|6}}
 
*<tt><nowiki>{{dice|2|10|5}}</nowiki></tt> shows {{:User:Paxed/Template:dice|2|10|5}}
 
*<tt><nowiki>{{dice|2|10|5}}</nowiki></tt> shows {{:User:Paxed/Template:dice|2|10|5}}
*<tt><nowiki>{{dice|1|8|-2}}</nowiki></tt> shows {{:User:Paxed/Template:dice|1|8|-2}}
+
*<tt><nowiki>{{dice|3|8|-2}}</nowiki></tt> shows {{:User:Paxed/Template:dice|3|8|-2}}

Revision as of 22:08, 3 March 2008


This template shows dicerolls in the standard d-notation and their minimum and maximum values.

Usage: {{dice|A|B|C}}

Where:

  • A is the number of dice to be rolled.
  • B is the number of sides the dices have.
  • C is an (optional) modifier added after the diceroll.

Output:

  • {{dice|1|6}} shows 1d6 (1 - 6)
  • {{dice|2|10|5}} shows 2d105 (7 - 25)
  • {{dice|3|8|-2}} shows 3d8--2 (1 - 22)