From 05880376bbab47ef746fb6cfe7178bcb9f52a5c1 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 16 Dec 2020 14:09:02 +0200 Subject: [PATCH] Korean UA activates on buildings added from buying and on national wonders --- core/src/com/unciv/logic/city/CityConstructions.kt | 7 ++----- core/src/com/unciv/models/ruleset/Building.kt | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/com/unciv/logic/city/CityConstructions.kt b/core/src/com/unciv/logic/city/CityConstructions.kt index 49e12eab46..29ccf94d42 100644 --- a/core/src/com/unciv/logic/city/CityConstructions.kt +++ b/core/src/com/unciv/logic/city/CityConstructions.kt @@ -288,7 +288,7 @@ class CityConstructions { construction.postBuildEvent(this) if (construction.name in inProgressConstructions) inProgressConstructions.remove(construction.name) - if(construction.name == currentConstructionFromQueue) + if (construction.name == currentConstructionFromQueue) removeCurrentConstruction() validateConstructionQueue() // if we've build e.g. the Great Lighthouse, then Lighthouse is no longer relevant in the queue @@ -299,10 +299,7 @@ class CityConstructions { if (civ.exploredTiles.contains(cityInfo.location)) civ.addNotification("[${construction.name}] has been built in [${cityInfo.name}]", cityInfo.location, Color.BROWN) else - civ.addNotification("[${construction.name}] has been built in a faraway land",null,Color.BROWN) - } - if(construction.science > 0 && cityInfo.civInfo.hasUnique("Receive a tech boost when scientific buildings/wonders are built in capital")){ - cityInfo.civInfo.tech.addScience(cityInfo.civInfo.tech.scienceOfLast8Turns.sum() / 8) + civ.addNotification("[${construction.name}] has been built in a faraway land", null, Color.BROWN) } } else cityInfo.civInfo.addNotification("[${construction.name}] has been built in [" + cityInfo.name + "]", cityInfo.location, Color.BROWN) diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 6f50330f7a..3a8efa21b6 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -378,6 +378,10 @@ class Building : NamedStats(), IConstruction { if ("Enemy land units must spend 1 extra movement point when inside your territory (obsolete upon Dynamite)" in uniques) civInfo.updateHasActiveGreatWall() + // Korean unique - apparently gives the same as the research agreement + if (science > 0 && civInfo.hasUnique("Receive a tech boost when scientific buildings/wonders are built in capital")) + civInfo.tech.addScience(civInfo.tech.scienceOfLast8Turns.sum() / 8) + cityConstructions.cityInfo.cityStats.update() // new building, new stats civInfo.updateDetailedCivResources() // this building/unit could be a resource-requiring one civInfo.transients().updateCitiesConnectedToCapital(false) // could be a connecting building, like a harbor