From 12acbf005b02e6f16c9a38b7467362145640ef88 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 16 Dec 2024 16:56:25 +0100 Subject: Fix order of combat in mixed Austrian/Pragmatic stack. --- rules.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 407da39..c4328ee 100644 --- a/rules.js +++ b/rules.js @@ -1267,6 +1267,10 @@ function get_supreme_commander(s) { return -1 } +function is_supreme_commander(p) { + return get_supreme_commander(game.pos[p]) === p +} + function is_mixed_stack(s) { let pow = -1 for (let p of all_generals) { @@ -3758,7 +3762,7 @@ function goto_combat() { continue if (piece_power[p] === P_SAXONY && is_saxony_neutral()) continue - if (is_piece_on_map(p)) + if (is_piece_on_map(p) && is_supreme_commander(p)) set_add(from, game.pos[p]) } -- cgit v1.2.3