From 0911289dd435647f5c0243b4cd290671bdb91010 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 3 Oct 2023 11:27:30 +0200 Subject: Fix cost checks for selecting extra space to Train Base / Civic Action. --- rules.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/rules.js b/rules.js index 1d2f198..a168fd5 100644 --- a/rules.js +++ b/rules.js @@ -2740,11 +2740,23 @@ function can_govt_train_place(s) { } function can_govt_train_base(s) { - return can_stack_piece(s, GOVT, BASE) && count_cubes(s) >= 3 + if (can_stack_piece(s, GOVT, BASE) && count_cubes(s) >= 3) { + if (is_selected_op_space(s)) + return true + else + return can_select_op_space(3) + } + return false } function can_govt_train_civic(s) { - return game.resources[GOVT] >= 3 && can_civic_action(s) + if (can_civic_action(s)) { + if (is_selected_op_space(s)) + return game.resources[GOVT] >= 3 + else + return can_select_op_space(3+3) + } + return false } function can_govt_train(s) { @@ -2992,9 +3004,8 @@ states.train_civic = { prompt() { view.prompt = `Train: Buy Civic Action.` for (let s = first_space; s <= last_dept; ++s) - if (can_civic_action(s)) - if (is_selected_op_space(s) || can_select_op_space(3)) - gen_action_space(s) + if (can_govt_train_civic(s)) + gen_action_space(s) }, space(s) { push_undo() -- cgit v1.2.3