chiark / gitweb /
script: Do not multiselect hands (non-moveable pieces)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Jun 2021 00:22:33 +0000 (01:22 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Jun 2021 00:22:33 +0000 (01:22 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index 0933f533c18bacdb70e1f7478d2802cc904bd67a..c1ecd3e5ea378f04cfe77228f70ac40be081a67d 100644 (file)
@@ -927,6 +927,9 @@ function mouse_find_predicate(
     let p = pieces[piece];
     if (p.pinned && !wresting) continue;
     if (p.held && p.held != us && !wresting) continue;
+    if (i > 0
+       && !(p.moveable == 'Yes' || p.moveable == 'IfWresting' && wresting))
+      continue;
     if (!predicate(p)) {
       continue;
     }