Skip to content

Javascript util functions for rolling dice in Warhammer games, including rerolls, exploding sixes, etc.

License

Notifications You must be signed in to change notification settings

markymc/warhammer-dice-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

warhammer-dice-utils

Javascript util functions for rolling dice in Warhammer games, including rerolls, exploding sixes, etc.

Usage

getSuccessfulRolls(numberOfRolls: int, targetValue: int, options: object)

Options

rerolls: Rerolls.ONES, Rerolls.ALL, or Rerolls.NONE (or pass no key) - reroll failed rolls or one or any value.

explodingSixes: true or false - any roll of six results in an additional roll of six being added. These are calculated after any rerolls.

Examples

getSuccessfulRolls(6, 4) - Roll six D6 requiring a roll of 4+.

getSuccessfulRolls(12, 3, {rerolls: Rerolls.ONES}) - Roll 12 D6 requiring a roll of 3+, rerolling 1s.

getSuccessfulRolls(18, 5, {explodingSixes: true}) - Roll 18 D6 requiring a roll of 5+, with exploding sixes.

getSuccessfulRolls(36, 2, {rerolls: Rerolls.ALL, explodingSixes: true}) - Roll 36 D6 requiring a roll of 2+, rerolling all failed rolls, and exploding sixes.

About

Javascript util functions for rolling dice in Warhammer games, including rerolls, exploding sixes, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published