mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
Implemented Cultural Diplomacy policy
This commit is contained in:
parent
2f121983cf
commit
1a576539e0
@ -193,13 +193,14 @@
|
||||
},
|
||||
{
|
||||
"name": "Scholasticism",
|
||||
"requires": ["Philantropy"],
|
||||
"uniques":["Allied City-States provide Science equal to [25]% of what they produce for themselves"],
|
||||
"requires": ["Philantropy"],
|
||||
"row": 2,
|
||||
"column": 2
|
||||
},
|
||||
{
|
||||
"name": "Cultural Diplomacy",
|
||||
"uniques": ["Quantity of Resources gifted by City-States increased by [100]%"],
|
||||
"requires": ["Scholasticism"],
|
||||
"row": 3,
|
||||
"column": 2
|
||||
|
@ -144,10 +144,14 @@ class CivInfoTransientUpdater(val civInfo: CivilizationInfo) {
|
||||
for (city in civInfo.cities) newDetailedCivResources.add(city.getCityResources())
|
||||
|
||||
if (!civInfo.isCityState()) {
|
||||
var resourceBonusPercentage = 1f
|
||||
for (unique in civInfo.getMatchingUniques("Quantity of Resources gifted by City-States increased by []%"))
|
||||
resourceBonusPercentage += unique.params[0].toFloat() / 100
|
||||
for (otherCiv in civInfo.getKnownCivs().filter { it.getAllyCiv() == civInfo.civName }) {
|
||||
for (city in otherCiv.cities) {
|
||||
for (resourceSupply in city.getCityResources())
|
||||
newDetailedCivResources.add(resourceSupply.resource,resourceSupply.amount,"City-States")
|
||||
newDetailedCivResources.add(resourceSupply.resource,
|
||||
(resourceSupply.amount * resourceBonusPercentage).toInt(), "City-States")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user