Korean UA activates on buildings added from buying and on national wonders

This commit is contained in:
Yair Morgenstern 2020-12-16 14:09:02 +02:00
parent 30c12662d2
commit 05880376bb
2 changed files with 6 additions and 5 deletions

View File

@ -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)

View File

@ -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