Implemented Scholasticism

This commit is contained in:
Yair Morgenstern
2021-01-29 12:01:25 +02:00
parent 4e2aaa76dc
commit 2f121983cf
2 changed files with 9 additions and 0 deletions

View File

@ -194,6 +194,7 @@
{
"name": "Scholasticism",
"requires": ["Philantropy"],
"uniques":["Allied City-States provide Science equal to [25]% of what they produce for themselves"],
"row": 2,
"column": 2
},

View File

@ -108,6 +108,14 @@ class CivInfoStats(val civInfo: CivilizationInfo) {
cultureBonus.add(Stat.Culture, culture)
statMap.add("City-States", cultureBonus)
}
if (otherCiv.isCityState() && otherCiv.getDiplomacyManager(civInfo.civName).relationshipLevel() >= RelationshipLevel.Ally) {
val sciencePercentage = civInfo
.getMatchingUniques("Allied City-States provide Science equal to []% of what they produce for themselves")
.sumBy { it.params[0].toInt() }
statMap.add("City-States",Stats().apply { science = otherCiv.statsForNextTurn.science * (sciencePercentage/100f) })
}
}
statMap["Transportation upkeep"] = Stats().apply { gold = -getTransportationUpkeep().toFloat() }