summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index c53c6bf..852e6a1 100644
--- a/rules.js
+++ b/rules.js
@@ -5262,6 +5262,15 @@ states.send_expeditionary_corps = {
piece(p) {
push_undo()
+ game.selected = p
+
+ // transfer troops to other stacked general if possible
+ let take = count_unstacked_take()
+ let give = count_stacked_give()
+ let xfer = Math.min(take, give)
+ if (xfer > 0)
+ give_troops(xfer)
+
let s = off_map_box(game.power)
log(`Expeditionary corps P${p} from S${game.pos[p]} to S${s}.`)
game.pos[p] = s
@@ -5271,7 +5280,6 @@ states.send_expeditionary_corps = {
pool: [],
used: [],
}
- game.selected = p
game.state = "recruit_for_expeditionary_corps"
} else {
game.state = "send_expeditionary_corps_done"
@@ -5286,6 +5294,7 @@ states.send_expeditionary_corps_done = {
view.actions.next = 1
},
next() {
+ game.selected = -1
if (game.power === P_PRAGMATIC)
next_execute_political_card()
else