From 2ead69d99d05c087e0ea4bbfdd99a8b76c9409b1 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 1 Nov 2024 18:23:51 +0100 Subject: Sort order of influence log messages. --- rules.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index de2aeaf..bb1fc72 100644 --- a/rules.js +++ b/rules.js @@ -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) -- cgit v1.2.3