mirror of
https://github.com/raeleus/Hashtag-DnD.git
synced 2025-07-05 13:10:28 -04:00
Update docs and allow hitmodifier to be a dice roll in #addenemy
This commit is contained in:
parent
066aa5ba03
commit
a41aaf1688
2 changed files with 7 additions and 5 deletions
4
Input.js
4
Input.js
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue