Added the ability to damage registered enemies with #attack

This commit is contained in:
raeleus 2024-10-07 22:53:43 -07:00
parent 599c9c0852
commit 9d2381e631
2 changed files with 36 additions and 6 deletions

View file

@ -152,9 +152,9 @@ function getArgumentRemainder(command, index) {
}
}
function searchArgument(command, pattern) {
function searchArgument(command, pattern, limit) {
var index = searchArgumentIndex(command, pattern)
if (index == -1) return null
if (index == -1 || limit != null && index > limit) return null
return getArgument(command, index)
}