diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-09-15 00:56:47 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-09-15 00:57:06 +0200 |
commit | 07bfab1d9f1b66aa4f8a0010cfda2c5324b86609 (patch) | |
tree | 44285c60306cfb7e71a922a099c0d466287b4684 /rules.js | |
parent | 0a1193a08ac28c3df4614a469b795acbee55f91c (diff) | |
download | wilderness-war-07bfab1d9f1b66aa4f8a0010cfda2c5324b86609.tar.gz |
Prompt for "Siege" even if impossible.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -2859,7 +2859,7 @@ function goto_move_piece(who) { } function start_move() { - if (can_moving_force_siege_or_assault()) { + if (has_besieged_enemy_fortifications(moving_piece_space())) { game.state = 'siege_or_move' } else if (is_piece_inside(moving_piece())) { goto_break_siege() @@ -2876,17 +2876,22 @@ states.siege_or_move = { let where = moving_piece_space() view.who = moving_piece() view.where = where - if (is_assault_possible(where)) { - if (player.hand.includes(SURRENDER)) { - view.prompt = `You may assault at ${space_name(where)}, play "Surrender!", or move.` - gen_action('play_event', SURRENDER) + if (can_moving_force_siege_or_assault()) { + if (is_assault_possible(where)) { + if (player.hand.includes(SURRENDER)) { + view.prompt = `You may assault at ${space_name(where)}, play "Surrender!", or move.` + gen_action('play_event', SURRENDER) + } else { + view.prompt = `You may assault at ${space_name(where)} or move.` + } + view.actions.assault = 1 } else { - view.prompt = `You may assault at ${space_name(where)} or move.` + view.prompt = `You may siege at ${space_name(where)} or move.` + view.actions.siege = 1 } - view.actions.assault = 1 } else { - view.prompt = `You may siege at ${space_name(where)} or move.` - view.actions.siege = 1 + view.prompt = `You may move from ${space_name(where)}.` + view.actions.siege = 0 } view.actions.move = 1 }, |