summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-06-23 14:46:47 +0200
committerTor Andersson <tor@ccxvii.net>2024-06-23 14:46:47 +0200
commit8850ae4c576d1141fcc57dc9699355247bc8c0c2 (patch)
tree3660e7f97dd59d4293fb2c1e10efa6fe448635f1
parent2130e4b6486bf7dff444a954241e07535d221071 (diff)
downloadfriedrich-8850ae4c576d1141fcc57dc9699355247bc8c0c2.tar.gz
Don't allow Prussia to capture in Bohemia after offensive option failed.
-rw-r--r--rules.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index b94ca28..db07810 100644
--- a/rules.js
+++ b/rules.js
@@ -427,7 +427,7 @@ make_protect(P_AUSTRIA, data.country.Austria)
function is_conquest_space(pow, s) {
if (pow === P_PRUSSIA && game.scenario >= 3) {
- if (is_offensive_option() || game.turn < 3)
+ if (is_offensive_option_active() || game.turn < 3)
return set_has(primary_objective[pow], s)
return false
}
@@ -548,6 +548,10 @@ function has_offensive_option_failed() {
return game.oo < 0 && (set_has(game.fate, FC_POEMS) || set_has(game.fate, FC_LORD_BUTE))
}
+function is_offensive_option_active() {
+ return (!!game.oo && !has_offensive_option_failed())
+}
+
function has_power_dropped_out(pow) {
if (game.scenario === 1)
return pow !== P_PRUSSIA && pow !== P_HANOVER && pow !== P_FRANCE