diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-02-19 19:22:23 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | 5827796cad5ac1cae00dad04cab06292dd9b5ed9 (patch) | |
tree | ee8fe9121ad824e745ad0bf36262ec27a2fbef6d | |
parent | 803b8b0ebf44508abfd0ae19312a1bec62919c50 (diff) | |
download | wilderness-war-5827796cad5ac1cae00dad04cab06292dd9b5ed9.tar.gz |
Supply from amphib. Surrender! instead of assault.
-rw-r--r-- | rules.js | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -23,6 +23,7 @@ // UI: show discard/removed card list in UI // UI: show pool leaders in their own box // UI: show dead leaders as grayed out in own box +// UI: siege marker on top of besieged stack in fortresses // MAJOR // TODO: find closest path to non-infiltration space for allowing infiltration @@ -1903,6 +1904,8 @@ states.debug_supply = { } function is_in_supply(space) { + if (game.active === BRITAIN && has_amphib(space)) + return true; if (!supply_cache) search_supply_spaces(); if (supply_cache.includes(space)) @@ -2595,8 +2598,12 @@ states.siege_or_move = { prompt() { let where = moving_piece_space(); if (is_assault_possible(where)) { - // TODO: RESPONSE - Surrender! allow siege here too to allow surrender event? - view.prompt = `You may assault at ${space_name(where)} or move.`; + if (player.hand.includes(SURRENDER)) { + view.prompt = `You may assault ${space_name(where)}, play "Surrender!", or move.`; + gen_action('play_event', SURRENDER); + } else { + view.prompt = `You may assault at ${space_name(where)} or move.`; + } gen_action('assault'); } else { view.prompt = `You may siege at ${space_name(where)} or move.`; @@ -2610,6 +2617,11 @@ states.siege_or_move = { assault() { goto_assault(moving_piece_space()); }, + play_event(c) { + game.siege_where = moving_piece_space(); + play_card(c); + goto_surrender(); + }, move() { resume_move(); }, @@ -5124,7 +5136,7 @@ states.assault_possible = { let where = game.assault_possible; delete game.assault_possible; log("Does not assault " + space_name(where)); - end_move_step(); + end_move_step(true); }, } |