From acd17f3123afbf82f8e88de2270f34492ea44023 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 18 Jan 2025 12:44:35 +0100 Subject: v3: may declare last round to trigger end game --- rules.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 4b86a97..4ace71c 100644 --- a/rules.js +++ b/rules.js @@ -5467,6 +5467,10 @@ function goto_gain_legacy_provinces() { award_legacy_summary(game.current, "Improvements", count_own_improvements()) if (!game.end && is_emperor_player() && game.legacy[game.current] >= 60) { + if (is_deluxe()) { + game.state = "declare_last_round" + return + } log_br() log("Game will end after this round!") game.end = 1 @@ -5475,6 +5479,26 @@ function goto_gain_legacy_provinces() { goto_buy_trash_discard() } +states.declare_last_round = { + inactive: "End Game", + prompt() { + prompt("End Game: You may declare that this is the last round of the game.") + view.actions.end_game = 1 + view.actions.continue = 1 + }, + end_game() { + push_undo() + log_br() + log("Game will end after this round!") + game.end = 1 + goto_buy_trash_discard() + }, + continue() { + push_undo() + goto_buy_trash_discard() + }, +} + // === BUY / TRASH CARDS === function goto_buy_trash_discard() { -- cgit v1.2.3