Civ is properly destroyed when liberating the last city of the civ

This commit is contained in:
Yair Morgenstern 2020-07-05 23:03:28 +03:00
parent 75c6ab8acb
commit 1b7b9bfcd5

View File

@ -392,7 +392,6 @@ class CityInfo {
moveToCiv(conqueringCiv)
Battle.destroyIfDefeated(oldCiv, conqueringCiv)
if(population.population>1) population.population -= 1 + population.population/4 // so from 2-4 population, remove 1, from 5-8, remove 2, etc.
reassignPopulation()
@ -439,13 +438,15 @@ class CityInfo {
}
val oldCiv = civInfo
diplomaticRepercussionsForLiberatingCity(conqueringCiv)
val foundingCiv = civInfo.gameInfo.civilizations.first { it.civName == foundingCiv }
moveToCiv(foundingCiv)
health = getMaxHealth() / 2 // I think that cities recover to half health when conquered?
Battle.destroyIfDefeated(oldCiv, conqueringCiv)
health = getMaxHealth() / 2 // I think that cities recover to half health when conquered?
reassignPopulation()
if (foundingCiv.cities.size == 1) cityConstructions.addBuilding("Palace") // Resurrection!