From b3e00a79443c99db0108e4f2b877e3d95344c666 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Mon, 16 Sep 2024 04:07:39 +0300 Subject: [PATCH] Resolved #12213 - escorted unit cannot move if its escort cannot move --- core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt b/core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt index 32bf71a152..26808a0f43 100644 --- a/core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt +++ b/core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt @@ -43,6 +43,8 @@ class UnitMovement(val unit: MapUnit) { // If I can't move my only option is to stay... if (unitMovement == 0f || unit.cache.cannotMove) return distanceToTiles + // If our escort can't move, ditto + if (includeOtherEscortUnit && unit.getOtherEscortUnit()?.currentMovement == 0f) return distanceToTiles var tilesToCheck = listOf(unitTile)