summaryrefslogtreecommitdiff
path: root/tools/patchgame.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/patchgame.js')
-rwxr-xr-xtools/patchgame.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/patchgame.js b/tools/patchgame.js
index 1426a75..fef07a0 100755
--- a/tools/patchgame.js
+++ b/tools/patchgame.js
@@ -79,11 +79,9 @@ function is_valid_action(rules, state, role, action, arg) {
let view = rules.view(state, role)
let va = view.actions[action]
if (va) {
- if (Array.isArray(arg))
- arg = arg[0]
if (Array.isArray(va) && va.includes(arg))
return true
- if (arg === undefined || arg === null || arg === 1)
+ if (arg === undefined || arg === null || arg === 1 || Array.isArray(arg))
return (va === 1 || va === true || typeof va === "string")
}
return false