summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-04-18 22:59:57 +0200
committerTor Andersson <tor@ccxvii.net>2023-04-18 23:06:23 +0200
commit27cb526ceaf0110780be38d90cb8817f250c38bc (patch)
tree6de72ae86757237534c0bff4d90c1c2a9134a621
parenteb661ba821233b390614975631450c36b3b8a41e (diff)
downloadwilderness-war-27cb526ceaf0110780be38d90cb8817f250c38bc.tar.gz
Fix typo in "LB Squadrons" event check.
Also check if LB/Halifax activation is possible with Campaign card.
-rw-r--r--rules.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 005e6e1..235dcaf 100644
--- a/rules.js
+++ b/rules.js
@@ -2417,7 +2417,7 @@ function can_activate_force(who) {
// If at Halifax or Louisbourg ...
if (where === HALIFAX || where === LOUISBOURG) {
// must be able to Naval move
- if (game.activation_value === 3)
+ if (game.activation_value === 3 && !(game.active === FRANCE && game.events.no_fr_naval))
return true
// or Siege/Assault
if (can_siege_or_assault_if_activated(who, where))
@@ -2453,7 +2453,8 @@ states.select_campaign_1 = {
for (let p = first_friendly_leader; p <= last_friendly_leader; ++p) {
if (is_piece_on_map(p))
if (!game.activation.includes(p))
- gen_action_piece(p)
+ if (can_activate_force(p))
+ gen_action_piece(p)
}
},
piece(p) {
@@ -2473,7 +2474,8 @@ states.select_campaign_2 = {
for (let p = first_friendly_leader; p <= last_friendly_leader; ++p) {
if (is_piece_on_map(p) && !is_piece_in_force(p, game.activation[0]))
if (!game.activation.includes(p))
- gen_action_piece(p)
+ if (can_activate_force(p))
+ gen_action_piece(p)
}
},
piece(p) {
@@ -2899,7 +2901,7 @@ function goto_break_siege() {
function piece_can_naval_move_from(who, from) {
if (game.events.foul_weather)
return false
- if (game.active === FRANCE && game.no_fr_naval)
+ if (game.active === FRANCE && game.events.no_fr_naval)
return false
if (is_leader(who) && count_pieces_in_force(who) > 1)
if (game.activation_value < 3)