AI can no longer raze capital cities

This commit is contained in:
Yair Morgenstern 2020-11-02 20:21:44 +02:00
parent 77af9ba80c
commit 87b0af6c1c
2 changed files with 13 additions and 14 deletions

View File

@ -122,9 +122,7 @@ object Battle {
} }
for (unique in bonusUniques) { for (unique in bonusUniques) {
if (!defeatedUnit.matchesCategory(unique.params[1])) { if (!defeatedUnit.matchesCategory(unique.params[1])) continue
continue
}
val yieldPercent = unique.params[0].toFloat() / 100 val yieldPercent = unique.params[0].toFloat() / 100
val defeatedUnitYieldSourceType = unique.params[2] val defeatedUnitYieldSourceType = unique.params[2]
@ -317,10 +315,9 @@ object Battle {
if (attackerCiv.isPlayerCivilization()) { if (attackerCiv.isPlayerCivilization()) {
attackerCiv.popupAlerts.add(PopupAlert(AlertType.CityConquered, city.id)) attackerCiv.popupAlerts.add(PopupAlert(AlertType.CityConquered, city.id))
UncivGame.Current.settings.addCompletedTutorialTask("Conquer a city") UncivGame.Current.settings.addCompletedTutorialTask("Conquer a city")
} } else {
else {
city.puppetCity(attackerCiv) city.puppetCity(attackerCiv)
if (city.population.population < 4) { if (city.population.population < 4 && !city.isOriginalCapital) {
city.annexCity() city.annexCity()
city.isBeingRazed = true city.isBeingRazed = true
} }

View File

@ -125,8 +125,10 @@ internal object DesktopLauncher {
* this causes a delay, leading to horrible lag if there are enough switches. * this causes a delay, leading to horrible lag if there are enough switches.
* The cost of this specific solution is that the entire game.png needs be be kept in-memory constantly. * The cost of this specific solution is that the entire game.png needs be be kept in-memory constantly.
* It's currently only 1.5MB so it should be okay, but it' an important point to remember for the future. * It's currently only 1.5MB so it should be okay, but it' an important point to remember for the future.
* Sidenode: Modded tilesets don't have this problem, since all the images are included in the mod's single PNG. * Sidenote: Modded tilesets don't have this problem, since all the images are included in the mod's single PNG.
* Probably. Unless they have some truly huge images. * Probably. Unless they have some truly huge images.
* Sidenote 2: Okay entire so custom tilesets do have this problem because they can get so big that what accommodates
* the regular tileset (4096) doesn't suit them. Looking at you 5hex.
*/ */
settings.maxWidth = 4096 settings.maxWidth = 4096
settings.maxHeight = 4096 settings.maxHeight = 4096