From: Ian Jackson Date: Mon, 5 Jul 2021 22:23:58 +0000 (+0100) Subject: script: Make non-moveable pieces bottom, when lowerint X-Git-Tag: otter-0.7.2~261 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=58256fc48aa28ac39246595794537f732f63469b;p=otter.git script: Make non-moveable pieces bottom, when lowerint This avoids lowering pieces below the hand they are in, etc. Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index 933781b5..5c45c7a1 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -565,7 +565,7 @@ type LowerTodoList = { [piece: string]: LowerTodoItem }; keyops_local['lower'] = function (uo: UoRecord) { lower_targets(uo); } function lower_treat_bottom(p: PieceInfo): boolean { - return wresting || p.pinned; + return wresting || p.pinned || p.moveable == "No"; } function lower_targets(uo: UoRecord): boolean {