Fixed double punctuation in attack. Resolves #2

This commit is contained in:
raeleus 2024-09-22 23:53:38 -07:00
parent 87b3485069
commit 99bbd4fe5a
2 changed files with 5 additions and 1 deletions

View file

@ -1031,7 +1031,7 @@ function doAttack(command) {
var targetText = getArgumentRemainder(command, textIndex)
var toMatches = targetText.match(/^to\s+/gi)
if (toMatches != null) targetText = targetText.substring(toMatches[0].length)
if (!/^.*(\.|!|\?)$/gi.test(targetText)) targetText += "."
targetText = stripPunctuation(targetText)
var die1 = calculateRoll("1d20")
var die2 = calculateRoll("1d20")