Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mortigenus/roller
Rolling some dice in Swift
https://github.com/mortigenus/roller
Last synced: about 9 hours ago
JSON representation
Rolling some dice in Swift
- Host: GitHub
- URL: https://github.com/mortigenus/roller
- Owner: mortigenus
- License: mit
- Created: 2021-04-19T15:57:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-30T08:38:23.000Z (over 2 years ago)
- Last Synced: 2023-08-16T03:57:41.853Z (about 1 year ago)
- Language: Swift
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⚠️ WIP
![Tests workflow](https://github.com/mortigenus/Roller/actions/workflows/swift.yml/badge.svg)
# Roller
Rolling some dice. You can use it from the command line or add it to your app!
Currently supported expressions:
- Keep highest: 4d6kh3
- Keep lowest: 3d4kl1
- Drop highest: 3d4dh1
- Drop lowest: 4d6dl1
- Reroll equal: 2d4r1
- Reroll less: 2d4r<2
- Reroll less or equal: 2d4r<=2
- Reroll greater: 2d4r>2
- Reroll greater or equal: 2d4r>=3
- Explode equal: 2d4x4
- Explode less: 2d4x<2
- Explode less or equal: 2d4x<=2
- Explode greater: 2d4x>2
- Explode greater or equal: 2d4x>=3
- Count Successes equal: 2d4cs=4
- Count Successes less: 2d4cs<2
- Count Successes less or equal: 2d4cs<=2
- Count Successes greater: 2d4cs>2
- Count Successes greater or equal: 2d4cs>=3
- Multiple rolls in one: 4d6kh1 + 1d4 - 1## TODO:
- Support critical success?
- Refactor `roll()` method