mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Implemented Cultural Diplomacy policy
This commit is contained in:
parent
2f121983cf
commit
1a576539e0
@ -193,13 +193,14 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Scholasticism",
|
"name": "Scholasticism",
|
||||||
"requires": ["Philantropy"],
|
|
||||||
"uniques":["Allied City-States provide Science equal to [25]% of what they produce for themselves"],
|
"uniques":["Allied City-States provide Science equal to [25]% of what they produce for themselves"],
|
||||||
|
"requires": ["Philantropy"],
|
||||||
"row": 2,
|
"row": 2,
|
||||||
"column": 2
|
"column": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Cultural Diplomacy",
|
"name": "Cultural Diplomacy",
|
||||||
|
"uniques": ["Quantity of Resources gifted by City-States increased by [100]%"],
|
||||||
"requires": ["Scholasticism"],
|
"requires": ["Scholasticism"],
|
||||||
"row": 3,
|
"row": 3,
|
||||||
"column": 2
|
"column": 2
|
||||||
|
@ -144,10 +144,14 @@ class CivInfoTransientUpdater(val civInfo: CivilizationInfo) {
|
|||||||
for (city in civInfo.cities) newDetailedCivResources.add(city.getCityResources())
|
for (city in civInfo.cities) newDetailedCivResources.add(city.getCityResources())
|
||||||
|
|
||||||
if (!civInfo.isCityState()) {
|
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 (otherCiv in civInfo.getKnownCivs().filter { it.getAllyCiv() == civInfo.civName }) {
|
||||||
for (city in otherCiv.cities) {
|
for (city in otherCiv.cities) {
|
||||||
for (resourceSupply in city.getCityResources())
|
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