From: Ian Jackson Date: Thu, 3 Jun 2021 00:22:33 +0000 (+0100) Subject: script: Do not multiselect hands (non-moveable pieces) X-Git-Tag: otter-0.7.0~73 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=98579e020dcb446ce9e24fd31153b65ce4402e24;p=otter.git script: Do not multiselect hands (non-moveable pieces) Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index 0933f533..c1ecd3e5 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -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; }