项目作者: davidhaller

项目描述 :
DnD dice rolling simulator.
高级语言: Python
项目地址: git://github.com/davidhaller/roll.git
创建时间: 2017-12-11T23:42:43Z
项目社区:https://github.com/davidhaller/roll

开源协议:GNU General Public License v3.0

下载


roll

roll is a command line tool which simulates rolling a die like those used in Dungeons and Dragons, the Pen and Paper role playing game.

Install

  1. pipx install git+https://github.com/davidhaller/roll.git

Usage

Run the roll script from your command line. You will get a shell-like prompt where you can enter roll commands like this:

  1. roll> 1d20 + 4
  2. [15] + 4 = 19
  3. roll> 2d8
  4. [6, 1] + 0 = 7
  5. roll> 3 * d6 - 1
  6. [6] - 1 = 5
  7. [3] - 1 = 2
  8. [4] - 1 = 3

Quit the program by typing exit or quit.

You can also pipe commands into roll:

  1. echo "1d12 + 3; 1d4; 6d6 - 1" | roll
  2. [8] + 3 = 11
  3. [3] + 0 = 3
  4. [5, 6, 4, 2, 1, 6] - 1 = 23

Or you can pass roll commands as an argument:

  1. roll d20
  2. [20] + 0 = 20

If you want bash-like command history controlled by your arrow keys, I recommend using rlwrap, which should be available through your distribution’s package repository.

  1. rlwrap roll

Dependencies

You will only need a Python interpreter installed. No external dependencies required.