Allow flipping around check and try with the ability/skill first.

This commit is contained in:
raeleus 2024-09-22 17:04:58 -07:00
parent 9e7a69087b
commit bfd87c5f90
2 changed files with 27 additions and 1 deletions

View file

@ -70,7 +70,9 @@ function getArgumentRemainder(command, index) {
const pattern = new RegExp(argumentPattern)
while ((match = pattern.exec(command)) != null) {
if (counter++ == index + 1) {
return command.substring(match.index).replace(/^"/, "").replace(/"$/, "").replaceAll(/\\"/g, '"')
var result = command.substring(match.index)
if (/^".*"$/g.test(result)) result = result.replace(/^"/, "").replace(/"$/, "")
return result.replaceAll(/\\"/g, '"')
}
}
}