summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-11-09 18:31:54 +0100
committerTor Andersson <tor@ccxvii.net>2023-11-09 18:31:54 +0100
commitb854c11cedaa43a3768e03a3f680e43b97905246 (patch)
tree053507c8544bed2f0ca9cbcd53e4db16f134ab7f
parente1feee5111f740023e00a72b8cec4c3bfc882e4e (diff)
downloadnevsky-b854c11cedaa43a3768e03a3f680e43b97905246.tar.gz
Vodian Treachery -- don't allow conquering conquered forts.
-rw-r--r--rules.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 6db7903..cb00bc0 100644
--- a/rules.js
+++ b/rules.js
@@ -2739,9 +2739,13 @@ states.pogost = {
}
function can_play_vodian_treachery() {
- if (is_fort(LOC_KAIBOLOVO) && is_teuton_closer_than_russian(LOC_KAIBOLOVO))
+ if (is_fort(LOC_KAIBOLOVO) &&
+ !has_conquered_marker(LOC_KAIBOLOVO) &&
+ is_teuton_closer_than_russian(LOC_KAIBOLOVO))
return true
- if (is_fort(LOC_KOPORYE) && is_teuton_closer_than_russian(LOC_KOPORYE))
+ if (is_fort(LOC_KOPORYE) &&
+ !has_conquered_marker(LOC_KOPORYE) &&
+ is_teuton_closer_than_russian(LOC_KOPORYE))
return true
return false
}
@@ -2766,9 +2770,9 @@ states.vodian_treachery = {
inactive: "Vodian Treachery",
prompt() {
view.prompt = "Vodian Treachery: Conquer Kaibolovo or Koporye Fort."
- if (is_fort(LOC_KAIBOLOVO) && is_teuton_closer_than_russian(LOC_KAIBOLOVO))
+ if (is_fort(LOC_KAIBOLOVO) && !has_conquered_marker(LOC_KAIBOLOVO) && is_teuton_closer_than_russian(LOC_KAIBOLOVO))
gen_action_locale(LOC_KAIBOLOVO)
- if (is_fort(LOC_KOPORYE) && is_teuton_closer_than_russian(LOC_KOPORYE))
+ if (is_fort(LOC_KOPORYE) && !has_conquered_marker(LOC_KOPORYE) && is_teuton_closer_than_russian(LOC_KOPORYE))
gen_action_locale(LOC_KOPORYE)
},
locale(loc) {