diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-15 15:44:43 +0200 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-15 15:44:43 +0200 |
commit | 7d0d20488cb8587d94b7869ae048001385ab8873 (patch) | |
tree | e7529d443a2934f90f068e3019b95c23b3a2380e /rules.js | |
parent | ad22b59795da3c5f9ba4eb3d2279c824e071a8d2 (diff) | |
download | algeria-7d0d20488cb8587d94b7869ae048001385ab8873.tar.gz |
FLN deployment, shouldn't be able to deploy neutralized units
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -2194,20 +2194,19 @@ states.fln_deployment = { prompt() { view.prompt = "Deploy units to OPS in same area" if (game.selected.length === 0) { - for_each_friendly_unit_on_map(u => { + for_each_friendly_unit_on_map_box(UG, u => { let loc = unit_loc(u) - if (unit_box(u) === UG && !is_area_morocco_or_tunisia(loc) && !(game.deploy_cadre_france && is_area_france(loc))) + if (is_unit_not_neutralized(u) && !is_area_morocco_or_tunisia(loc) && !(game.deploy_cadre_france && is_area_france(loc))) gen_action_unit(u) }) } else { let first_unit = game.selected[0] let first_unit_loc = unit_loc(first_unit) - let first_unit_box = unit_box(first_unit) let first_unit_type = unit_type(first_unit) // Allow deselect && more units in same box - for_each_friendly_unit_in_loc(first_unit_loc, u => { - if (unit_box(u) === first_unit_box) { + for_each_friendly_unit_in_loc_box(first_unit_loc, UG, u => { + if (is_unit_not_neutralized(u)) { gen_action_unit(u) } }) |