summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-01-18 12:44:35 +0100
committerTor Andersson <tor@ccxvii.net>2025-01-19 01:39:35 +0100
commitacd17f3123afbf82f8e88de2270f34492ea44023 (patch)
tree9cd37ceb426f637305842716563dcab7c15f7605
parentd00fb214c71174f8c2759ceba81164f883a59888 (diff)
downloadtime-of-crisis-acd17f3123afbf82f8e88de2270f34492ea44023.tar.gz
v3: may declare last round to trigger end game
-rw-r--r--play.js2
-rw-r--r--rules.js24
2 files changed, 26 insertions, 0 deletions
diff --git a/play.js b/play.js
index c964808..8d1e9e3 100644
--- a/play.js
+++ b/play.js
@@ -1668,7 +1668,9 @@ function on_update() {
action_button("end_actions", "End Actions")
action_button("end_turn", "End Turn")
+ action_button("end_game", "End Game")
+ action_button("continue", "Continue")
action_button("pass", "Pass")
action_button("done", "Done")
action_button("undo", "Undo")
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() {