mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-04 07:58:18 +07:00
cover more cases
This commit is contained in:
parent
73ad76b59c
commit
5846da6f8a
@ -305,14 +305,12 @@ class CityStateFunctions(val civInfo: CivilizationInfo) {
|
|||||||
for (unit in civInfo.getCivUnits())
|
for (unit in civInfo.getCivUnits())
|
||||||
unit.gift(otherCiv)
|
unit.gift(otherCiv)
|
||||||
|
|
||||||
// We want to get rid of the original capital flag for this city state so it can't be liberated in the future.
|
// Make sure this CS can never be liberated
|
||||||
// We do this step to be extra certain to find the correct one since a CS can rarely capture and lose cities
|
civInfo.gameInfo.getCities().filter {
|
||||||
val originalCapital = civInfo.gameInfo.getCities().firstOrNull {
|
it.foundingCiv == civInfo.civName
|
||||||
it.isOriginalCapital && it.foundingCiv == civInfo.civName
|
}.forEach {
|
||||||
}
|
it.foundingCiv = ""
|
||||||
if (originalCapital != null) {
|
it.isOriginalCapital = false
|
||||||
originalCapital.foundingCiv = ""
|
|
||||||
originalCapital.isOriginalCapital = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (city in civInfo.cities) {
|
for (city in civInfo.cities) {
|
||||||
|
Loading…
Reference in New Issue
Block a user