mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 20:59:18 +07:00
fix duplicated city-state bonus bug (#5042)
* fix city-state bug * pt 2
This commit is contained in:
@ -1160,11 +1160,11 @@ class CivilizationInfo {
|
|||||||
if (!isCityState())
|
if (!isCityState())
|
||||||
return false
|
return false
|
||||||
val eraInfo = getEraObject()
|
val eraInfo = getEraObject()
|
||||||
val bonuses = if (eraInfo == null) null
|
val allyBonuses = if (eraInfo == null) null
|
||||||
else eraInfo.allyBonus[cityStateType.name]
|
else eraInfo.allyBonus[cityStateType.name]
|
||||||
if (bonuses != null) {
|
if (allyBonuses != null) {
|
||||||
// Defined city states in json
|
// Defined city states in json
|
||||||
bonuses.addAll(eraInfo!!.friendBonus[cityStateType.name]!!)
|
val bonuses = allyBonuses + eraInfo!!.friendBonus[cityStateType.name]!!
|
||||||
for (bonus in bonuses) {
|
for (bonus in bonuses) {
|
||||||
if (statType == Stat.Happiness && bonus.getPlaceholderText() == "Provides [] Happiness")
|
if (statType == Stat.Happiness && bonus.getPlaceholderText() == "Provides [] Happiness")
|
||||||
return true
|
return true
|
||||||
|
Reference in New Issue
Block a user