summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-07-13 11:41:09 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-13 11:44:55 +0200
commite203a6ffba80f6a2061d35ff33c7f2762b086b3c (patch)
treec0ea8dc09b473e27caf19f6f76c15df9d970f607 /rules.js
parent3ee3422b88c21f4ccd9b78f0194f3cc6012755a7 (diff)
downloadtime-of-crisis-e203a6ffba80f6a2061d35ff33c7f2762b086b3c.tar.gz
Select cards after all players have chosen their starting province.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js33
1 files changed, 29 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 27e14f9..21e691d 100644
--- a/rules.js
+++ b/rules.js
@@ -1200,7 +1200,19 @@ states.setup_province = {
set_general_inside_capital(game.current * 6 + 0)
set_legion_location(find_unused_legion(), ARMY + game.current * 6 + 0)
- game.state = "setup_hand"
+ if (game.fast_setup) {
+ game.state = "setup_hand"
+ return
+ }
+
+ clear_undo()
+ game.current = next_player()
+
+ // Go backwards for simultaneous selection of cards.
+ if (game.current === game.first) {
+ game.current = prev_player()
+ game.state = "setup_hand"
+ }
},
}
@@ -1224,10 +1236,21 @@ states.setup_hand = {
},
done() {
clear_undo()
- game.state = "setup_province"
- game.current = next_player()
+
+ if (game.fast_setup) {
+ game.state = "setup_province"
+ game.current = next_player()
+ if (game.current === game.first) {
+ delete game.fast_setup
+ goto_start_turn()
+ }
+ return
+ }
+
if (game.current === game.first)
goto_start_turn()
+ else
+ game.current = prev_player()
},
}
@@ -5369,6 +5392,9 @@ exports.setup = function (seed, scenario, options) {
log_h1("Time of Crisis")
+ if (options.fast_setup)
+ game.fast_setup = 1
+
if (options.emperor) {
log("Emperor Rules.")
log_br()
@@ -5443,7 +5469,6 @@ exports.setup = function (seed, scenario, options) {
game.hand[player] = []
game.draw[player] = setup_player_deck(player)
game.discard[player] = []
- //for (let i = 0; i < game.market.length; ++i) set_add(game.draw[player], game.market[i].pop())
}
update_neutral_italia()