summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-02 22:07:12 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:27 +0100
commit064a1f0ec4d7859a378b36c7f6b5cdb05d4a1982 (patch)
treea9e49c3fa1f399f85756169f93e163e53edb5536
parent134fc1af7665829244da1a1cdaa93fe2b6b49448 (diff)
downloadrommel-in-the-desert-064a1f0ec4d7859a378b36c7f6b5cdb05d4a1982.tar.gz
Highlight movement destination hex when selecting hexside.
-rw-r--r--play.js2
-rw-r--r--rules.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/play.js b/play.js
index a200363..a87abbb 100644
--- a/play.js
+++ b/play.js
@@ -240,7 +240,7 @@ function is_side_allied_supply_line(side) {
function is_hex_selected(hex) {
if (hex === view.pursuit || hex === view.battle)
return true
- return set_has(view.selected_hexes, hex)
+ return hex === view.selected_hexes || set_has(view.selected_hexes, hex)
}
function is_setup_hex(hex) {
diff --git a/rules.js b/rules.js
index ac40bde..19f9451 100644
--- a/rules.js
+++ b/rules.js
@@ -3627,6 +3627,7 @@ states.forced_march_via = {
prompt() {
view.prompt = `Move: Select which path to take.`
view.selected = game.hexside.who
+ view.selected_hexes = game.hexside.to
// view.path = {}
@@ -3658,6 +3659,7 @@ states.engage_via = {
prompt() {
view.prompt = `Move: Select which hex side to cross.`
view.selected = game.hexside.who
+ view.selected_hexes = game.hexside.to
// view.path = {}