diff --git a/android/assets/jsons/Civilizations.json b/android/assets/jsons/Civilizations.json index e9dff8de..d2a7e013 100644 --- a/android/assets/jsons/Civilizations.json +++ b/android/assets/jsons/Civilizations.json @@ -3,23 +3,25 @@ name:"Babylon", RGB:[220,20,60], cities:["Babylon","Akkad","Dur-Kurigalzu","Nippur","Borsippa","Sippar","Opis","Mari","Shushan","Eshnunna", - "Ellasar","Erech","Kutha","Sirpurla","Neribtum"] + "Ellasar","Erech","Kutha","Sirpurla","Neribtum"] }, { name:"Greece", RGB:[ 101, 153, 255], cities:["Athens","Sparta","Corinth","Argos","Knossos","Mycenae","Pharsalos","Ephesus","Halicarnassus","Rhodes", - "Eretria","Pergamon","Miletos","Megara","Phocaea"] + "Eretria","Pergamon","Miletos","Megara","Phocaea"] }, { name:"China", RGB:[ 9, 112, 84], - cities:["Beijing","Shanghai","Guangzhou","Nanjing","Xian","Chengdu","Hangzhou","Tianjin","Macau","Shandong"] + cities:["Beijing","Shanghai","Guangzhou","Nanjing","Xian","Chengdu","Hangzhou","Tianjin","Macau","Shandong", + "Kaifeng","Ningbo","Baoding","Yangzhou","Harbin"] }, { name:"Egypt", RGB:[ 255, 153, 0], - cities:["Thebes","Memphis","Heliopolis","Elephantine","Alexandria","Pi-Ramesses","Giza","Byblos","Akhetaten","Hieraconpolis"] + cities:["Thebes","Memphis","Heliopolis","Elephantine","Alexandria","Pi-Ramesses","Giza","Byblos","Akhetaten","Hieraconpolis", + "Abydos","Asyut","Avaris","Lisht","Buto"] }, { name:"Barbarians", diff --git a/core/src/com/unciv/logic/city/CityInfo.kt b/core/src/com/unciv/logic/city/CityInfo.kt index b2d458ee..628cca18 100644 --- a/core/src/com/unciv/logic/city/CityInfo.kt +++ b/core/src/com/unciv/logic/city/CityInfo.kt @@ -84,7 +84,10 @@ class CityInfo { this.civInfo = civInfo setTransients() - name = civInfo.getCivilization().cities[civInfo.cities.size] + // Since cities can be captures between civilizations, + // we need to check which other cities exist globally and name accordingly + val allExistingCityNames = civInfo.gameInfo.civilizations.flatMap { it.cities }.map { it.name }.toHashSet() + name = civInfo.getCivilization().cities.first { !allExistingCityNames.contains(it) } this.location = cityLocation civInfo.cities.add(this) if(civInfo == civInfo.gameInfo.getPlayerCivilization()) diff --git a/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt b/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt index 537561e5..a55a7e7e 100644 --- a/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt +++ b/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt @@ -66,10 +66,10 @@ class UnitTable(val worldScreen: WorldScreen) : Table(){ if(currentlyExecutingAction=="moveTo"){ if(selectedUnit!!.movementAlgs() - .getShortestPath(selectedUnit!!.getTile().position, selectedTile.position).isEmpty()) + .getShortestPath(selectedTile).isEmpty()) return // can't reach there with the selected unit, watcha want me to do? - val reachedTile = selectedUnit!!.headTowards(selectedTile.position) + val reachedTile = selectedUnit!!.movementAlgs().headTowards(selectedTile) if(reachedTile!=selectedTile) // Didn't get all the way there selectedUnit!!.action = "moveTo " + selectedTile.position.x.toInt() + "," + selectedTile.position.y.toInt()