diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-14 12:34:03 +0200 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-14 12:34:03 +0200 |
commit | 097e1c82d653de44702e924c71cd354de3fdb07a (patch) | |
tree | 168c86321f3f12a70c8fc21ae79f8fafb68491be /rules.js | |
parent | 036cf9cae2c5179caf7ea929113b3a1c599f9080 (diff) | |
download | algeria-097e1c82d653de44702e924c71cd354de3fdb07a.tar.gz |
quick setup dirty flag. dont allow shuffle to same area on deployment
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1246,7 +1246,7 @@ states.scenario_setup = { }) if (current_player_quick_setup()) { - gen_action("quick_setup") + view.actions.quick_setup = !game.quick_setup } } else { // subsequent units must be on the same map location (or also on DEPLOY) @@ -1274,7 +1274,8 @@ states.scenario_setup = { let first_unit_zone = area_zone(first_unit_loc) for_each_map_area_in_zone(first_unit_zone, loc => { - gen_action_loc(loc) + if (loc !== first_unit_loc) + gen_action_loc(loc) }) } } @@ -1290,6 +1291,7 @@ states.scenario_setup = { log("Loading quick setup") let deployment = current_player_quick_setup() setup_units(deployment) + game.quick_setup = true }, unit(u) { set_toggle(game.selected, u) @@ -1307,6 +1309,7 @@ states.scenario_setup = { for (let u of list) { deploy_unit(u, to) } + delete game.quick_setup }, end_deployment() { log(`Deployed`) @@ -1317,6 +1320,7 @@ states.scenario_setup = { log(`>${game.summary[x]} at A${x}`) } game.summary = null + delete game.quick_setup end_scenario_setup() } |