From b12ba58c5a6535b5063957d48b66fdfccf9e5ad2 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 21 Oct 2023 18:30:25 +0200 Subject: Improve kidnap prompt. --- rules.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/rules.js b/rules.js index a84e297..2516eb3 100644 --- a/rules.js +++ b/rules.js @@ -5358,26 +5358,34 @@ states.kidnap_space = { let g = is_govt_kidnap_space(s) let c = is_cartels_kidnap_space(s) + let cs = false if (g) gen_action_resources(GOVT) if (c) { // Drug Ransom if targeting Cartels with Shipment if (is_any_shipment_held_by_faction_in_space(CARTELS, s)) { - for (let sh = 0; sh < 4; ++sh) - if (is_shipment_held_by_faction_in_space(sh, CARTELS, s)) + for (let sh = 0; sh < 4; ++sh) { + if (is_shipment_held_by_faction_in_space(sh, CARTELS, s)) { gen_action_shipment(sh) + cs = true + } + } } else { gen_action_resources(CARTELS) } } - if (g && c) - view.prompt += " Take from Government or Cartels!" + if (g && c && cs) + view.prompt += " Take Resources or Shipment from Government or Cartels!" + else if (g && c && !cs) + view.prompt += " Take Resources from Government or Cartels!" else if (g) - view.prompt += " Take from Government!" - else if (c) - view.prompt += " Take from Cartels!" + view.prompt += " Take Resources from Government!" + else if (c && cs) + view.prompt += " Take Resources or Shipment from Cartels!" + else if (c && !cs) + view.prompt += " Take Resources from Cartels!" else view.prompt += " IMPOSSIBLE!" }, -- cgit v1.2.3