Difference between revisions of "User:Paxed/Template:dicemin"
Jump to navigation
Jump to search
m |
m |
||
Line 7: | Line 7: | ||
**f: {{#if: {{#pos:{{#explode:{{{1}}}|d|1}}|+}} | {{#sub: {{#explode:{{{1}}}|d|1}} | {{#pos:{{#explode:{{{1}}}|d|1}}|+}} }} | 0 }} | **f: {{#if: {{#pos:{{#explode:{{{1}}}|d|1}}|+}} | {{#sub: {{#explode:{{{1}}}|d|1}} | {{#pos:{{#explode:{{{1}}}|d|1}}|+}} }} | 0 }} | ||
**g: {{#if: {{#pos:{{#explode:{{{1}}}|d|1}}|-}} | {{#sub: {{#explode:{{{1}}}|d|1}} | {{#pos:{{#explode:{{{1}}}|d|1}}|-}} }} | 0 }} | **g: {{#if: {{#pos:{{#explode:{{{1}}}|d|1}}|-}} | {{#sub: {{#explode:{{{1}}}|d|1}} | {{#pos:{{#explode:{{{1}}}|d|1}}|-}} }} | 0 }} | ||
− | **h: {{#explode:{{{1}}}|d|0}} | + | **h: {{#explode:{{{1}}}|d|0}} {{#if: {{#pos:{{#explode:{{{1}}}|d|1}}|+}} | {{#sub: {{#explode:{{{1}}}|d|1}} | {{#pos:{{#explode:{{{1}}}|d|1}}|+}} }} | }} {{#if: {{#pos:{{#explode:{{{1}}}|d|1}}|-}} | {{#sub: {{#explode:{{{1}}}|d|1}} | {{#pos:{{#explode:{{{1}}}|d|1}}|-}} }} | }} |
</includeonly></onlyinclude> | </includeonly></onlyinclude> | ||
Revision as of 17:52, 4 March 2008
This template returns the minimum value a die roll in the standard d-notation can give. This cannot handle more than one d-notation, so no 1d6+1d4. See also User:Paxed/Template:dicemax.
Usage: {{dicemin|AdB+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. Use only simple plusses or minuses here!
Output:
- {{dicemin|1d6}} gives
- a: 1
- b: 6 ==
- c: 6 ==
- d: 6
- e: 6
- f: 0
- g: 0
- h: 1
- {{dicemin|2d10+5}} gives
- a: 2
- b: 10+5 == 2
- c: 10+5 ==
- d: +5
- e: 10+5
- f: +5
- g: 0
- h: 2 +5
- {{dicemin|3d8-2}} gives
- a: 3
- b: 8-2 ==
- c: 8-2 == 1
- d: 8-2
- e: -2
- f: 0
- g: -2
- h: 3 -2
{{#expr: {{#if: {{#sub: }} | + {{#sub: {{#explode:{{{1}}}|d|1}}|{{#rpos:{{#explode:{{{1}}}|d|1}}|+}} }} |{{#if: {{#sub: {{#explode:{{{1}}}|d|1}}|{{#rpos:{{#explode:{{{1}}}|d|1}}|-}} }} | - {{#sub: {{#explode:{{{1}}}|d|1}}|{{#rpos:{{#explode:{{{1}}}|d|1}}|-}} }} | +0 }} }} }} --- {{#explode:{{{1}}}|d|1}} - {{#rpos:{{#explode:{{{1}}}|d|1}}|+}} - {{#sub: {{#explode:{{{1}}}|d|1}}|{{#rpos:{{#explode:{{{1}}}|d|1}}|+}} }}