From 6ac2c6928c566f23be2952ba641deb627ef1008f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 18 Mar 2025 10:02:30 +0100 Subject: Only send eliminated generals to off-map boxes if they can be paid for. --- rules.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 13d080e..5c87168 100644 --- a/rules.js +++ b/rules.js @@ -5498,9 +5498,16 @@ states.send_expeditionary_corps = { inactive: "send expeditionary corps off map", prompt() { prompt("Send expeditionary corps to off map box.") - for (let p of all_power_generals[game.power]) - if (is_piece_on_map_or_eliminated(p)) - gen_action_piece(p) + + let tc_in_hand = 0 + for_each_card_in_hand(c => tc_in_hand += to_value(c)) + + for (let p of all_power_generals[game.power]) { + if (is_piece_on_map_or_eliminated(p)) { + if (game.troops[p] > 0 || tc_in_hand >= 8) + gen_action_piece(p) + } + } }, piece(p) { push_undo() -- cgit v1.2.3