summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-09-28 15:01:15 +0200
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-09-28 15:01:15 +0200
commitb565ed66b562d97ecaa9617e7567d3534cde5de5 (patch)
tree982788b3973bac7b2ab865cb7a9da0e8ab2d1f18 /rules.js
parent81a5887cf147acf9e635a9e26aeacb9efb4c2aa4 (diff)
downloadalgeria-b565ed66b562d97ecaa9617e7567d3534cde5de5.tar.gz
update unit bits
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 700575a..0d9967b 100644
--- a/rules.js
+++ b/rules.js
@@ -106,7 +106,6 @@ function load_state(state) {
// === UNIT STATE ===
-// location (8 bits), op box (2 bits), dispersed (1 bit), airmobile (1 bit), neutralized (1 bit)
function apply_select(u) {
if (game.selected === u)
@@ -121,6 +120,8 @@ function pop_selected() {
return u
}
+// location (8 bits), op box (2 bits), dispersed (1 bit), airmobile (1 bit), neutralized (1 bit)
+
const UNIT_NEUTRALIZED_SHIFT = 0
const UNIT_NEUTRALIZED_MASK = 1 << UNIT_NEUTRALIZED_SHIFT
@@ -476,9 +477,9 @@ const SCENARIOS = {
function setup_units(where, list) {
let loc = locations[where]
- for (let u of list) {
- u = find_free_unit_by_type(u)
- set_unit_loc(u, loc)
+ for (let l of list) {
+ let u = find_free_unit_by_type(l)
+ set_unit_loc(u, DEPLOY)
set_unit_box(u, OC)
}
}