summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-07-28 17:59:03 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-28 18:20:51 +0200
commitbf6c23cacda9cdec8f50996a63aa1e7d7d77e0e1 (patch)
treedf2850d3fc31d095b27b12c6c2f3c2a5e2e6567c
parent52da66148c4adae6f83e6e8baa62fdec6f776f9d (diff)
downloadtime-of-crisis-bf6c23cacda9cdec8f50996a63aa1e7d7d77e0e1.tar.gz
Fix entering capital directly with Force March.
-rw-r--r--about.html2
-rw-r--r--rules.js23
2 files changed, 14 insertions, 11 deletions
diff --git a/about.html b/about.html
index 883b006..942575e 100644
--- a/about.html
+++ b/about.html
@@ -13,7 +13,7 @@ Game Design by Wray Ferrell and Brad Johnson.
<p>
Copyright &copy; 2017
-<a href="https://www.gmtgames.com/p-704-time-of-crisis-2nd-printing.aspx">GMT Games, LLC</a>.
+<a href="https://www.gmtgames.com/p-1039-time-of-crisis-deluxe-edition.aspx">GMT Games, LLC</a>.
<br>
Cover art by Rodger B. MacGowan &copy; 2017.
diff --git a/rules.js b/rules.js
index 7af1777..20457fa 100644
--- a/rules.js
+++ b/rules.js
@@ -2220,7 +2220,7 @@ states.take_actions = {
if (get_general_location(game.selected_general) === AVAILABLE)
create_army(where, false)
else
- move_army_to(game.selected_general, where)
+ move_army_to(game.selected_general, where, false)
}
},
@@ -2229,8 +2229,9 @@ states.take_actions = {
if (get_general_location(game.selected_general) === AVAILABLE)
create_army(where, true)
else if (get_general_location(game.selected_general) !== where)
- move_army_to(game.selected_general, where)
- enter_capital()
+ move_army_to(game.selected_general, where, true)
+ else
+ enter_capital()
},
}
@@ -2883,12 +2884,11 @@ states.move_army_at_sea = {
},
region(to) {
push_undo()
- move_army_to(game.selected_general, to)
+ move_army_to(game.selected_general, to, false)
},
capital(to) {
push_undo()
- move_army_to(game.selected_general, to)
- enter_capital()
+ move_army_to(game.selected_general, to, true)
},
card(c) {
push_undo()
@@ -2897,7 +2897,7 @@ states.move_army_at_sea = {
},
}
-function move_army_to(who, to) {
+function move_army_to(who, to, to_capital) {
let from = get_general_location(who)
log("Move Army from %" + from + " to %" + to + ".")
@@ -2909,6 +2909,8 @@ function move_army_to(who, to) {
if (is_sea(to))
game.state = "move_army_at_sea"
+ else if (to_capital)
+ enter_capital()
else
resume_take_actions()
}
@@ -3542,14 +3544,15 @@ states.force_march = {
region(where) {
push_undo()
- move_army_to(game.selected_general, where)
+ move_army_to(game.selected_general, where, false)
},
capital(where) {
push_undo()
if (get_general_location(game.selected_general) !== where)
- move_army_to(game.selected_general, where)
- enter_capital()
+ move_army_to(game.selected_general, where, true)
+ else
+ enter_capital()
},
enter() {