mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-09 04:09:35 +07: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())
|
||||
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()) {
|
||||
statMap.add(
|
||||
"City-States",
|
||||
Stats().add(
|
||||
Stat.valueOf(unique.params[1]),
|
||||
otherCiv.statsForNextTurn.get(Stat.valueOf(unique.params[1])) * unique.params[2].toFloat() / 100f
|
||||
)
|
||||
if (otherCiv.getDiplomacyManager(civInfo.civName).relationshipLevel() != RelationshipLevel.Ally) continue
|
||||
statMap.add(
|
||||
"City-States",
|
||||
Stats().add(
|
||||
Stat.valueOf(unique.params[0]),
|
||||
otherCiv.statsForNextTurn.get(Stat.valueOf(unique.params[0])) * unique.params[1].toFloat() / 100f
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
// Deprecated since 3.15.1
|
||||
if (otherCiv.isCityState() && otherCiv.getDiplomacyManager(civInfo.civName).relationshipLevel() >= RelationshipLevel.Ally) {
|
||||
|
Loading…
Reference in New Issue
Block a user