diff options
Diffstat (limited to 'tools/patchgame.js')
-rwxr-xr-x | tools/patchgame.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/patchgame.js b/tools/patchgame.js index 3a21f67..e191df8 100755 --- a/tools/patchgame.js +++ b/tools/patchgame.js @@ -79,10 +79,10 @@ function is_valid_action(rules, state, role, action, arg) { if (va) { if (Array.isArray(arg)) arg = arg[0] - if (arg === undefined || arg === null) - return (va === 1 || va === true || typeof va === "string") if (Array.isArray(va) && va.includes(arg)) return true + if (arg === undefined || arg === null || arg === 1) + return (va === 1 || va === true || typeof va === "string") } return false } |