From 1805573356a0ffe54a57d471cf834d0f9b8e7a1e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 20 Mar 2022 22:45:39 +0100 Subject: Don't drop off when no moves left. --- rules.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/rules.js b/rules.js index 2b08e98..70ebdd8 100644 --- a/rules.js +++ b/rules.js @@ -2692,7 +2692,7 @@ function max_movement_cost(type) { case 'boat-or-land': case 'boat': return game.events.foul_weather ? 2 : 9; case 'land': return max_land_movement_cost(); - case 'naval': return 1; + case 'naval': return 9; } } @@ -2909,7 +2909,10 @@ function apply_move(to) { let who = moving_piece(); let from = moving_piece_space(); - game.move.used ++; + if (game.move.type === 'naval') + game.move.used = 9; + else + game.move.used ++; game.move.where = to; game.move.came_from = from; game.raid.from[to] = from; // remember where raiders came from so they can retreat after battle @@ -3067,14 +3070,16 @@ states.move = { gen_regular_move(); } - if (is_leader(who)) { - for_each_leader_in_force(who, p => { - if (p !== who && can_drop_off_leader(who, p)) + if (game.move.used < 9) { + if (is_leader(who)) { + for_each_leader_in_force(who, p => { + if (p !== who && can_drop_off_leader(who, p)) + gen_action_piece(p); + }); + for_each_unit_in_force(who, p => { gen_action_piece(p); - }); - for_each_unit_in_force(who, p => { - gen_action_piece(p); - }); + }); + } } }, play_event(card) { -- cgit v1.2.3