summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-03-20 22:45:39 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commit1805573356a0ffe54a57d471cf834d0f9b8e7a1e (patch)
treee09f4fe74bffd4f69c0db7b79d5b51f17b5c4d61 /rules.js
parent19c86689d62ca0c2e03782bcd52cdeac653ef1d0 (diff)
downloadwilderness-war-1805573356a0ffe54a57d471cf834d0f9b8e7a1e.tar.gz
Don't drop off when no moves left.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js23
1 files 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) {