diff --git a/core/src/com/unciv/logic/map/mapunit/UnitMovement.kt b/core/src/com/unciv/logic/map/mapunit/UnitMovement.kt index ac9e5a8f7f..a1a0508d4b 100644 --- a/core/src/com/unciv/logic/map/mapunit/UnitMovement.kt +++ b/core/src/com/unciv/logic/map/mapunit/UnitMovement.kt @@ -237,6 +237,7 @@ class UnitMovement(val unit: MapUnit) { val newTilesToCheck = ArrayList() var considerZoneOfControl = true // only for first distance! val visitedTiles: HashSet = hashSetOf(currentTile) + val civilization = unit.civ while (true) { if (distance == 2) { // only set this once after distance > 1 @@ -261,6 +262,9 @@ class UnitMovement(val unit: MapUnit) { // Avoid damaging terrain on first pass if (avoidDamagingTerrain && unit.getDamageFromTerrain(reachableTile) > 0) continue + // Avoid Enemy Territory if Civilian and Automated. For multi-turn pathing + if (unit.isCivilian() && unit.isAutomated() && reachableTile.isEnemyTerritory(civilization)) + continue if (reachableTile == destination) { val path = mutableListOf(destination) // Traverse the tree upwards to get the list of tiles leading to the destination