ErinMorelli / em-slack-roll

Roll some dice on Slack.
https://slack-roll.herokuapp.com
MIT License
8 stars 2 forks source link

Feature Request: Success-based #1

Closed evolutionism closed 6 years ago

evolutionism commented 8 years ago

Success-based output. This can be combined with value 1 tracking because a lot of games using success-based systems also track number of 1s.

Ex: 4d6e5 = roll 4 6-sided dice; results >=5 count as a hit; results = 1 count as a miss

So the out put would be something like: roll-bot rolled 4 6-sided dice: 3 successes, 1 failure ( 5, 1, 6, 5)

SmittyHalibut commented 7 years ago

I didn't implement my patch exactly as suggested here by @evolutionism because I didn't see this request before writing my code. But my patch should at least give a good starting point, if @ErinMorelli thinks it should be implemented different than how I did it.

ErinMorelli commented 6 years ago

Apologies for the (very) long delay in responding to this, but a version of this feature is now live! Requesting a roll like this:

/roll 4d6 hit5

will produce a result that might look like this:

erinmorelli rolled 4 6-sided dice: 14 ( 1, 5, 4, 4 ) with 1 hit and 3 misses (1 critical)

or

erinmorelli rolled 4 6-sided dice: 14 ( 2, 4, 6, 2 ) with 1 hit (1 critical) and 3 misses

Let me know what you think or if you run into any issues!