Difference between revisions of "Template:Damroll"

From Angband Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
<abbr title="Throw {{{1|X}}} {{#ifeq:{{{1|0}}}|1|die|dice}} with {{{2|Y}}} {{#ifeq:{{{2|0}}}|1|side|sides}}, averaging {{#expr:{{{1|0}}}*({{{2|0}}}+1)/2}} {{{3|damage}}}">{{{1|X}}}d{{{2|Y}}}</abbr><noinclude>{{uglybox|'''Usage''': <nowiki>{{damroll|X|Y}}</nowiki>, where X is the number of dice and Y is the number of sides.<br/>'''Output''': <abbr>XdY</abbr>, with mouseover text indicating the average result.|width=60%}}</noinclude>
+
<abbr title="Throw {{{1|X}}} {{#ifeq:{{{1|0}}}|1|die|dice}} with {{{2|Y}}} {{#ifeq:{{{2|0}}}|1|side|sides}}, averaging {{#expr:{{{1|0}}}*({{{2|0}}}+1)/2}} {{{3|damage}}}">{{{1|X}}}d{{{2|Y}}}</abbr><noinclude>{{uglybox|'''Usage''': <nowiki>{{damroll|X|Y}}</nowiki>, where X is the number of dice and Y is the number of sides.<br/>An optional third parameter can be added to specify the last word of the mouseover text.<br/>'''Output''': <abbr>XdY</abbr>, with mouseover text indicating the average result.|width=60%}}</noinclude>

Latest revision as of 03:20, 1 March 2020

XdY

Usage: {{damroll|X|Y}}, where X is the number of dice and Y is the number of sides.
An optional third parameter can be added to specify the last word of the mouseover text.
Output: XdY, with mouseover text indicating the average result.