diff --git a/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt b/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt index dbd7d096d5..68ef24763e 100644 --- a/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt +++ b/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt @@ -391,6 +391,7 @@ object NextTurnAutomation { bfs.stepUntilDestination(highlyDesirableTile.key) val tilesThatNeedBuying = bfs.getPathTo(highlyDesirableTile.key).filter { it.getOwner() != civInfo } + .toList().reversed() // getPathTo is from destination to source // We're trying to acquire everything and revert if it fails, because of the difficult // way how tile acquisition cost is calculated. Everytime you buy a tile, the next one diff --git a/core/src/com/unciv/logic/city/managers/CityExpansionManager.kt b/core/src/com/unciv/logic/city/managers/CityExpansionManager.kt index f7cc8e9ef1..deb6ab21e7 100644 --- a/core/src/com/unciv/logic/city/managers/CityExpansionManager.kt +++ b/core/src/com/unciv/logic/city/managers/CityExpansionManager.kt @@ -68,6 +68,10 @@ class CityExpansionManager : IsPartOfGameInfoSerialization { fun buyTile(tile: Tile) { val goldCost = getGoldCostOfTile(tile) + class TriedToBuyNonContiguousTileException:Exception() + if (tile.neighbors.none { it.getCity() == city }) + throw TriedToBuyNonContiguousTileException() + class NotEnoughGoldToBuyTileException : Exception() if (city.civ.gold < goldCost && !city.civ.gameInfo.gameParameters.godMode) throw NotEnoughGoldToBuyTileException()