diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-04-28 19:35:46 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-03 18:48:16 +0200 |
commit | 2963cf5d82063c3a7583feea0fad94d55aad91c9 (patch) | |
tree | 78c7057847bac596d72954ade4be0d133e9733af /rules.js | |
parent | 8e8fdfc0af4453a26fa9318035b53b7d64763c6c (diff) | |
download | andean-abyss-2963cf5d82063c3a7583feea0fad94d55aad91c9.tar.gz |
Manual +4 Aid for Eradicate. No Resources prompt for Bribe.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 30 |
1 files changed, 22 insertions, 8 deletions
@@ -4961,18 +4961,31 @@ states.eradicate = { }, space(s) { game.sa.where = s + game.state = "eradicate_aid" log_space(game.sa.where, "Eradicate") + } +} + +states.eradicate_aid = { + prompt() { + view.prompt = "Eradicate: Add +4 Aid." + view.actions.aid = 1 + }, + aid() { logi("Aid +4") add_aid(4) - - if (has_piece(s, CARTELS, BASE)) - game.state = "eradicate_base" - else - goto_eradicate_shift() + resume_eradicate_base() } } +function resume_eradicate_base() { + if (has_piece(game.sa.where, CARTELS, BASE)) + game.state = "eradicate_base" + else + goto_eradicate_shift() +} + states.eradicate_base = { prompt() { view.prompt = `Eradicate: Remove Cartel Bases in ${space_name[game.sa.where]}.` @@ -4982,8 +4995,7 @@ states.eradicate_base = { piece(p) { logi("Removed Cartels Base") remove_piece(p) - if (!has_piece(game.sa.where, CARTELS, BASE)) - goto_eradicate_shift() + resume_eradicate_base() } } @@ -5697,11 +5709,13 @@ function resume_bribe() { states.bribe = { prompt() { - view.prompt = `Bribe: Select up to 3 spaces.` if (game.resources[CARTELS] >= 3) { + view.prompt = `Bribe: Select up to 3 spaces.` for (let s = first_space; s <= last_space; ++s) if (!set_has(game.sa.spaces, s) && has_enemy_piece(s)) gen_action_space(s) + } else { + view.prompt = "Bribe: No Resources." } view.actions.end_bribe = 1 }, |