summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-05-14 19:02:01 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:31:29 +0100
commitc61f77d386220839b39db92bf679bda9fc4b182b (patch)
treecfe591e4c3d0eb39b87707411e5edf4c868e1dcb
parentfc9ca66f2a79ea68047a0ab07296039fc99910a1 (diff)
downloadpax-pamir-c61f77d386220839b39db92bf679bda9fc4b182b.tar.gz
Check overthrow when moving tribes with Nationalism.
-rw-r--r--rules.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index e159ecd..b80440a 100644
--- a/rules.js
+++ b/rules.js
@@ -1769,11 +1769,13 @@ states.move = {
space(s) {
push_undo();
let old = game.pieces[game.selected];
- if (game.selected < 36)
+ game.pieces[game.selected] = s;
+ if (game.selected < 36) {
logi(`${player.loyalty} army from ${region_names[old]} to ${region_names[s]}.`);
- else
+ } else {
logi(`Tribe from ${region_names[old]} to ${region_names[s]}.`);
- game.pieces[game.selected] = s;
+ check_region_overthrow(game.active, old);
+ }
game.selected = -1;
if (--game.count === 0)
end_action();