summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-02-06 15:34:20 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commitbcfab31d9779c45717d23a3b2228357c3acc4644 (patch)
tree973b8820752e0addae4defcc2d15c853a65ddce4
parent77bf8f31c8357c935a477059da59a6b39d604aa7 (diff)
downloadwilderness-war-bcfab31d9779c45717d23a3b2228357c3acc4644.tar.gz
Can't move pieces twice during campaign.
-rw-r--r--rules.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index b22dd7f..c75b523 100644
--- a/rules.js
+++ b/rules.js
@@ -14,7 +14,6 @@
// crucial missing bits
// TODO: track 'held'
-// TODO: only move pieces once per campaign
// TODO: re-evaluate fortress ownership and VP when pieces move or are eliminated
// TODO: battle VP awards
// TODO: leaders alone - retreat and stomped by enemies
@@ -2442,6 +2441,9 @@ states.define_force = {
// pick up units
for_each_friendly_unit_in_node(space, p => {
+ // Can't move pieces twice in a campaign:
+ if (game.activation.moved && game.activation.moved.includes(p))
+ return; // continue
if (is_british_iroquois_or_mohawk(p)) {
// 5.534 Only Johnson can command British Iroquois and Mohawk (and for free)
if (selected === JOHNSON)
@@ -2479,6 +2481,15 @@ states.define_force = {
let main_leader = game.force.leader;
let reason = game.force.reason;
delete game.force;
+
+ // Remember which units have moved if we played a campaign card.
+ if (game.activation.list.length > 0) {
+ game.activation.moved = [];
+ for_each_piece_in_force(main_leader, p => {
+ game.activation.moved.push(p);
+ });
+ }
+
if (reason === 'move') {
goto_move_piece(main_leader);
} else if (reason === 'intercept') {