summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-08 16:49:14 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:19:39 +0100
commitf1686ff9b2d101975c51e153412c969288073df9 (patch)
treef90ca5fa6c33d3653e29037b9ad1a9cd638e64c5 /rules.js
parent9e622157694a74ccd9abe3b5b34897a90cf2fabc (diff)
downloadcrusader-rex-f1686ff9b2d101975c51e153412c969288073df9.tar.gz
crusader: Fix Germans being allowed to move too soon.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/rules.js b/rules.js
index d64e1ed..c31c65a 100644
--- a/rules.js
+++ b/rules.js
@@ -39,6 +39,7 @@ const INTRIGUE = 3;
const WINTER_CAMPAIGN = 6;
const ENGLISH_CRUSADERS = [ "Richard", "Robert", "Crossbows" ];
+const GERMAN_CRUSADERS = [ "Barbarossa", "Frederik", "Leopold" ];
const FRENCH_CRUSADERS = [ "Philippe", "Hugues", "Fileps" ];
const SALADIN_FAMILY = [ "Saladin", "Al Adil", "Al Aziz", "Al Afdal", "Al Zahir" ];
@@ -672,14 +673,16 @@ function can_germans_move(who) {
}
function can_germans_move_to(who, to) {
- if (is_winter() && is_enemy_occupied_town(to))
- return false;
- if (to === ALEPPO)
- return true;
- if (to === ANTIOCH)
- return true;
- if (to === ST_SIMEON)
- return road_limit(GERMANIA, ST_SIMEON) < 2;
+ if (are_crusaders_not_in_pool(GERMAN_CRUSADERS)) {
+ if (is_winter() && is_enemy_occupied_town(to))
+ return false;
+ if (to === ALEPPO)
+ return true;
+ if (to === ANTIOCH)
+ return true;
+ if (to === ST_SIMEON)
+ return road_limit(GERMANIA, ST_SIMEON) < 2;
+ }
return false;
}