From b565ed66b562d97ecaa9617e7567d3534cde5de5 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Thu, 28 Sep 2023 15:01:15 +0200 Subject: update unit bits --- rules.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'rules.js') 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) } } -- cgit v1.2.3