From 04f3fce657af20407eb0e640d925e0fe79913aac Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sat, 26 Oct 2024 07:54:12 +0100 Subject: Working on no null space --- rules.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 877c4d8..a508d04 100644 --- a/rules.js +++ b/rules.js @@ -201,7 +201,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 @@ -748,6 +748,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) } @@ -3806,6 +3807,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*/ -- cgit v1.2.3