summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-12 00:36:07 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-12 00:36:07 +0100
commitbedb302c774a3318319524fe2aa6160dc62496e5 (patch)
tree59979d2275960efbcc82483f1320946595e9c6d6
parent9eea52a1a3ef99d7cf5ac1ca2ea10ac2f1fed7e4 (diff)
downloadmaria-bedb302c774a3318319524fe2aa6160dc62496e5.tar.gz
Don't shifting saxony when it's capped.
-rw-r--r--rules.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 194a38c..599c4d7 100644
--- a/rules.js
+++ b/rules.js
@@ -2275,6 +2275,7 @@ states.supply_done = {
function end_supply() {
if (game.count > 0 && should_saxony_shift_after_supply(coop_major_power(game.power))) {
+ set_active_to_power(P_AUSTRIA)
game.state = "saxony_shift_supply"
return
}
@@ -5043,13 +5044,17 @@ function should_shift_saxony_after_battle(n) {
if (is_two_player() && game.loser_power === P_FRANCE && is_bohemia_space(game.attacker))
return true
}
+ return false
}
function should_saxony_shift_after_supply(pow) {
- if (pow === P_PRUSSIA)
- return true
- if (is_two_player() && pow === P_FRANCE)
- return true
+ if (game.saxony < 5) {
+ if (pow === P_PRUSSIA)
+ return true
+ if (is_two_player() && pow === P_FRANCE)
+ return true
+ }
+ return false
}
states.saxony_shift_battle = {