If you raze your capital and you have another city, it becomes the new capital

This commit is contained in:
Yair Morgenstern 2018-06-12 21:21:35 +03:00
parent a380f7aa95
commit 0c71c39bc2

View file

@ -138,6 +138,8 @@ class CityInfo {
if(population.population==0){
civInfo.addNotification("$name has been razed to the ground!",location, Color.RED)
civInfo.cities.remove(this)
if(isCapital() && civInfo.cities.isNotEmpty()) // Yes, we actually razed the capital. Some people do this.
civInfo.cities.first().cityConstructions.builtBuildings.add("Palace")
}
}