My attempt at a cli dnd dice roller. I'm going to over-engineer the crap out of this...
go get github.com/3xcellent/go-roll
go-roll d20 - roll a 20-sided die
go-roll d20h - roll twice and keep the highest (i.e. w/ advantage)
go-roll d20l - roll twice and keep the lowest (i.e. w/ disadvantage)
go-roll d20+2 - add modifier to roll
go-roll 4d8 - roll 4 8-sided die
syntax can be combined, but doesn't always make sense go-roll 100d100h+99
Sometimes you like to see what the system rolled for you:
go-roll -v 2d20+9will output something similar to:
Rolls: 18, 19
Modifier: +9
Total: 46 (min/max 11/49)
go-rollis only parsing modifiers up to two characters currently. If there's a good reason to add modifiers for numbers higher than 99, please create an issue.