diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -162,7 +162,8 @@ function setup_player_turn() { next(); } function end_of_player_turn() { - if (get_next_faction(get_active_faction()) === game.first_player) { + const { f: faction } = get_active_node_args(); + if (get_next_faction(faction) === game.first_player) { game.engine = [ create_function_node('resolve_fascist_test'), create_function_node('setup_bag_of_glory'), @@ -309,6 +310,7 @@ function game_view(state, current) { bonuses: game.bonuses, current, current_events: game.current_events, + first_player: game.first_player, fronts: game.fronts, glory: game.glory, hand: faction === null ? [] : game.hands[faction], @@ -316,7 +318,9 @@ function game_view(state, current) { initiative: game.initiative, medallions: game.medallions, played_card: game.played_card, - player_order: current === OBSERVER ? game.player_order : get_player_order(faction).map((id) => faction_player_map[id]), + player_order: current === OBSERVER + ? game.player_order + : get_player_order(faction).map((id) => faction_player_map[id]), selectable_cards: game.selectable_cards, selected_cards: current === OBSERVER ? [] : game.selected_cards[faction], tableaus: game.tableaus, @@ -1764,6 +1768,7 @@ function end_of_turn() { }); game.active_abilities = []; game.used_medallions = []; + game.first_player = null; if (game.turn === 4) { end_of_year(); } @@ -2348,9 +2353,7 @@ function get_previous_faction(faction_id) { return player_faction_map[game.player_order[index - 1]]; } function get_next_faction(faction_id) { - console.log('get_next', faction_id); const index = game.player_order.indexOf(faction_player_map[faction_id]); - console.log('index', index); if (index === 2) { return player_faction_map[game.player_order[0]]; } |