A fast, powerful, and extensible dice engine for D&D, d20 systems, and any other system that needs dice!
Adds type hints to main roll methods and utils, preventing IDEs like PyCharm from reading the docstrings and complaining about types
utils.tree_map
would not copy a Set's values, leading to map operations modifying the cached expression/AST (see avrae/avrae#1537)Xd% => {0, 10, ..., 90}
) (thanks @dalemyers!)requirements.txt
was missing while building from sdist (thanks @nikkobautista!)Changes the grammar of dice to be explicit in where whitespace is allowed, handling many more comment ambiguity cases.
Handles more comment ambiguities in parsing when allow_comments=True
.
Fixes an issue where RollResult.total
and RollResult.result
would not represent the most up-to-date result of the expression (in case the expression was directly modified)
UnexpectedCharacters
instead of RollSyntaxError
Initial release
utils.simplify_expr_annotations()
utils.simplify_expr_annotations()
not annotate the right sides of multiplicative binops in ambiguity resolution