diff --git a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt index 386918a7e6..0a69c8164e 100644 --- a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt +++ b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt @@ -36,9 +36,9 @@ class UnitMovementAlgorithms(val unit:MapUnit) { for (neighbor in tileToCheck.neighbors) { var totalDistanceToTile:Float - if (neighbor.getOwner() != unit.civInfo - && neighbor.isCityCenter()) - totalDistanceToTile = unitMovement // Enemy city, can't move through it - we'll be "stuck" there + if ((neighbor.getOwner() != unit.civInfo && neighbor.isCityCenter())// Enemy city, + || neighbor.unit!=null && neighbor.unit!!.civInfo!=unit.civInfo) // Enemy unit + totalDistanceToTile = unitMovement // can't move through it - we'll be "stuck" there else { val distanceBetweenTiles = getMovementCostBetweenAdjacentTiles(tileToCheck, neighbor)