Open eandersons opened 1 year ago
Math is already supported: !roll 1d10 - 1
This issue is not about math.
From what I have observed, !roll 10d9
or !roll 10d9 - 1
will not give a results set that includes zeros (for example: 10d9: 8 0 2 2 5 1 0 7 9 3
) because the range always starts from 1, but sometimes zero is desirable as well.
Right, multiple dice with the show individual rolls option is a different case, all other cases would be about math
In some cases zero is desirable in roll results.
I took a quick look at the code, and it seems that zero is never returned as a possible outcome (except for
!roll d0
or!roll 3d0
where0
is the only result).I would like to try to implement this, but before that some things should be clarified. What would be the best way to explicitly instruct the
!roll
command to include zero as one of the possible dice roll outcomes? A few options come in my mind:!roll 1d9,0
;!roll 1d9 --zero
or!roll --zero 1d9
, or!roll with-zero 1d9
;!roll 1d[0-9]
or!roll 1d0..9
(this would introduce additional functionality - a possibility to specify an explicit range).Personally I like the last the most.
I am not completely sure though how well any of these proposed options would comply with the rest of
!roll
's functionality.