/L5R_4E_dice_roller

Script to roll dice for the 4th edition of the Legend of the 5 Rings roleplaying game.

Primary LanguagePythonMIT LicenseMIT

L5R 4E dice roller

Build Status

Script to roll dice for the 4th edition of the Legend of the 5 Rings roleplaying game (python 3).

How to use

Make the script executable:

chmod u+x roll.py

Pass number of dice to roll-keep (e.g. 6k3), followed by a bonus/penalty if applicable.

./roll.py 6k3 [12] [-u] [-e value]
./roll.py 6k3 [-5] [--unskilled] [--explosion value]

Possible parameters:

    -u, --unskilled, dice explosion is disabled.
    -e, --explosion, threshold value for dice explosion (10 by default).

Examples:

./roll.py 5k2
./roll.py 5k3 -u
./roll.py 6k2 -e 9

Container use

docker build -t l5r_dice .
docker run -it --rm l5r_dice

Or if you install coverage.py:

coverage run test_roll.py
coverage report -m
coverage html
open htmlcov/index.html

Then, instead of './roll.py 5k2' --> 'docker run --rm -it l5r_dice 5k2'.

You can also pull the container from dockerhub: https://hub.docker.com/r/alpacarider/l5r_dice