* tweaked some buildings (#3172)

Windmill provides "+[10]% Production when constructing [Buildings]" (only regular buildings) instead of 10% to everything
Oxford University does not provide 50% science boost - it was a copying error from National College
* tweaked techs
Implemented "Reveals the entire map" unique ("Satellites" tech)
discovering a tech can trigger unique
"Remove Marsh" unlocked with "Masonry"
This commit is contained in:
HadeanLake 2020-09-22 15:17:04 +03:00 committed by GitHub
parent 53a836201d
commit 4ee3dae134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 10 deletions

View File

@ -281,6 +281,7 @@
"replaces": "Temple",
"uniqueTo": "Songhai",
"maintenance": 0,
"specialistSlots": {"culture": 1},
"hurryCostModifier": 25,
"culture": 4,
"requiredBuilding": "Monument",
@ -403,7 +404,7 @@
"culture": 1,
"greatPersonPoints": {"culture": 1},
"isWonder": true,
"uniques": ["+[33]% great person generation in all cities"],
"uniques": ["+[25]% great person generation in all cities"],
"requiredTech": "Theology",
"quote": "'For it soars to a height to match the sky, and as if surging up from among the other buildings it stands on high and looks down upon the remainder of the city, adorning it, because it is a part of it, but glorying in its own beauty' - Procopius, De Aedificis"
},
@ -451,7 +452,7 @@
"name": "Longhouse",
"replaces": "Workshop",
"uniqueTo": "Iroquois",
"cost": 140,
"cost": 100,
"maintenance": 2,
"production": 2,
"specialistSlots": {"production": 1},
@ -505,7 +506,6 @@
"science": 3,
"culture": 1,
"isNationalWonder": true,
"percentStatBonus": {"science": 50},
"requiredBuildingInAllCities": "University",
"uniques": ["Free Technology", "Cost increases by [30] per owned city"],
"requiredTech": "Education"
@ -622,7 +622,7 @@
"name": "Satrap's Court",
"replaces": "Bank",
"uniqueTo": "Persia",
"gold": 3,
"gold": 2,
"specialistSlots": {"gold": 1},
"happiness": 2,
"hurryCostModifier": 15,
@ -742,8 +742,7 @@
"specialistSlots": {"production": 1},
"hurryCostModifier": 25,
"maintenance": 2,
"percentStatBonus": {"production": 10},
"uniques": ["Must not be on [Hill]"],
"uniques": ["Must not be on [Hill]", "+[10]% Production when constructing [Buildings]"],
"requiredTech": "Economics"
},
@ -904,7 +903,7 @@
{
"name": "Kremlin",
"culture": 3,
"cityHealth": 12,
"cityStrength": 12,
"isWonder": true,
"uniques": ["Defensive buildings in all cities are 25% more effective"],
"requiredTech": "Railroad",

View File

@ -563,6 +563,7 @@
"name": "Satellites",
"row": 5,
"prerequisites": ["Nuclear Fission","Rocketry"],
"uniques": ["Reveals the entire map"],
"quote": "'Now, somehow, in some new way, the sky seemed almost alien.' - Lyndon B. Johnson"
},
{

View File

@ -122,7 +122,7 @@
"name": "Remove Marsh",
"turnsToBuild": 6,
"terrainsCanBeBuiltOn": ["Marsh"],
"techRequired": "Bronze Working",
"techRequired": "Masonry",
"uniques": ["Can be built outside your borders"]
},

View File

@ -5,6 +5,8 @@ import com.badlogic.gdx.graphics.Color
import com.unciv.Constants
import com.unciv.logic.map.MapSize
import com.unciv.logic.map.RoadStatus
import com.unciv.models.ruleset.Unique
import com.unciv.models.ruleset.UniqueTriggerActivation
import com.unciv.models.ruleset.tech.Technology
import com.unciv.ui.utils.withItem
import java.util.*
@ -223,8 +225,10 @@ class TechManager {
if (!newTech.isContinuallyResearchable())
techsToResearch.remove(techName)
researchedTechnologies = researchedTechnologies.withItem(newTech)
for (unique in newTech.uniques)
for (unique in newTech.uniques) {
researchedTechUniques = researchedTechUniques.withItem(unique)
UniqueTriggerActivation.triggerCivwideUnique(Unique(unique), civInfo)
}
updateTransientBooleans()
civInfo.addNotification("Research of [$techName] has completed!", Color.BLUE, TechAction(techName))

View File

@ -25,7 +25,7 @@ class UniqueMap:HashMap<String, ArrayList<Unique>>() {
fun getAllUniques() = this.asSequence().flatMap { it.value.asSequence() }
}
// Buildings and policies both have 'triggered' effects, and so may Techs in the future.
// Buildings, techs and policies can have 'triggered' effects
object UniqueTriggerActivation {
fun triggerCivwideUnique(unique: Unique, civInfo: CivilizationInfo) {
when (unique.placeholderText) {
@ -65,6 +65,8 @@ object UniqueTriggerActivation {
"Quantity of strategic resources produced by the empire increased by 100%" -> civInfo.updateDetailedCivResources()
"+20% attack bonus to all Military Units for 30 turns" -> civInfo.policies.autocracyCompletedTurns = 30
"Reveals the entire map" -> civInfo.exploredTiles.addAll(civInfo.gameInfo.tileMap.values.asSequence().map { it.position })
}
}