diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-03-20 22:45:39 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | 1805573356a0ffe54a57d471cf834d0f9b8e7a1e (patch) | |
tree | e09f4fe74bffd4f69c0db7b79d5b51f17b5c4d61 | |
parent | 19c86689d62ca0c2e03782bcd52cdeac653ef1d0 (diff) | |
download | wilderness-war-1805573356a0ffe54a57d471cf834d0f9b8e7a1e.tar.gz |
Don't drop off when no moves left.
-rw-r--r-- | rules.js | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -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) { |