diff options
-rw-r--r-- | events.txt | 2 | ||||
-rw-r--r-- | play.js | 8 | ||||
-rw-r--r-- | rules.js | 4 |
3 files changed, 8 insertions, 6 deletions
@@ -565,7 +565,7 @@ prompt ' spaces with no Democratic SPs' add_infl_free 4 else prompt 'Select a Student or Intellectual space' -valid_spaces_country_socio_2 3, 4 +valid_spaces_country_socio_2 3 4 support_check_modified 2 2 endif @@ -152,10 +152,10 @@ function create_ui() { // SUPPORTING FUNCTIONS function on_click_space(evt) { - if (evt.button === 0) { - const space = evt.target.my_space - //console.log('on_click_space_called with space:', space); - if (send_action("infl", space)) { + if (evt.button === 0) { + const space = evt.target.my_space; + //console.log('on_click_space_called with space:', space); + if (send_action('space', space)) { //console.log('send_action with infl:', space); evt.stopPropagation() } else if (send_action("sc", space)) { @@ -202,7 +202,7 @@ exports.view = function(state, player) { view.drawn = game.vm.draw if (player === game.active) { - if (game.selected_space > 0 ) { + if (game.selected_space) { view.valid_spaces = [game.selected_space] } else { view.valid_spaces = game.valid_spaces @@ -744,6 +744,7 @@ states.finish_support_check_prep = { //return } else { view.prompt = `Select a space. ${pluralize(game.available_ops, 'support check')} remaining.` + console.log('valid_spaces', game.valid_spaces) for (let space_id of game.valid_spaces) { gen_action_space(space_id) } @@ -3802,6 +3803,7 @@ function new_turn() { game.com_tst_attempted_this_turn = 0 if (game.tst_7) {game.tst_7 = false} if (game.tst_8) {game.tst_8 = false} + delete game.selected_space //Remove events that only last one turn game.persistent_events = game.persistent_events.filter(n => n !== 25) /*Perestroika*/ |