mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 20:31:51 -04:00
Do not display "war against" quest to the civ that the war is against
Do not allow liberating city-states you were at war with
This commit is contained in:
parent
c4364e3a8f
commit
69d4772f0d
@ -193,7 +193,7 @@ class CityInfoConquestFunctions(val city: CityInfo){
|
||||
return
|
||||
}
|
||||
|
||||
val foundingCiv = civInfo.gameInfo.civilizations.first { it.civName == foundingCiv }
|
||||
val foundingCiv = civInfo.gameInfo.getCivilization(foundingCiv)
|
||||
if (foundingCiv.isDefeated()) // resurrected civ
|
||||
for (diploManager in foundingCiv.diplomacy.values)
|
||||
if (diploManager.diplomaticStatus == DiplomaticStatus.War)
|
||||
|
@ -343,7 +343,7 @@ class DiplomacyScreen(
|
||||
diplomacyTable.add(getQuestTable(assignedQuest)).row()
|
||||
}
|
||||
|
||||
for (target in otherCiv.getKnownCivs().filter { otherCiv.questManager.warWithMajorActive(it) }) {
|
||||
for (target in otherCiv.getKnownCivs().filter { otherCiv.questManager.warWithMajorActive(it) && viewingCiv != it }) {
|
||||
diplomacyTable.addSeparator()
|
||||
diplomacyTable.add(getWarWithMajorTable(target, otherCiv)).row()
|
||||
}
|
||||
|
@ -153,12 +153,14 @@ class AlertPopup(val worldScreen: WorldScreen, val popupAlert: PopupAlert): Popu
|
||||
addQuestionAboutTheCity(city.name)
|
||||
val conqueringCiv = worldScreen.gameInfo.getCurrentPlayerCivilization()
|
||||
|
||||
addLiberateOption(city.foundingCiv) {
|
||||
city.liberateCity(conqueringCiv)
|
||||
worldScreen.shouldUpdate = true
|
||||
close()
|
||||
if (!conqueringCiv.isAtWarWith(worldScreen.gameInfo.getCivilization(city.foundingCiv))) {
|
||||
addLiberateOption(city.foundingCiv) {
|
||||
city.liberateCity(conqueringCiv)
|
||||
worldScreen.shouldUpdate = true
|
||||
close()
|
||||
}
|
||||
addSeparator()
|
||||
}
|
||||
addSeparator()
|
||||
add(getCloseButton("Keep it")).row()
|
||||
}
|
||||
AlertType.BorderConflict -> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user