diff --git a/core/src/com/unciv/logic/automation/UnitAutomation.kt b/core/src/com/unciv/logic/automation/UnitAutomation.kt index 763f8e3d..7c3d2ba8 100644 --- a/core/src/com/unciv/logic/automation/UnitAutomation.kt +++ b/core/src/com/unciv/logic/automation/UnitAutomation.kt @@ -10,6 +10,7 @@ import com.unciv.logic.civilization.diplomacy.DiplomaticStatus import com.unciv.logic.map.MapUnit import com.unciv.logic.map.TileInfo import com.unciv.models.gamebasics.GameBasics +import com.unciv.models.gamebasics.unit.UnitType import com.unciv.ui.worldscreen.unit.UnitAction import com.unciv.ui.worldscreen.unit.UnitActions @@ -373,8 +374,11 @@ class UnitAutomation{ } private fun chooseBombardTarget(city: CityInfo) : TileInfo? { - val targets = getBombardTargets(city) + var targets = getBombardTargets(city) if (targets.isEmpty()) return null + val siegeUnits = targets + .filter { Battle(city.civInfo.gameInfo).getMapCombatantOfTile(it)!!.getUnitType()==UnitType.Siege } + if(siegeUnits.any()) targets = siegeUnits return targets.minBy { Battle(city.civInfo.gameInfo).getMapCombatantOfTile(it)!!.getHealth() } } diff --git a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt index 059314aa..978416b6 100644 --- a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt @@ -52,8 +52,9 @@ class DiplomacyScreen:CameraStageBaseScreen() { private fun updateLeftSideTable() { leftSideTable.clear() val currentPlayerCiv = UnCivGame.Current.gameInfo.getCurrentPlayerCivilization() - for (civ in currentPlayerCiv.getKnownCivs() - .filterNot { it.isDefeated() || it.isBarbarianCivilization() }) { + for (civ in UnCivGame.Current.gameInfo.civilizations + .filterNot { it.isDefeated() || it.isPlayerCivilization() || it.isBarbarianCivilization() }) { + if (!currentPlayerCiv.knows(civ)) continue val civIndicator = ImageGetter.getNationIndicator(civ.getNation(),100f) diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index 48a3e51d..35750aaa 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -186,7 +186,7 @@ class WorldScreen : CameraStageBaseScreen() { private fun updateDiplomacyButton(civInfo: CivilizationInfo) { diplomacyButtonWrapper.clear() if(civInfo.getKnownCivs() - .filterNot { it.isDefeated() || it.isBarbarianCivilization() } + .filterNot { it.isDefeated() || it.isPlayerCivilization() || it.isBarbarianCivilization() } .any()) { displayTutorials("OtherCivEncountered") val btn = TextButton("Diplomacy".tr(), skin)