Dice function seems not to behave correctly when used with dice with 2 digit or more e.g. dice('1d10').
It always retun 1.
Reviewing js code it seems that there is a typo in the regex:
string.match(/(\d+[d][\df]d*)(.*)/i)
Should be instead:
string.match(/(\d+[d][\df]\d*)(.*)/i)
Tested locally and after dice('1d10') correctly returns a number between 1 and 10.
Dice function seems not to behave correctly when used with dice with 2 digit or more e.g. dice('1d10'). It always retun 1.
Reviewing js code it seems that there is a typo in the regex:
string.match(/(\d+[d][\df]d*)(.*)/i)
Should be instead:string.match(/(\d+[d][\df]\d*)(.*)/i)
Tested locally and after dice('1d10') correctly returns a number between 1 and 10.
Thanks a lot for your work!