summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-10-15 15:44:43 +0200
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-10-15 15:44:43 +0200
commit7d0d20488cb8587d94b7869ae048001385ab8873 (patch)
treee7529d443a2934f90f068e3019b95c23b3a2380e
parentad22b59795da3c5f9ba4eb3d2279c824e071a8d2 (diff)
downloadalgeria-7d0d20488cb8587d94b7869ae048001385ab8873.tar.gz
FLN deployment, shouldn't be able to deploy neutralized units
-rw-r--r--rules.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/rules.js b/rules.js
index 504a72e..dd7f88b 100644
--- a/rules.js
+++ b/rules.js
@@ -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)
}
})