summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-12-16 16:56:25 +0100
committerTor Andersson <tor@ccxvii.net>2024-12-16 16:56:25 +0100
commit12acbf005b02e6f16c9a38b7467362145640ef88 (patch)
tree3a823e7defc5409a24ecb4decfe1381dc577e22f /rules.js
parent1ef0c4e999f9f994c8a7d00ddb42e5ce4b7de783 (diff)
downloadmaria-12acbf005b02e6f16c9a38b7467362145640ef88.tar.gz
Fix order of combat in mixed Austrian/Pragmatic stack.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js6
1 files changed, 5 insertions, 1 deletions
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])
}