Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bugs with invalid dice notation input. Using `dice:new('3d4+')` or `dice:new('3d4^1')` before this bugfix should have caused an error, but did not due to a loophole in the pattern matching that was used. This has been changed and it will now cause an error when invalid notation is used. Fixed bug involving `dice.__concat` metamethod. When using the concat operator, if a dice instance `dice.sets < 1` then it would accidentally overwrite the notation and exclude the sets. This resulted in the dice instance being defaulted to `dice.sets = 1`. Added new method `dice:getNotation()` this returns the raw notation of all the dice variables. Using this method if your dice instance has any of the following faces, num_dice, or sets as a negative it will reveal it in the string. `Ex. '(-5d-7)x-2'` The same dice instance used with the `dice:__tostring()` metamethod will default those negative values to 1. `Ex. using the same dice instance '1d1'`
- Loading branch information