A library for evaluating dice notation for Pathfinder RPG.
Just roll!
>>> from pathfinder_dice import roll
>>> roll("max(2, 4) + 2d6x2x4")
54Result of multiplying in Pathfinder have some specific:
>>> roll('1x2x3')
4For right multiplying you can use *:
>>> roll('1*2*3')
6You can use digits, min and max functions, all functions from math module, braces, arithmetic operators. Otherwise ArithmeticError will be raised.
>>> roll('print(2)')
ArithmeticError: Invalid expression: print(2)