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

From NetHackWiki
Jump to navigation Jump to search
m
m
Line 8: Line 8:
 
*A is the number of dice to be rolled.
 
*A is the number of dice to be rolled.
 
*B is the number of sides the dices have.
 
*B is the number of sides the dices have.
 +
*optionally, you can include a modifier to the end of the dice, for example <tt>1d6+2</tt>. Use only plusses and minuses here!
  
 
Output:
 
Output:
 +
*<tt><nowiki>{{dicemax|4}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dicemax|4}}</tt>
 
*<tt><nowiki>{{dicemax|1d6}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dicemax|1d6}}</tt>
 
*<tt><nowiki>{{dicemax|1d6}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dicemax|1d6}}</tt>
 
*<tt><nowiki>{{dicemax|2d10}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dicemax|2d10}}</tt>
 
*<tt><nowiki>{{dicemax|2d10}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dicemax|2d10}}</tt>
 
*<tt><nowiki>{{dicemax|3d8}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dicemax|3d8}}</tt>
 
*<tt><nowiki>{{dicemax|3d8}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dicemax|3d8}}</tt>
 
 
*<tt><nowiki>{{dicemax|1d8+5}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dicemax|1d8+5}}</tt>
 
*<tt><nowiki>{{dicemax|1d8+5}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dicemax|1d8+5}}</tt>
 +
*<tt><nowiki>{{dicemax|2d4-1}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dicemax|2d4-1}}</tt>

Revision as of 18:17, 4 March 2008


This template returns the maximum value a die roll in the standard d-notation can give. This cannot handle more than one d-notation, so no 1d6+1d4.

Usage: {{dicemax|AdB}}

Where:

  • A is the number of dice to be rolled.
  • B is the number of sides the dices have.
  • optionally, you can include a modifier to the end of the dice, for example 1d6+2. Use only plusses and minuses here!

Output:

  • {{dicemax|4}} shows Expression error: Missing operand for *.
  • {{dicemax|1d6}} shows 6
  • {{dicemax|2d10}} shows 20
  • {{dicemax|3d8}} shows 24
  • {{dicemax|1d8+5}} shows 13
  • {{dicemax|2d4-1}} shows 7