From 064a1f0ec4d7859a378b36c7f6b5cdb05d4a1982 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 2 Sep 2022 22:07:12 +0200 Subject: Highlight movement destination hex when selecting hexside. --- play.js | 2 +- rules.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 = {} -- cgit v1.2.3