diff --git a/core/src/com/unciv/logic/map/TileMap.kt b/core/src/com/unciv/logic/map/TileMap.kt index c3400fa2d3..a2c6fcec99 100644 --- a/core/src/com/unciv/logic/map/TileMap.kt +++ b/core/src/com/unciv/logic/map/TileMap.kt @@ -144,7 +144,9 @@ class TileMap { var tryCount = 0 var potentialCandidates = getPassableNeighbours(currentTile) while (unitToPlaceTile == null && tryCount++ < 10) { - unitToPlaceTile = potentialCandidates.firstOrNull { unit.movement.canMoveTo(it) } + unitToPlaceTile = potentialCandidates + .sortedByDescending { if(unit.type.isLandUnit()) it.isLand else true } // Land units should prefer to go into land tiles + .firstOrNull { unit.movement.canMoveTo(it) } if (unitToPlaceTile != null) continue // if it's not found yet, let's check their neighbours val newPotentialCandidates = mutableSetOf()