Jason Weatherly<p>Okay, _now_ I'm done. Fixed a few parser errors and implemented a skew option (the `^` value) that will push the average value towards either 1 or the maximum of the dice. I like that once you get the parser up and running that it's easy to add stuff to it. I now am the official owner of a completely overkill dice running program.</p><p>For the example below, the skew is `2.0`. The random value is raised to the `1/skew` power before being multiplied by the number of sides of the die. If skew goes up, so do the results. If skew goes down, well, so do the results.</p><p>```<br>$ python main.py "^2 (2d6+2d8+12)[fire]+1d8[piercing]" | jq .<br>{<br> "results": {<br> "fire": 37,<br> "piercing": 7<br> }<br>}<br>```</p><p><a href="https://social.linux.pizza/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://social.linux.pizza/tags/statistics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>statistics</span></a> <a href="https://social.linux.pizza/tags/ttrpgs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ttrpgs</span></a> <a href="https://social.linux.pizza/tags/dice" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dice</span></a> <a href="https://social.linux.pizza/tags/lark" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lark</span></a> <a href="https://social.linux.pizza/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a></p>