summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js2
-rw-r--r--rules.js42
2 files changed, 22 insertions, 22 deletions
diff --git a/play.js b/play.js
index 44af13d..b2e3449 100644
--- a/play.js
+++ b/play.js
@@ -827,6 +827,8 @@ function on_update() { // eslint-disable-line no-unused-vars
action_button("roll", "Roll")
action_button("reroll", "Re-roll")
action_button("end_event", "End Event")
+ action_button("next_turn", "Next Turn")
+ action_button("final_voting", "Final Voting")
action_button("skip", "Skip")
action_button("pass", "Pass")
diff --git a/rules.js b/rules.js
index 1e67743..9f58ac2 100644
--- a/rules.js
+++ b/rules.js
@@ -1112,28 +1112,14 @@ function end_player_round() {
begin_player_round()
}
-function goto_cleanup_phase() {
- log_h2("Cleanup")
- game.state = "cleanup_phase"
-}
-
-states.cleanup_phase = {
- inactive: "do Cleanup.",
- prompt() {
- view.prompt = "Cleanup."
- gen_action("done")
- },
- done() {
- end_cleanup_phase()
- }
-}
-
function discard_persistent_card(cards, c) {
log(`C${c} discarded.`)
array_remove_item(cards, c)
}
-function end_cleanup_phase() {
+function goto_cleanup_phase() {
+ log_h2("Cleanup")
+
if (game.turn < 6) {
// any cards in the “Cards in Effect for the Rest of the Turn box”
// are placed in the appropriate discard pile.
@@ -1145,9 +1131,6 @@ function end_cleanup_phase() {
throw Error("ASSERT game.support_hand.length === 1")
if (game.opposition_hand.length !== 1)
throw Error("ASSERT game.opposition_hand.length === 1")
-
- start_turn()
- return
}
// At the end of Turn 6, if the Nineteenth
@@ -1173,10 +1156,25 @@ function end_cleanup_phase() {
discard_persistent_card(game.persistent_game, c)
}
- goto_final_voting()
+ game.state = "cleanup_phase"
}
-
+states.cleanup_phase = {
+ inactive: "do Cleanup.",
+ prompt() {
+ view.prompt = "Cleanup."
+ if (game.turn < 6)
+ gen_action("next_turn")
+ else
+ gen_action("final_voting")
+ },
+ next_turn() {
+ start_turn()
+ },
+ final_voting() {
+ goto_final_voting()
+ }
+}
function goto_final_voting() {
log_h1("Final Voting")