summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-06-03 10:28:13 +0200
committerTor Andersson <tor@ccxvii.net>2024-06-03 10:28:47 +0200
commit95c7282a39d572babd204158da022a643f187eb0 (patch)
treebe86cf8d33c3dfa3c05358b1ed6f1e5173c3209a
parentbc2dc9049d36ceb1459377371004067923d658e3 (diff)
downloadfriedrich-95c7282a39d572babd204158da022a643f187eb0.tar.gz
remove own pieces when nations quit the game
-rw-r--r--rules.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/rules.js b/rules.js
index 95ee3e8..cff436a 100644
--- a/rules.js
+++ b/rules.js
@@ -3204,19 +3204,19 @@ function goto_clock_of_fate() {
}
if (fc === FC_ELISABETH) {
- set_active_to_power(P_PRUSSIA)
+ set_active_to_power(P_RUSSIA)
game.state = "russia_quits_the_game_1"
return
}
if (fc === FC_SWEDEN) {
- set_active_to_power(P_PRUSSIA)
+ set_active_to_power(P_SWEDEN)
game.state = "sweden_quits_the_game_1"
return
}
if ((fc === FC_INDIA && set_has(game.fate, FC_AMERICA)) || (fc === FC_AMERICA && set_has(game.fate, FC_INDIA))) {
- set_active_to_power(P_HANOVER)
+ set_active_to_power(P_FRANCE)
game.state = "france_quits_the_game_1"
return
}
@@ -3249,8 +3249,10 @@ states.russia_quits_the_game_1 = {
game.pos[p] = REMOVED
if (is_general(p))
game.troops[p] = 0
- if (has_removed_all_pieces(P_RUSSIA))
+ if (has_removed_all_pieces(P_RUSSIA)) {
+ set_active_to_power(P_PRUSSIA)
game.state = "russia_quits_the_game_2"
+ }
},
}
@@ -3294,8 +3296,10 @@ states.sweden_quits_the_game_1 = {
game.pos[p] = REMOVED
if (is_general(p))
game.troops[p] = 0
- if (has_removed_all_pieces(P_SWEDEN))
+ if (has_removed_all_pieces(P_SWEDEN)) {
+ set_active_to_power(P_PRUSSIA)
game.state = "sweden_quits_the_game_2"
+ }
},
}
@@ -3339,8 +3343,10 @@ states.france_quits_the_game_1 = {
game.pos[p] = REMOVED
if (is_general(p))
game.troops[p] = 0
- if (has_removed_all_pieces(P_FRANCE))
+ if (has_removed_all_pieces(P_FRANCE)) {
+ set_active_to_power(P_HANOVER)
game.state = "france_quits_the_game_2"
+ }
},
}