Dice: fix display of multi-run rolls (e.g. 6#d20)

This commit is contained in:
Brian S. Stephan 2011-10-14 14:22:56 -05:00
parent 86e6cd3db0
commit ad93ea28ec
1 changed files with 10 additions and 4 deletions

View File

@ -129,10 +129,16 @@ class Dice(Module):
res = m
curr_str += str(m)
total += mode * res
if comment != None:
output = "%d %s 14(%s)" % (total, comment.strip(), curr_str)
else:
output = "%d 14(%s)" % (total, curr_str)
if repeat == 1:
if comment != None:
output = "%d %s 14(%s)" % (total, comment.strip(), curr_str)
else:
output = "%d 14(%s)" % (total, curr_str)
else:
output += "%d 14(%s)" % (total, curr_str)
if i == repeat - 1:
if comment != None:
output += " (%s)" % (comment.strip())
return output
def p_roll_r(self, p):