2 releases
0.1.1 | May 18, 2022 |
---|---|
0.1.0 | May 17, 2022 |
#5 in #ttrpg
Used in genesys-dice-roller
14KB
252 lines
Dice Command Parser
This library parses a simple Genesys dice roll string (also works for Star Wars FFG RPG) and produces a representation of the dice that should be rolled and its modifier.
Example input: 2g1r1p
, yyypp
, difficulty difficulty ability proficiency
etc.
lib.rs
:
This crate provides functionality for the basic parsing of dice roll commands e.g. yyypp
, 2g1y2p
, difficulty difficulty ability proficiency
.
Given some input it will produce a DiceRoll
struct which can be used to then calculate a result.
Dependencies
~1–1.8MB
~36K SLoC