summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--create.html2
-rw-r--r--rules.js10
2 files changed, 9 insertions, 3 deletions
diff --git a/create.html b/create.html
index 6d9c428..c00e40d 100644
--- a/create.html
+++ b/create.html
@@ -2,7 +2,7 @@
<dt>
<i>Standard</i>
<dd>
-Rules as written. US score is 25 minus Tripolitan score.
+Rules as written. US score is 24 minus Tripolitan score.
<dd>
<dt>
<i>Fortress Tripoli</i>
diff --git a/rules.js b/rules.js
index 891edb8..0042f64 100644
--- a/rules.js
+++ b/rules.js
@@ -2771,11 +2771,16 @@ function check_frigate_victory() {
return false;
}
+function calculate_tr_score() {
+ return Math.min(count_american_frigates(TRIPOLITAN_SUPPLY), 4) * 3 + game.tr.gold;
+}
+
function goto_game_over(result, message) {
game.where = null;
game.state = 'game_over';
game.active = "None";
game.result = result;
+ game.score = calculate_tr_score();
if (result === TR)
game.victory = "Tripolitan victory:\n" + message;
else if (result === US)
@@ -2925,7 +2930,8 @@ exports.is_checkpoint = (a, b) => a.season !== b.season;
exports.view = function(state, current) {
game = state;
- let tr_score = Math.min(count_american_frigates(TRIPOLITAN_SUPPLY), 4) * 3 + game.tr.gold;
+ let tr_score = calculate_tr_score();
+ let us_score = 24 - tr_score;
let view = {
log: game.log,
@@ -2949,7 +2955,7 @@ exports.view = function(state, current) {
draw: game.us.draw.length,
discard: game.us.discard.length + (game.us.queue ? game.us.queue.length : 0),
hand: game.us.hand.length,
- score: 25 - tr_score,
+ score: us_score,
},
card: game.active_card,
where: game.where,