summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-28 11:28:03 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-30 21:59:25 +0200
commit5bd0eda4db476f29fd8f29532f2f9135fb9bc295 (patch)
tree27906e950fc96164934e2737803a82b6156a7895 /rules.js
parent7f0bc6422715e637ec3b80f1426b3ae512298f4e (diff)
downloadfriedrich-5bd0eda4db476f29fd8f29532f2f9135fb9bc295.tar.gz
Allow "stop" before moving to flag lord as unmoved.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js23
1 files changed, 14 insertions, 9 deletions
diff --git a/rules.js b/rules.js
index c56e879..ea98774 100644
--- a/rules.js
+++ b/rules.js
@@ -1508,10 +1508,9 @@ states.move_supply_train = {
if (!has_any_piece(next))
gen_action_space(next)
- if (game.count > 0) {
+ if (game.count > 0)
gen_action_piece(who)
- view.actions.stop = 1
- }
+ view.actions.stop = 1
},
piece(_) {
this.stop()
@@ -1579,6 +1578,12 @@ states.move_general = {
view.actions.take = 1
if (s_give > 0 && u_take > 0)
view.actions.give = 1
+
+ if (forbid_stopping_at(here)) {
+ view.actions.stop = 0
+ } else {
+ view.actions.stop = 1
+ }
} else {
if (forbid_stopping_at(here)) {
view.actions.stop = 0
@@ -1760,12 +1765,6 @@ function can_re_enter_supply_train(s) {
function goto_recruit() {
game.count = 0
- // TODO: reveal too much if we skip recruitment phase?
- if (!can_recruit_anything()) {
- end_recruit()
- return
- }
-
game.recruit = {
pool: [],
used: [],
@@ -1774,6 +1773,12 @@ function goto_recruit() {
troops: 0,
}
+ // TODO: reveal too much if we skip recruitment phase?
+ if (!can_recruit_anything()) {
+ end_recruit()
+ return
+ }
+
// if all depots have enemy pieces, choose ONE city in given sector and COST is 8
if (has_available_depot())
game.state = "recruit"