From 82d8670b1669dc17f8bfb5822026d480c720090a Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 22 Dec 2019 19:00:58 +0200 Subject: [PATCH] Fixed super wierd bug where the conquering player hadn't met the civ he was conquering the city from (whaaaaat) --- core/src/com/unciv/logic/city/CityInfo.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/com/unciv/logic/city/CityInfo.kt b/core/src/com/unciv/logic/city/CityInfo.kt index 24406bbd30..bafa4a34f4 100644 --- a/core/src/com/unciv/logic/city/CityInfo.kt +++ b/core/src/com/unciv/logic/city/CityInfo.kt @@ -354,6 +354,12 @@ class CityInfo { val currentPopulation = population.population val percentageOfCivPopulationInThatCity = currentPopulation * 100f / civInfo.cities.sumBy { it.population.population } val aggroGenerated = 10f + percentageOfCivPopulationInThatCity.roundToInt() + + // How can you conquer a city but not know the civ you conquered it from?! + // I don't know either, but some of our players have managed this, and crashed their game! + if(!conqueringCiv.knows(oldCiv)) + conqueringCiv.meetCivilization(oldCiv) + oldCiv.getDiplomacyManager(conqueringCiv) .addModifier(DiplomaticModifiers.CapturedOurCities, -aggroGenerated)