summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-07-30 12:30:35 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:26 +0100
commit0d05fec47710c332ab45c1e546cc35743e474348 (patch)
treef1169169094f2bdb9003e67afba682e8f9d2a5e2 /play.js
parent27e1c173919d3d1506ced0350df576781dec491f (diff)
downloadrommel-in-the-desert-0d05fec47710c332ab45c1e546cc35743e474348.tar.gz
Deploy in supplied hexes only.
Diffstat (limited to 'play.js')
-rw-r--r--play.js7
1 files changed, 4 insertions, 3 deletions
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) {