From 5ed9a5912b519062d04c3dfe2063b4558f170682 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 9 Jun 2019 23:15:03 +0300 Subject: [PATCH] Resolved #856 - Cities created in your own territory get their own land and are no longer "ghost cities" --- core/src/com/unciv/logic/battle/Battle.kt | 2 +- core/src/com/unciv/logic/city/CityExpansionManager.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/battle/Battle.kt b/core/src/com/unciv/logic/battle/Battle.kt index 03edd9f327..dab5c92a67 100644 --- a/core/src/com/unciv/logic/battle/Battle.kt +++ b/core/src/com/unciv/logic/battle/Battle.kt @@ -239,7 +239,7 @@ class Battle(val gameInfo:GameInfo) { defender.takeDamage(100) return } // barbarians don't capture civilians! - + if (defender.getCivInfo().isDefeated()) {//Last settler captured defender.getCivInfo().destroy() attacker.getCivInfo().popupAlerts.add(PopupAlert(AlertType.Defeated,defender.getCivInfo().civName)) diff --git a/core/src/com/unciv/logic/city/CityExpansionManager.kt b/core/src/com/unciv/logic/city/CityExpansionManager.kt index 75c92aeea6..e4f20baca3 100644 --- a/core/src/com/unciv/logic/city/CityExpansionManager.kt +++ b/core/src/com/unciv/logic/city/CityExpansionManager.kt @@ -77,7 +77,7 @@ class CityExpansionManager { relinquishOwnership(tile) cityInfo.getCenterTile().getTilesInDistance(1) - .filter { it.getCity()==null } // can't take ownership of owned tiles + .filter { it.getCity()==null || it.getCity()!!.civInfo==cityInfo.civInfo } // can't take ownership of owned tiles .forEach { takeOwnership(it) } }