From 577cfaf947980a7d11fbecdbc9feddb67b965c4a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 1 Nov 2023 15:53:54 +0100 Subject: Only show Airmobilize button when nothing selected in React/Flush states. --- rules.js | 11 ++++++----- 1 file 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() -- cgit v1.2.3