diff --git a/android/assets/jsons/Civ V - Gods & Kings/Nations.json b/android/assets/jsons/Civ V - Gods & Kings/Nations.json index 338fc945d4..4262bf58ae 100644 --- a/android/assets/jsons/Civ V - Gods & Kings/Nations.json +++ b/android/assets/jsons/Civ V - Gods & Kings/Nations.json @@ -563,7 +563,7 @@ "favoredReligion": "Christianity", "uniqueName": "Seven Cities of Gold", "uniques": ["100 Gold for discovering a Natural Wonder (bonus enhanced to 500 Gold if first to discover it)", - "Double Happiness from Natural Wonders", "[+100]% Yield from every [Natural Wonder]"], + "[+1 Happiness] for every known Natural Wonder", "[+100]% Yield from every [Natural Wonder]"], "cities": ["Madrid","Barcelona","Seville","Cordoba","Toledo","Santiago","Salamanca","Murcia","Valencia","Zaragoza","Pamplona", "Vitoria","Santander","Oviedo","Jaen","Logroño","Valladolid","Palma","Teruel","Almeria","Leon","Zamora","Mida", "Lugo","Alicante","Càdiz","Eiche","Alcorcon","Burgos","Vigo","Badajoz","La Coruña","Guadalquivir","Bilbao", diff --git a/android/assets/jsons/Civ V - Vanilla/Nations.json b/android/assets/jsons/Civ V - Vanilla/Nations.json index 337b40f43e..9fd517a4f1 100644 --- a/android/assets/jsons/Civ V - Vanilla/Nations.json +++ b/android/assets/jsons/Civ V - Vanilla/Nations.json @@ -520,7 +520,7 @@ "innerColor": [255,102,102], "uniqueName": "Seven Cities of Gold", "uniques": ["100 Gold for discovering a Natural Wonder (bonus enhanced to 500 Gold if first to discover it)", - "Double Happiness from Natural Wonders", "[+100]% Yield from every [Natural Wonder]"], + "[+1 Happiness] for every known Natural Wonder", "[+100]% Yield from every [Natural Wonder]"], "cities": ["Madrid","Barcelona","Seville","Cordoba","Toledo","Santiago","Salamanca","Murcia","Valencia","Zaragoza","Pamplona", "Vitoria","Santander","Oviedo","Jaen","Logroño","Valladolid","Palma","Teruel","Almeria","Leon","Zamora","Mida", "Lugo","Alicante","Càdiz","Eiche","Alcorcon","Burgos","Vigo","Badajoz","La Coruña","Guadalquivir","Bilbao", diff --git a/core/src/com/unciv/logic/civilization/CivInfoStats.kt b/core/src/com/unciv/logic/civilization/CivInfoStats.kt index 0540c0dd3a..b6b4e3ab06 100644 --- a/core/src/com/unciv/logic/civilization/CivInfoStats.kt +++ b/core/src/com/unciv/logic/civilization/CivInfoStats.kt @@ -250,12 +250,6 @@ class CivInfoStats(val civInfo: CivilizationInfo) { statMap.add("Policies", civInfo.policies.getAdoptedPolicies().count { !Policy.isBranchCompleteByName(it) } / 2) } - var happinessPerNaturalWonder = 1f - if (civInfo.hasUnique(UniqueType.DoubleHappinessFromNaturalWonders)) - happinessPerNaturalWonder *= 2 - - statMap["Natural Wonders"] = happinessPerNaturalWonder * civInfo.naturalWonders.size - for ((key, value) in getGlobalStatsFromUniques()) statMap.add(key,value.happiness) @@ -289,6 +283,15 @@ class CivInfoStats(val civInfo: CivilizationInfo) { if (unique.sourceObjectType != UniqueTarget.Building && unique.sourceObjectType != UniqueTarget.Wonder) statMap.add(unique.sourceObjectType!!.name, unique.stats) + val statsPerNaturalWonder = Stats(happiness = 1f) + + if (civInfo.hasUnique(UniqueType.DoubleHappinessFromNaturalWonders)) + statsPerNaturalWonder.happiness *= 2 + for (unique in civInfo.getMatchingUniques(UniqueType.StatsFromNaturalWonders)) + statsPerNaturalWonder.add(unique.stats) + + statMap.add("Natural Wonders", statsPerNaturalWonder.times(civInfo.naturalWonders.size)) + return statMap } diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index 7dce947a0e..22e2ca110e 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -205,7 +205,9 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: // Todo: Sign should not be part of the unique placeholder StrategicResourcesIncrease("Quantity of strategic resources produced by the empire +[relativeAmount]%", UniqueTarget.Global), // used in Policy DoubleResourceProduced("Double quantity of [resource] produced", UniqueTarget.Global), - // Todo: should probably be changed to "[stats] from every known Natural Wonder", and that'll give us the global unique as well + + StatsFromNaturalWonders("[stats] for every known Natural Wonder", UniqueTarget.Global), + @Deprecated("as of 4.3.6", ReplaceWith("[+1 Happiness] for every known Natural Wonder")) DoubleHappinessFromNaturalWonders("Double Happiness from Natural Wonders", UniqueTarget.Global), EnablesConstructionOfSpaceshipParts("Enables construction of Spaceship parts", UniqueTarget.Global), @@ -778,7 +780,6 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: GreatPersonPointPercentageDeprecated("[relativeAmount]% great person generation [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), @Deprecated("as of 3.19.19", ReplaceWith("[+25]% [Gold] from Trade Routes"), DeprecationLevel.ERROR) GoldBonusFromTradeRoutesDeprecated("Gold from all trade routes +25%", UniqueTarget.Global), - // ToDo: Reword to `[stats] ` for consistency with other conditionals @Deprecated("as of 3.19.19", ReplaceWith("[stats] "), DeprecationLevel.ERROR) StatsFromXPopulation("[stats] in cities with [amount] or more population", UniqueTarget.Global, UniqueTarget.FollowerBelief), @Deprecated("as of 3.19.8", ReplaceWith("Only available " + diff --git a/docs/Modders/uniques.md b/docs/Modders/uniques.md index e35ec38222..a11e1675ee 100644 --- a/docs/Modders/uniques.md +++ b/docs/Modders/uniques.md @@ -436,7 +436,9 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl Applicable to: Global -??? example "Double Happiness from Natural Wonders" +??? example "[stats] for every known Natural Wonder" + Example: "[+1 Gold, +2 Production] for every known Natural Wonder" + Applicable to: Global ??? example "Enables construction of Spaceship parts"