diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-09-28 15:01:15 +0200 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-09-28 15:01:15 +0200 |
commit | b565ed66b562d97ecaa9617e7567d3534cde5de5 (patch) | |
tree | 982788b3973bac7b2ab865cb7a9da0e8ab2d1f18 /rules.js | |
parent | 81a5887cf147acf9e635a9e26aeacb9efb4c2aa4 (diff) | |
download | algeria-b565ed66b562d97ecaa9617e7567d3534cde5de5.tar.gz |
update unit bits
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) } } |