summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 2623f02..7cb23f7 100644
--- a/rules.js
+++ b/rules.js
@@ -2361,7 +2361,7 @@ function init_movement() {
function has_unmoved_piece(pow) {
for (let p of all_controlled_pieces(pow))
- if (!set_has(game.moved, p) && is_piece_on_map(p))
+ if (!set_has(game.moved, p) && is_piece_on_map(p) && can_piece_move_anywhere(p))
return true
return false
}
@@ -2375,7 +2375,7 @@ function has_moved_piece_on_flanders_map(pow) {
function has_unmoved_piece_on_flanders_map(pow) {
for (let p of all_power_pieces[pow])
- if (is_flanders_space(game.pos[p]) && !set_has(game.moved, p))
+ if (is_flanders_space(game.pos[p]) && !set_has(game.moved, p) && can_piece_move_anywhere(p))
return true
return false
}
@@ -2458,6 +2458,13 @@ function can_general_move_anywhere(p) {
return false
}
+function can_piece_move_anywhere(p) {
+ if (is_general(p))
+ return can_general_move_anywhere(p)
+ else
+ return can_train_move_anywhere(p)
+}
+
function may_dispute_flanders_movement() {
if (game.flags & F_MOVE_DISPUTE)
return false