mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-16 10:49:17 +07:00
4.6.14-patch1
Fix AI automation preventing settlers from moving
This commit is contained in:
@ -145,8 +145,6 @@ object SpecificUnitAutomation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unit.getDamageFromTerrain() < unit.health) return // Also make sure we won't die waiting
|
|
||||||
|
|
||||||
// It's possible that we'll see a tile "over the sea" that's better than the tiles close by, but that's not a reason to abandon the close tiles!
|
// It's possible that we'll see a tile "over the sea" that's better than the tiles close by, but that's not a reason to abandon the close tiles!
|
||||||
// Also this lead to some routing problems, see https://github.com/yairm210/Unciv/issues/3653
|
// Also this lead to some routing problems, see https://github.com/yairm210/Unciv/issues/3653
|
||||||
val bestCityLocation: Tile? =
|
val bestCityLocation: Tile? =
|
||||||
|
@ -242,6 +242,7 @@ object UnitAutomation {
|
|||||||
.mapNotNull { it.militaryUnit }
|
.mapNotNull { it.militaryUnit }
|
||||||
.filter { it.civ.isAtWarWith(unit.civ) }
|
.filter { it.civ.isAtWarWith(unit.civ) }
|
||||||
.flatMap { it.movement.getReachableTilesInCurrentTurn() }
|
.flatMap { it.movement.getReachableTilesInCurrentTurn() }
|
||||||
|
.filter { it.militaryUnit?.civ != unit.civ }
|
||||||
.toSet()
|
.toSet()
|
||||||
|
|
||||||
if (unit.hasUnique(UniqueType.FoundCity))
|
if (unit.hasUnique(UniqueType.FoundCity))
|
||||||
|
Reference in New Issue
Block a user