mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-09 07:18:57 +07:00
Resolves #9703 - AI only buys tiles contiguous to the current city tiles (was: contiguous to civ tiles)
This commit is contained in:
@ -235,7 +235,7 @@
|
||||
"uniques": ["Nullifies all other stats this tile provides", "Doesn't generate naturally"],
|
||||
// For map editor only - the generator won't place it without code or enabling uniques
|
||||
// If the map generator is ever updated to always take these into account, it should also take the "Doesn't generate naturally" unique into account
|
||||
"occursOn": ["Grassland","Plains","Desert","Tundra","Snow","Forest","Jungle","Hill","Flood plains","Marsh","Oasis"]
|
||||
"occursOn": ["Grassland","Plains","Desert","Tundra","Snow","Forest","Jungle","Hill","Flood plains","Marsh","Oasis"],
|
||||
"defenceBonus": -0.15
|
||||
},
|
||||
{
|
||||
|
@ -236,7 +236,7 @@
|
||||
"uniques": ["Nullifies all other stats this tile provides", "Doesn't generate naturally"],
|
||||
// For map editor only - the generator won't place it without code or enabling uniques
|
||||
// If the map generator is ever updated to always take these into account, it should also take the "Doesn't generate naturally" unique into account
|
||||
"occursOn": ["Grassland","Plains","Desert","Tundra","Snow","Forest","Jungle","Hill","Flood plains","Marsh","Oasis"]
|
||||
"occursOn": ["Grassland","Plains","Desert","Tundra","Snow","Forest","Jungle","Hill","Flood plains","Marsh","Oasis"],
|
||||
"defenceBonus": -0.15
|
||||
},
|
||||
{
|
||||
|
@ -386,11 +386,11 @@ object NextTurnAutomation {
|
||||
}
|
||||
val bfs = BFS(cityWithLeastCostToBuy.getCenterTile())
|
||||
{
|
||||
it.getOwner() == null || it.getOwner() == civInfo
|
||||
it.getOwner() == null || it.owningCity == cityWithLeastCostToBuy
|
||||
}
|
||||
bfs.stepUntilDestination(highlyDesirableTile.key)
|
||||
val tilesThatNeedBuying =
|
||||
bfs.getPathTo(highlyDesirableTile.key).filter { it.getOwner() != civInfo }
|
||||
bfs.getPathTo(highlyDesirableTile.key).filter { it.getOwner() == null }
|
||||
.toList().reversed() // getPathTo is from destination to source
|
||||
|
||||
// We're trying to acquire everything and revert if it fails, because of the difficult
|
||||
|
Reference in New Issue
Block a user