summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-01-24 22:42:34 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:12:42 +0100
commit4b4473049cd996f0c901002bd041d75fae4dac36 (patch)
treee0be81c3483e4b707081427a1b7154c3f1a9ca3b
parentd1dd9316d41cf86ccf4739355d88afd10ad27e05 (diff)
downloadshores-of-tripoli-4b4473049cd996f0c901002bd041d75fae4dac36.tar.gz
Count at most 4 sunk frigates for Tripolitan score.
-rw-r--r--rules.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 06445a9..4456bf4 100644
--- a/rules.js
+++ b/rules.js
@@ -2923,7 +2923,7 @@ exports.is_checkpoint = (a, b) => a.season !== b.season;
exports.view = function(state, current) {
game = state;
- let tr_score = count_american_frigates(TRIPOLITAN_SUPPLY) * 3 + game.tr.gold;
+ let tr_score = Math.min(count_american_frigates(TRIPOLITAN_SUPPLY), 4) * 3 + game.tr.gold;
let view = {
log: game.log,