mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
Fixed bug where city-states would not share their science income even if the player had the right policy (#4381)
* Fixed bug where city-states would not share their science income even if the player had the right policy * Implemented requested changes
This commit is contained in:
parent
d909143a34
commit
c2a43ffee0
@ -105,15 +105,14 @@ class CivInfoStats(val civInfo: CivilizationInfo) {
|
|||||||
|
|
||||||
if (otherCiv.isCityState())
|
if (otherCiv.isCityState())
|
||||||
for (unique in civInfo.getMatchingUniques("Allied City-States provide [] equal to []% of what they produce for themselves")) {
|
for (unique in civInfo.getMatchingUniques("Allied City-States provide [] equal to []% of what they produce for themselves")) {
|
||||||
if (otherCiv.diplomacy[civInfo.civName]!!.matchesCityStateRelationshipFilter(unique.params[0]) && otherCiv.cities.isNotEmpty()) {
|
if (otherCiv.getDiplomacyManager(civInfo.civName).relationshipLevel() != RelationshipLevel.Ally) continue
|
||||||
statMap.add(
|
statMap.add(
|
||||||
"City-States",
|
"City-States",
|
||||||
Stats().add(
|
Stats().add(
|
||||||
Stat.valueOf(unique.params[1]),
|
Stat.valueOf(unique.params[0]),
|
||||||
otherCiv.statsForNextTurn.get(Stat.valueOf(unique.params[1])) * unique.params[2].toFloat() / 100f
|
otherCiv.statsForNextTurn.get(Stat.valueOf(unique.params[0])) * unique.params[1].toFloat() / 100f
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
// Deprecated since 3.15.1
|
// Deprecated since 3.15.1
|
||||||
if (otherCiv.isCityState() && otherCiv.getDiplomacyManager(civInfo.civName).relationshipLevel() >= RelationshipLevel.Ally) {
|
if (otherCiv.isCityState() && otherCiv.getDiplomacyManager(civInfo.civName).relationshipLevel() >= RelationshipLevel.Ally) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user