diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-04-29 20:46:48 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-04-29 20:46:48 +0200 |
commit | a8be7858609a0a5651869c4c9c8a24f9f4e7d6f9 (patch) | |
tree | cc88a7300b6d3d02ccfd6ddeb8c87121049c90ce /rules.ts | |
parent | 5619c922e3060da937edb0ec2b0ca626795b5778 (diff) | |
download | plantagenet-a8be7858609a0a5651869c4c9c8a24f9f4e7d6f9.tar.gz |
fix surprise landing (sail shouldn't "end command", but cost all actions)
Diffstat (limited to 'rules.ts')
-rw-r--r-- | rules.ts | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -3651,6 +3651,16 @@ function spend_march_action(cost) { game.actions -= cost } +function spend_sail_action() { + clear_flag(FLAG_SURPRISE_LANDING) + clear_flag(FLAG_FIRST_ACTION) + clear_flag(FLAG_FIRST_MARCH_HIGHWAY) + if (is_seamanship_in_play()) + game.actions -= 1 + else + game.actions = 0 +} + function spend_all_actions() { /* No more actions (including free ones)! */ clear_flag(FLAG_SURPRISE_LANDING) @@ -4212,10 +4222,7 @@ function do_sail(to: Locale) { levy_burgundians(lord) } - if (is_seamanship_in_play()) - spend_action(1) - else - spend_all_actions() + spend_sail_action() // you can go to enemy lord with norfolk capability if (is_seaport(to) && has_enemy_lord(to)) @@ -4225,10 +4232,7 @@ function do_sail(to: Locale) { } function fail_sail() { - if (is_seamanship_in_play()) - spend_action(1) - else - spend_all_actions() + spend_sail_action() end_sail() } |