summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-04-23 13:29:24 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:16 +0200
commitc627af2462954bd4f000d9a4fc43fe63ed1a2358 (patch)
treedfe2b158de7da58604197d9b4febc5bb5c13c1a1 /play.js
parent4fdda6328e67b25db6ff30c0f18fb7d5ffef97b9 (diff)
downloadandean-abyss-c627af2462954bd4f000d9a4fc43fe63ed1a2358.tar.gz
WIP Clean up Shipment Transfer timing.
At end of each Operation Space. At end of each Special Activity (per space for Assassinate/Bribe). At end of each Event (never in the middle). Clean up Transfer mechanisms. Force current player to actively select Shipment before control swaps. Transfer all shipments of current player before swapping again. Captured Goods, Contraband, and Commandeer - steal shipments! Only Drug Bust / Captured Goods / Commandeer / Contraband if no option. If all guerrillas are dead in Drug Bust, or if no enemy guerrillas in the other cases. Auto-transfer to own faction if possible. Make Shipment removal optional. 4.5.3 Errata and new Shipment transfer code.
Diffstat (limited to 'play.js')
-rw-r--r--play.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/play.js b/play.js
index 0c8c176..9d855e5 100644
--- a/play.js
+++ b/play.js
@@ -1250,13 +1250,21 @@ function on_update() {
list.length = 0
for (let i = 0; i < 4; ++i) {
let shx = view.shipments[i]
+ let shf = shx & 3
if (shx === 0)
list.push(ui.shipments[i])
+ if (shf === 0)
+ ui.shipments[i].className = "token shipment"
+ else if (shf === FARC)
+ ui.shipments[i].className = "token shipment farc"
+ else if (shf === AUC)
+ ui.shipments[i].className = "token shipment auc"
+ else if (shf === CARTELS)
+ ui.shipments[i].className = "token shipment cartels"
if (view.actions && view.actions.shipment && set_has(view.actions.shipment, i))
ui.shipments[i].classList.add("action")
- else
- ui.shipments[i].classList.remove("action")
- ui.shipments[i].classList.toggle("selected", view.selected_shipment === i)
+ if (view.selected_shipment === i)
+ ui.shipments[i].classList.add("selected")
}
layout_available_bases(list, 1532, 1722, 2, 2, 89, 69)
@@ -1330,6 +1338,7 @@ function on_update() {
action_button("support", "Support")
action_button("opposition", "Opposition")
+ action_button("remove", "Remove")
action_button("roll", "Roll")
action_button("skip", "Skip")
action_button("next", "Next")