0.0
No commit activity in last 3 years
No release in over 3 years
A clean way to roll complex dice structures
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 0.10
~> 3.4
~> 0.11
 Project Readme

dice

A ruby dice roller

require 'dice'
Dice.roll('1d100') # => 57

You can also add static modifiers

Dice.roll('1d100+5') # => 57+5 # => 62

And you can modify the dice rolls them selves by dropping the highest dice result

Dice.roll('3d100dh') # => [57, 14, 88] # => [57, 14] # => 71
Dice.roll('3d100dh2') # => [57, 14, 88] # => 14

Or dropping the lowest dice result

Dice.roll('3d100dl') # => [57, 14, 88] # => [57, 88] # => 145
Dice.roll('3d100dl2') # => [57, 14, 88] # => 88