summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-04-09 01:03:16 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:16 +0200
commite788ab90d5a4657277e98aa9676ae3bb0cfeb826 (patch)
treeeaee461814957dfbb84d7eba215e2b6304a4bb65
parentd136c83cffbba0dcb7f37e65909694767f4b5cab (diff)
downloadandean-abyss-e788ab90d5a4657277e98aa9676ae3bb0cfeb826.tar.gz
Fix Extra LimOp from shipping.
-rw-r--r--rules.js36
1 files changed, 31 insertions, 5 deletions
diff --git a/rules.js b/rules.js
index 58f15e3..b762d96 100644
--- a/rules.js
+++ b/rules.js
@@ -1,14 +1,11 @@
"use strict"
-// TODO: game.memory instead of president/aid/cylinder/resources/samper/pieces/
-
// TODO: rules material - reference 6.3.3 Drug Profits to 5.2.2 should be 4.5.3
+// TODO: game.memory instead of president/aid/cylinder/resources/samper/pieces/
// TODO: clean up init_free_operation and transitions
// OP in a space -> next() transition handler to deal with ops/events/elite-backing in a common way
-// TODO: game.op.free is not used - remove
-
const AUTOMATIC = true
let states = {}
@@ -2157,6 +2154,35 @@ states.eligible = {
pass: goto_pass,
}
+function goto_ship_limop() {
+ game.state = "ship_limop"
+ game.op = {
+ limited: 1,
+ free: 1,
+ ship: 0,
+ spaces: [],
+ pieces: [],
+ }
+ game.sa = 0
+}
+
+states.ship_limop = {
+ disable_negotiation: true,
+ inactive: "Extra Limited Operation",
+ prompt() {
+ view.prompt = "Extra Limited Operation."
+ gen_any_operation()
+ },
+ train: goto_train,
+ patrol: goto_patrol,
+ sweep: goto_sweep,
+ assault: goto_assault,
+ rally: goto_rally,
+ march: goto_march,
+ attack: goto_attack,
+ terror: goto_terror,
+}
+
function end_operation() {
if (game.op.ship && is_any_shipment_held()) {
push_undo()
@@ -2254,7 +2280,7 @@ function prompt_end_op(cost) {
else
view.prompt = game.op.type + ": All done."
}
- return (game.op.spaces.length > 0) ? 0 : 1
+ return (game.op.spaces.length > 0) ? 1 : 0
}
// OPERATION: TRAIN