diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -155,11 +155,16 @@ function setup_player_turn(faction_id) { if (game.first_player === null) { game.first_player = next_faction; } - game.engine = [ - create_function_node('start_of_player_turn', { f: next_faction }), - create_state_node('player_turn', next_faction), - ]; - next(); + if (game.selected_cards[next_faction].length > 0) { + game.engine = [ + create_function_node('start_of_player_turn', { f: next_faction }), + create_state_node('player_turn', next_faction), + ]; + next(); + } + else { + setup_player_turn(get_next_faction_in_player_order(next_faction)); + } } function check_end_of_year_discard() { const { f: faction } = get_active_node_args(); @@ -1029,6 +1034,9 @@ states.choose_card = { view.actions.undo = 1; view.actions.confirm = 1; } + if (game.selected_cards[faction].length === 0 && game.hands[faction].length === 0) { + gen_action('skip'); + } }, spend_hp() { resolve_spend_hp(); @@ -1047,6 +1055,12 @@ states.choose_card = { resolve_active_and_proceed(); } }, + skip(_, player) { + set_delete(game.active, player); + if (game.active.length === 0) { + resolve_active_and_proceed(); + } + }, }; states.choose_final_bid = { inactive: 'choose Final Bid', |