mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 12:54:06 -04:00
Merge pull request #7507 from SimonCeder/marriagebug
avoid potential marriage bug
This commit is contained in:
commit
2f52b6bf1a
@ -303,11 +303,18 @@ class CityStateFunctions(val civInfo: CivilizationInfo) {
|
|||||||
civInfo.getCapital()!!.location, civInfo.civName, NotificationIcon.Diplomacy, otherCiv.civName)
|
civInfo.getCapital()!!.location, civInfo.civName, NotificationIcon.Diplomacy, otherCiv.civName)
|
||||||
for (unit in civInfo.getCivUnits())
|
for (unit in civInfo.getCivUnits())
|
||||||
unit.gift(otherCiv)
|
unit.gift(otherCiv)
|
||||||
|
|
||||||
|
// Make sure this CS can never be liberated
|
||||||
|
civInfo.gameInfo.getCities().filter {
|
||||||
|
it.foundingCiv == civInfo.civName
|
||||||
|
}.forEach {
|
||||||
|
it.foundingCiv = ""
|
||||||
|
it.isOriginalCapital = false
|
||||||
|
}
|
||||||
|
|
||||||
for (city in civInfo.cities) {
|
for (city in civInfo.cities) {
|
||||||
city.moveToCiv(otherCiv)
|
city.moveToCiv(otherCiv)
|
||||||
city.isPuppet = true // Human players get a popup that allows them to annex instead
|
city.isPuppet = true // Human players get a popup that allows them to annex instead
|
||||||
city.foundingCiv = "" // This is no longer a city-state
|
|
||||||
city.isOriginalCapital = false // It's now an ordinary city and can be razed in later conquests
|
|
||||||
}
|
}
|
||||||
civInfo.destroy()
|
civInfo.destroy()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user