Finished Rationalism tree!

This commit is contained in:
Yair Morgenstern 2020-07-30 22:39:52 +03:00
parent 0eaad31ce1
commit c0a9690d2a
4 changed files with 12 additions and 8 deletions

View file

@ -295,7 +295,6 @@
"name": "Commerce Complete",
"effect": "+1 gold from every trading post, double gold from Great Merchant trade missions",
"uniques": ["[+1 Gold] from every [Trading post]", "Double gold from Great Merchant trade missions"]
"uniques": "+1
}
]
},
@ -331,6 +330,7 @@
{
"name": "Sovereignty",
"effect": "+15% science while empire is happy",
"uniques": ["+15% science while empire is happy"],
"requires": ["Humanism"],
"row": 2,
"column": 5
@ -338,13 +338,15 @@
{
"name": "Scientific Revolution",
"effect": "Science gained from research agreements +50%",
"uniques": ["Science gained from research agreements +50%"],
"requires": ["Free Thought"],
"row": 3,
"column": 1
},
{
"name": "Rationalism Complete",
"effect": "+1 gold from all science buildings"
"effect": "+1 gold from all science buildings",
"unique": ["[+1 Gold] from all [Science] buildings"]
}
]
},

View file

@ -365,7 +365,7 @@ class CityStats {
stats.culture += 33f
if (cityInfo.civInfo.hasUnique("+25% gold in capital") && cityInfo.isCapital())
stats.gold += 25f
if (policies.contains("Sovereignty") && cityInfo.civInfo.getHappiness() >= 0)
if (cityInfo.civInfo.getHappiness() >= 0 && cityInfo.civInfo.hasUnique("+15% science while empire is happy"))
stats.science += 15f
if (policies.contains("Total War") && currentConstruction is BaseUnit && !currentConstruction.unitType.isCivilian())
stats.production += 15f

View file

@ -169,9 +169,7 @@ class TechManager {
private fun scienceFromResearchAgreements(): Int {
// https://forums.civfanatics.com/resources/research-agreements-bnw.25568/
var researchAgreementModifier = 0.5f
if (civInfo.policies.isAdopted("Scientific Revolution"))
researchAgreementModifier += 0.25f
if (civInfo.hasUnique("Science gained from research agreements +50%"))
for(unique in civInfo.getMatchingUniques("Science gained from research agreements +50%"))
researchAgreementModifier += 0.25f
return (scienceFromResearchAgreements / 3 * researchAgreementModifier).toInt()
}

View file

@ -146,8 +146,12 @@ class Building : NamedStats(), IConstruction{
if (adoptedPolicies.contains("Humanism") && hashSetOf("University", "Observatory", "Public School").contains(baseBuildingName ))
stats.happiness += 1f
if (adoptedPolicies.contains("Rationalism Complete") && !isWonder && stats.science > 0)
stats.gold += 1f
if(!isWonder)
for(unique in civInfo.getMatchingUniques("[] from all [] buildings")){
val placeholderParams = unique.getPlaceholderParameters()
if(isStatRelated(Stat.valueOf(placeholderParams[1])))
stats.add(Stats.parse(placeholderParams[0]))
}
if (adoptedPolicies.contains("Constitution") && isWonder)
stats.culture += 2f