Skip to main content

A library that handles dice rolls for the Swedish roleplaying game EON IV (https://helmgast.se/eon/).

Project description

eon4dice

A library that handles dice rolls for the Swedish tabletop roleplaying game EON IV (https://helmgast.se/eon/).

All six sided dice rolls will explode according to Eon rules, which means that every time a 6 is rolled, it will be removed and the die replaced two new six sided dice, which can then explode in turn.

As the rules are currently only available in Swedish, the letter T is used instead of D to denote dice.

Installation

pip install eon4dice

How to use

Import and call the 'roll' function. It expects input as arguments (number_of_dice, sides=6, bonus=0) or a string. Note that the 'sides' and 'bonus' arguments are optional. For debugging purposes, you can also set verbose=True to allow you to see the rolls being made.

Examples:

from eon4dice import roll

result = roll(1,100) # rolls 1T100
result = roll(3, bonus=3)  # rolls 3T6+3
result = roll(2) # rolls 2T6+0
result = roll('4T6+2')
result = roll('1t100', verbose=True)

D6's will always explode. No other dice (such as D10 or D100) will explode.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eon4dice-1.1.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eon4dice-1.1.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file eon4dice-1.1.1.tar.gz.

File metadata

  • Download URL: eon4dice-1.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for eon4dice-1.1.1.tar.gz
Algorithm Hash digest
SHA256 f3417e590624be40e50d420bec747f9529f4930dff70beffe8757838599cf51b
MD5 39d10599d22efa47a1e8a18a77264204
BLAKE2b-256 fec00d671876f7e8a8c7edcd36cb1f47ef3dcd64a0f23544e1693fdc63cd134b

See more details on using hashes here.

File details

Details for the file eon4dice-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: eon4dice-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for eon4dice-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2a9d9611d95993948161fbe3aefdfffb17f70f822b104f9fd4b20153c33beb6
MD5 689e4f9d637bd4dcf01fbebe20634ea7
BLAKE2b-256 9fc3f99c138fde8d243f771a0f6672cfc89e538c71977cd758c80301d0f8bcc2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page