diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-01 18:23:51 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-01 18:23:51 +0100 |
commit | 2ead69d99d05c087e0ea4bbfdd99a8b76c9409b1 (patch) | |
tree | 3bdd96dc244d09314c3b379bf196e321dd14999e /rules.js | |
parent | 831f8f38ac8f3983db9a3f1900ccf7225366dac1 (diff) | |
download | maria-2ead69d99d05c087e0ea4bbfdd99a8b76c9409b1.tar.gz |
Sort order of influence log messages.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -4327,7 +4327,7 @@ function goto_determine_order_of_influence() { log("Order of influence") // Turn cards face-up (and turn bluff cards face down again) - for (let pow of POWER_FROM_POLITICAL_STAGE) { + for (let pow of all_major_powers) { for (let i = 0; i < game.face_down[pow].length;) { let c = game.face_down[pow][i] if (is_trump_card(c)) { @@ -4337,6 +4337,13 @@ function goto_determine_order_of_influence() { ++i } } + } + + // Reveal + let list = POWER_FROM_POLITICAL_STAGE.slice() + list.reverse() + list.sort((a,b) => count_influence(b) - count_influence(a)) + for (let pow of list) { if (game.face_down[pow].length > 0) log(">" + power_name[pow] + " " + format_card_list(game.face_down[pow]) + " (bluff)") if (game.face_up[pow].length > 0) |