From 8850ae4c576d1141fcc57dc9699355247bc8c0c2 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 23 Jun 2024 14:46:47 +0200 Subject: Don't allow Prussia to capture in Bohemia after offensive option failed. --- rules.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rules.js') 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 -- cgit v1.2.3