From 0d05fec47710c332ab45c1e546cc35743e474348 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 30 Jul 2022 12:30:35 +0200 Subject: Deploy in supplied hexes only. --- play.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 7df8968..685e280 100644 --- a/play.js +++ b/play.js @@ -180,12 +180,13 @@ function is_unit_fired(u) { } function is_unit_revealed(u) { + let reinf = hexdeploy + view.month if (player === AXIS) - return is_axis_unit(u) || set_has(view.revealed, u) + return is_axis_unit(u) || set_has(view.revealed, u) || unit_hex(u) > reinf else if (player === ALLIED) - return is_allied_unit(u) || set_has(view.revealed, u) + return is_allied_unit(u) || set_has(view.revealed, u) || unit_hex(u) > reinf else - return set_has(view.revealed, u) + return set_has(view.revealed, u) || unit_hex(u) > reinf } function is_unit_action(unit) { -- cgit v1.2.3