From 95c7282a39d572babd204158da022a643f187eb0 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 3 Jun 2024 10:28:13 +0200 Subject: remove own pieces when nations quit the game --- rules.js | 18 ++++++++++++------ 1 file 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" + } }, } -- cgit v1.2.3