summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-16 12:16:42 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:19:39 +0100
commit9ff6d22ddbd0e5690d5164694c9adf0158da893b (patch)
tree9b7358be0099c498fd3e7059f6ebb83976ca94ed
parent35089a2fc51cac2232ca4376037ec4ef2301da81 (diff)
downloadcrusader-rex-9ff6d22ddbd0e5690d5164694c9adf0158da893b.tar.gz
crusader: Fix bug with Richard's Sea legs second move.
-rw-r--r--rules.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 93df784..ba7a342 100644
--- a/rules.js
+++ b/rules.js
@@ -502,6 +502,9 @@ function is_contested_field(where) {
function is_friendly_or_vacant_field(where) {
return is_friendly_field(where) || is_vacant_town(where);
}
+function is_enemy_or_contested_field(where) {
+ return (count_enemy_in_field(where) > 0 || is_enemy_kingdom(where));
+}
/* Battle field queries exclude castles and reserves. */
function is_contested_battle_field() {
@@ -714,7 +717,7 @@ function can_use_richards_sea_legs(who, to) {
// English Crusaders may attack by sea.
// If combined with another attack, the English must be the Main Attacker.
if (is_english_crusader(who)) {
- if (is_enemy_field(to)) {
+ if (is_enemy_or_contested_field(to)) {
if (!game.attacker[to])
return true;
if (game.attacker[to] === FRANKS)