diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-10-03 11:27:30 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-10-03 11:27:30 +0200 |
commit | 0911289dd435647f5c0243b4cd290671bdb91010 (patch) | |
tree | ca2aa46ab1cdd94eb895cd356f50dd19662f01f1 | |
parent | 71ef36a57b1cb6cf9e0a93012a550c4d7f3e860d (diff) | |
download | andean-abyss-0911289dd435647f5c0243b4cd290671bdb91010.tar.gz |
Fix cost checks for selecting extra space to Train Base / Civic Action.
-rw-r--r-- | rules.js | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -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() |