diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-06-02 22:33:20 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:13:09 +0100 |
commit | ddbd067e6c7b0eabc14cda88943881a0b2dbf20e (patch) | |
tree | eb58383038e38b884fc6deea8834029d2460de42 /play.js | |
parent | ed285d6c4d588cc95574fcdb2e0c8b586965e881 (diff) | |
download | plantagenet-ddbd067e6c7b0eabc14cda88943881a0b2dbf20e.tar.gz |
card images
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -201,8 +201,7 @@ const routed_force_action_name = [ "routed_retinue", "routed_vassal", "routed_me const COIN = 1 const asset_type_count = 4 const asset_action_name = [ "prov", "coin", "cart", "ship" ] -const asset_type_x3 = [ 1, 1, 1, 0] - +const asset_type_x34 = [ 1, 1, 1, 0] const VASSAL_READY = 1 const VASSAL_MUSTERED = 2 @@ -983,11 +982,11 @@ function update_assets(id, parent, assets) { parent.replaceChildren() for (let i = 0; i < asset_type_count; ++i) { let n = pack4_get(assets, i) - while (n >= 4) { - add_asset(parent, i, 4, id) - n -= 4 - } - if (asset_type_x3[i]) { + if (asset_type_x34[i]) { + while (n >= 4) { + add_asset(parent, i, 4, id) + n -= 4 + } while (n >= 3) { add_asset(parent, i, 3, id) n -= 3 |