From 047b837cbd4893258fcdb2ed5c30f1e982f66e54 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 27 Mar 2022 13:40:07 +0200 Subject: Campaign can activate lone leaders. --- rules.js | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/rules.js b/rules.js index 3d87f44..c4d3172 100644 --- a/rules.js +++ b/rules.js @@ -2521,20 +2521,27 @@ states.designate_force = { if (can_pick_up) gen_action('pick_up_all'); - // Must be a force to proceed (leader + at least one unit) - if (count_units_in_force(commander) > 0) { - switch (game.force.reason) { - default: + switch (game.force.reason) { + case 'campaign_1': + case 'campaign_2': + // Campaign can activate lone leaders as well as forces. + gen_action_next(); + break; + case 'move': + // Must be a force to proceed (leader + at least one unit) + if (count_units_in_force(commander) > 0) gen_action_next(); - break; - case 'intercept': + break; + case 'intercept': + // Must be a force to proceed (leader + at least one unit) + if (count_units_in_force(commander) > 0) gen_action('intercept'); - break; - case 'avoid': + break; + case 'avoid': + // Must be a force to proceed (leader + at least one unit) + if (count_units_in_force(commander) > 0) gen_action('avoid'); - attempt_avoid_battle(); - break; - } + break; } }, -- cgit v1.2.3