summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-11-01 15:53:54 +0100
committerTor Andersson <tor@ccxvii.net>2023-11-01 16:06:38 +0100
commit577cfaf947980a7d11fbecdbc9feddb67b965c4a (patch)
tree7cb768a3e79d775088a4a061d731ce3fb2822a5a
parent622f0212c073ced29eea6cf5139e9872a57fdecc (diff)
downloadalgeria-577cfaf947980a7d11fbecdbc9feddb67b965c4a.tar.gz
Only show Airmobilize button when nothing selected in React/Flush states.
-rw-r--r--rules.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/rules.js b/rules.js
index 867e569..66dc447 100644
--- a/rules.js
+++ b/rules.js
@@ -3989,6 +3989,9 @@ states.gov_flush_select_units = {
gen_action_unit(u)
}
})
+
+ if (game.helo_avail && can_airmobilize_any_unit())
+ gen_action("airmobilize")
} else {
let first_unit = game.selected[0]
@@ -4021,9 +4024,6 @@ states.gov_flush_select_units = {
gen_action("roll")
}
-
- if (game.helo_avail && can_airmobilize_any_unit())
- gen_action("airmobilize")
},
airmobilize() {
push_undo()
@@ -4186,6 +4186,9 @@ states.gov_react = {
}
})
+ if (game.helo_avail && can_airmobilize_any_unit())
+ gen_action("airmobilize")
+
gen_action("no_react")
} else {
let first_unit = game.selected[0]
@@ -4220,8 +4223,6 @@ states.gov_react = {
gen_action("roll")
}
- if (game.helo_avail && can_airmobilize_any_unit())
- gen_action("airmobilize")
},
airmobilize() {
push_undo()