diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -348,8 +348,6 @@ function game_view(state, current) { view = { log: game.log, prompt: null, - bag_of_glory: game.bag_of_glory, - bag_of_glory_count: game.bag_of_glory.length, bonuses: game.bonuses, current_events: game.current_events, first_player: game.first_player, @@ -371,6 +369,8 @@ function game_view(state, current) { year: game.year, fascist: game.fascist, }; + if (!game.hidden_bag) + view.bag_of_glory = game.bag_of_glory; if (game.state === 'game_over') { view.prompt = game.victory; } @@ -391,7 +391,7 @@ function game_view(state, current) { } return view; } -function setup(seed, _scenario, _options) { +function setup(seed, _scenario, options) { game = { seed: seed, state: null, @@ -479,6 +479,8 @@ function setup(seed, _scenario, _options) { fascist: 0, card_played: 0, }; + if (options.hidden_bag) + game.hidden_bag = 1; game.player_order.push(exports.roles[random(2)]); game.player_order.push(game.player_order[1] === data_1.ANARCHIST ? data_1.COMMUNIST : data_1.ANARCHIST); draw_medallions(); |