diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-10-04 00:18:02 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 13:11:27 +0100 |
commit | 0163e0aef0055802cd86f8afaff0fd94fa7d0777 (patch) | |
tree | 17196a855a68bd1c4c93da73d019271223553786 | |
parent | 39b805a7da253435c5c8c694cb60b49f43adc83e (diff) | |
download | rommel-in-the-desert-0163e0aef0055802cd86f8afaff0fd94fa7d0777.tar.gz |
Check available money for building minefields.
-rw-r--r-- | rules.js | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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() |