Skip to content

Commit 338d98d

Browse files
authored
Merge pull request #1300 from kakaroto/gwf-fix
fix: roll20 genroll fix for min value rolls in roll20
2 parents 7cfe293 + e59adcf commit 338d98d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/roll20/content-script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function escapeRoll20Macro(text) {
4646

4747
function genRoll(dice, modifiers = {}) {
4848
dice = dice.replace(/ro<=([0-9]+)/, "ro<$1");
49-
dice = dice.replace(/(^|\s)+([^\s]+)min([0-9]+)([^\s]*)/g, "$1{$2$4, 0d0 + $3}kh1");
49+
dice = dice.replace(/(^|\s)+([^\s]+)min(\d+)([^\s+\-]*?)(?=[+\-\s]|$)/g, "$1{$2$4, 0d0 + $3}kh1");
5050
let roll = "[[" + dice;
5151
for (let m in modifiers) {
5252
let mod = modifiers[m].trim();

0 commit comments

Comments
 (0)