Update docs and allow hitmodifier to be a dice roll in #addenemy

This commit is contained in:
raeleus 2024-10-11 08:01:15 -07:00
parent 066aa5ba03
commit a41aaf1688
2 changed files with 7 additions and 5 deletions

View file

@ -1982,7 +1982,9 @@ function doAddEnemy(command) {
if (hitModifier == null) {
state.show = "none"
return "\n[Error: Not enough parameters. See #help]\n"
} else if (isNaN(hitModifier)) {
} else if (/^\d*d\d+((\+|-)\d+)?$/gi.test(hitModifier)) {
hitModifier = calculateRoll(hitModifier)
} else if (isNaN(hitModifier)) {
state.show = "none"
return "\n[Error: Expected a number. See #help]\n"
}