From 0163e0aef0055802cd86f8afaff0fd94fa7d0777 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 4 Oct 2022 00:18:02 +0200 Subject: Check available money for building minefields. --- rules.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index adbf7d5..68c7181 100644 --- a/rules.js +++ b/rules.js @@ -6166,12 +6166,14 @@ states.minefield = { prompt() { view.prompt = `Buildup: Build a minefield.` let mfs = friendly_minefields() - let net = friendly_buildup_network() if (mfs.length >= 2) gen_action('dismantle') - for (let x of all_hexes) - if (net[x] && !is_battle_hex(x) && !set_has(mfs, x)) - gen_action_hex(x) + if (available_bps() >= 15) { + let net = friendly_buildup_network() + for (let x of all_hexes) + if (net[x] && !is_battle_hex(x) && !set_has(mfs, x)) + gen_action_hex(x) + } }, dismantle() { push_undo() -- cgit v1.2.3