summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-05-07 21:35:49 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-24 21:06:18 +0200
commit046bcaac4ccae61b567c6e4cf8a79880127bc4c1 (patch)
treec3b1a051f97c35a00cf122c04e4d88a1ad3be77f
parent26c2e43e5d784cfe344b70e91b5c2afda112ba70 (diff)
downloadred-flag-over-paris-046bcaac4ccae61b567c6e4cf8a79880127bc4c1.tar.gz
Fix transition after attempting to removie a piece with ops.
-rw-r--r--rules.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index d293e17..5ee771b 100644
--- a/rules.js
+++ b/rules.js
@@ -1349,6 +1349,7 @@ states.operations_remove = {
if (str >= 3) {
log("Military strength " + str + ".")
remove_piece(p)
+ resume_operations_remove()
} else if (game.count >= 1) {
log("Military strength " + str + ".")
game.who = p
@@ -1360,9 +1361,8 @@ states.operations_remove = {
}
} else {
remove_piece(p)
+ resume_operations_remove()
}
-
- resume_operations_remove()
},
place() {
push_undo()
@@ -1416,6 +1416,8 @@ function resume_operations_remove() {
goto_operations_done()
else if (!can_operations_remove())
goto_operations_place()
+ else
+ game.state = "operations_remove"
}
function goto_operations_place() {