summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-21 18:30:25 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-21 18:30:25 +0200
commitb12ba58c5a6535b5063957d48b66fdfccf9e5ad2 (patch)
tree2948191749e44115f1a985017f51b80129e6c652
parentb691b783a8bf1c285814244c2ab3b04271d477bb (diff)
downloadandean-abyss-b12ba58c5a6535b5063957d48b66fdfccf9e5ad2.tar.gz
Improve kidnap prompt.
-rw-r--r--rules.js22
1 files 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!"
},