summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-01-17 12:22:20 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:12:42 +0100
commit326fc7127cf2daf6f5dfee4abad1e736e6cf3828 (patch)
tree225a3ea46a7f569becb460a6bbdb02791ffecf5b
parentf4b137950b455b568baaeb42e83465b688d1df80 (diff)
downloadshores-of-tripoli-326fc7127cf2daf6f5dfee4abad1e736e6cf3828.tar.gz
Send damaged frigates home BEFORE naval bombardment!
-rw-r--r--play.js2
-rw-r--r--rules.js7
2 files changed, 7 insertions, 2 deletions
diff --git a/play.js b/play.js
index ec881e9..277145e 100644
--- a/play.js
+++ b/play.js
@@ -388,7 +388,7 @@ function layout_space(location, s, x0, y0, size) {
}
function update_pieces() {
- layout_space(view.location, UNITED_STATES_SUPPLY, 1933, 180, 6);
+ layout_space(view.location, UNITED_STATES_SUPPLY, 1933, 180, 5);
layout_space(view.location, TRIPOLITAN_SUPPLY, 2195, 180, 6);
layout_space(view.location, TRACK_1801, YEAR_X[1801], 625, 2);
diff --git a/rules.js b/rules.js
index 280e373..4caccf5 100644
--- a/rules.js
+++ b/rules.js
@@ -1422,7 +1422,7 @@ states.allocate_tr_hits = {
}
function move_damaged_frigate_to_year_track(p, supply) {
- if (game.year === 1806)
+ if (game.year === 1806 || game.active_card === ASSAULT_ON_TRIPOLI)
game.location[p] = supply;
else
game.location[p] = YEAR_TURN_TRACK[game.year + 1];
@@ -1457,6 +1457,11 @@ function resume_naval_battle() {
log("The Tripolitan fleet has been eliminated.");
move_all_pieces(US_MARINES, BENGHAZI, TRIPOLI);
move_all_pieces(AR_INFANTRY, BENGHAZI, TRIPOLI);
+
+ game.summary = [];
+ remove_damaged_frigates();
+ flush_summary("Ships damaged:", true)
+
if (is_naval_bombardment_location(game.where)) {
naval_bombardment_round();
game.state = 'land_battle_bombardment_results';