From 38e6f1157655d74ef879fbe2f80d9716f910093b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 11 Nov 2024 12:48:14 +0100 Subject: re-enter --- rules.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 4733b6b..30bee2f 100644 --- a/rules.js +++ b/rules.js @@ -645,6 +645,28 @@ function is_hostile_to_austria() { // TODO: simplify all these lists and stuff +function all_controlled_powers(pow) { + switch (coop_major_power(pow)) { + case P_FRANCE: + return all_powers_france_bavaria + case P_PRUSSIA: + if (is_saxony_prussian()) + return all_powers_prussia_saxony + return all_powers_prussia + case P_PRAGMATIC: + return all_powers_pragmatic + case P_AUSTRIA: + if (is_two_player() && !is_intro()) { + if (is_saxony_austrian()) + return all_powers_pragmatic_austria_saxony + return all_powers_pragmatic_austria + } + if (is_saxony_austrian()) + return all_powers_austria_saxony + return all_powers_austria + } +} + function all_controlled_pieces(pow) { switch (coop_major_power(pow)) { case P_FRANCE: -- cgit v1.2.3