From 07958fc43509c1210af598dd456024949e058f98 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 3 Jul 2023 02:25:54 +0200 Subject: Tweak final score. --- rules.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/rules.js b/rules.js index e60dde4..164f6da 100644 --- a/rules.js +++ b/rules.js @@ -4910,9 +4910,12 @@ function max_emperor_turns(cutoff) { function award_emperor_turns(amount, cutoff) { let x = max_emperor_turns(cutoff) if (x > 0) { - for (let p = 0; p < get_player_count(); ++p) - if (game.emperor_turns[p] === x) - award_legacy(p, "Emperor Turns", amount) + for (let p = 0; p < get_player_count(); ++p) { + if (game.emperor_turns[p] === x) { + logi(PLAYER_NAME[p] + " +" + amount + " Legacy") + game.legacy[p] += amount + } + } } return x } @@ -4942,23 +4945,16 @@ function goto_game_end() { game.crisis[4] = 0 log_h3("Emperor Turns") - game.current = game.first - do { - logi(game.emperor_turns[game.current] + " " + PLAYER_NAME[game.current]) - game.current = next_player() - } while (game.current !== game.first) - - log_br() let cutoff = award_emperor_turns(10, 1000) cutoff = award_emperor_turns(6, cutoff) cutoff = award_emperor_turns(3, cutoff) award_emperor_turns(0, cutoff) - log_h3("Final Legacy") + log_h3("Final Score") game.current = game.first do { - logi(game.legacy[game.current] + " " + PLAYER_NAME[game.current]) + logi(PLAYER_NAME[game.current] + " " + game.legacy[game.current]) game.current = next_player() } while (game.current !== game.first) -- cgit v1.2.3