diff --git a/android/assets/jsons/Civ V - Vanilla/Buildings.json b/android/assets/jsons/Civ V - Vanilla/Buildings.json index e153330e53..89615a5902 100644 --- a/android/assets/jsons/Civ V - Vanilla/Buildings.json +++ b/android/assets/jsons/Civ V - Vanilla/Buildings.json @@ -52,7 +52,7 @@ "name": "Library", "hurryCostModifier": 25, "maintenance": 1, - "uniques": ["[+1 Science] Per [2] Population [in this city]"], + "uniques": ["[+1 Science] per [2] population [in this city]"], "requiredTech": "Writing" }, { @@ -72,7 +72,7 @@ "uniqueTo": "China", "hurryCostModifier": 25, "gold": 2, - "uniques": ["[+1 Science] Per [2] Population [in this city]"], + "uniques": ["[+1 Science] per [2] population [in this city]"], "requiredTech": "Writing" }, { @@ -729,7 +729,7 @@ "culture": 1, "greatPersonPoints": {"science": 2}, "isWonder": true, - "uniques": ["Free [Great Scientist] appears","Science gained from research agreements +50%"], + "uniques": ["Free [Great Scientist] appears","Science gained from research agreements +[50]%"], "requiredTech": "Architecture", "quote": "'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell" }, @@ -752,7 +752,7 @@ "requiredBuilding": "University", "maintenance": 3, "hurryCostModifier": 0, - "uniques": ["[+1 Science] Per [2] Population [in this city]"], + "uniques": ["[+1 Science] per [2] population [in this city]"], "requiredTech": "Scientific Theory" }, { diff --git a/android/assets/jsons/Civ V - Vanilla/Policies.json b/android/assets/jsons/Civ V - Vanilla/Policies.json index d71c48e46b..5f0c8a3ef9 100644 --- a/android/assets/jsons/Civ V - Vanilla/Policies.json +++ b/android/assets/jsons/Civ V - Vanilla/Policies.json @@ -267,7 +267,7 @@ { "name": "Rationalism", "era": "Renaissance era", - "uniques": ["Production to science conversion in cities increased by 33%"], + "uniques": ["+[15]% [Science] while the empire is happy"], "policies": [ { "name": "Secularism", @@ -291,21 +291,21 @@ }, { "name": "Sovereignty", - "uniques": ["+15% science while empire is happy"], + "uniques": ["[+1 Gold] from all [Science] buildings"], "requires": ["Humanism"], "row": 2, "column": 5 }, { "name": "Scientific Revolution", - "uniques": ["Science gained from research agreements +50%"], + "uniques": ["Science gained from research agreements +[50]%"], "requires": ["Free Thought"], "row": 3, "column": 1 }, { "name": "Rationalism Complete", - "uniques": ["[+1 Gold] from all [Science] buildings"] + "uniques": ["[2] Free Technologies"] } ] }, diff --git a/core/src/com/unciv/logic/city/CityStats.kt b/core/src/com/unciv/logic/city/CityStats.kt index 5126a27b68..2333cbb35c 100644 --- a/core/src/com/unciv/logic/city/CityStats.kt +++ b/core/src/com/unciv/logic/city/CityStats.kt @@ -317,9 +317,15 @@ class CityStats { stats.production += unique.params[0].toInt() } - - if (cityInfo.civInfo.getHappiness() >= 0 && uniques.any { it.text == "+15% science while empire is happy" }) - stats.science += 15f + if (cityInfo.civInfo.getHappiness() >= 0) { + for (unique in uniques.filter { it.placeholderText == "+[]% [] while the empire is happy"}) + stats.add(Stat.valueOf(unique.params[1]), unique.params[0].toFloat()) + + // Deprecated since 3.15.0 + for (unique in uniques.filter { it.placeholderText == "+15% science while the empire is happy"}) + stats.science += 15f + // + } return stats } diff --git a/core/src/com/unciv/logic/civilization/TechManager.kt b/core/src/com/unciv/logic/civilization/TechManager.kt index 36ccb3c49c..585295598e 100644 --- a/core/src/com/unciv/logic/civilization/TechManager.kt +++ b/core/src/com/unciv/logic/civilization/TechManager.kt @@ -182,8 +182,13 @@ class TechManager { private fun scienceFromResearchAgreements(): Int { // https://forums.civfanatics.com/resources/research-agreements-bnw.25568/ var researchAgreementModifier = 0.5f - for (unique in civInfo.getMatchingUniques("Science gained from research agreements +50%")) - researchAgreementModifier += 0.25f + // Deprecated since 3.15.0 + for (unique in civInfo.getMatchingUniques("Science gained from research agreements +50%")) + researchAgreementModifier += 0.25f + // + for (unique in civInfo.getMatchingUniques("Science gained from research agreements +[]%")) { + researchAgreementModifier += unique.params[0].toFloat() / 200f + } return (scienceFromResearchAgreements / 3 * researchAgreementModifier).toInt() } diff --git a/core/src/com/unciv/models/ruleset/Unique.kt b/core/src/com/unciv/models/ruleset/Unique.kt index 0899100b55..16e24fe281 100644 --- a/core/src/com/unciv/models/ruleset/Unique.kt +++ b/core/src/com/unciv/models/ruleset/Unique.kt @@ -53,8 +53,8 @@ object UniqueTriggerActivation { } // spectators get all techs at start of game, and if (in a mod) a tech gives a free policy, the game stucks on the policy picker screen "Free Social Policy" -> if (!civInfo.isSpectator()) civInfo.policies.freePolicies++ - "Empire enters golden age" -> - civInfo.goldenAges.enterGoldenAge() + "[] Free Social Policies" -> if (!civInfo.isSpectator()) civInfo.policies.freePolicies += unique.params[0].toInt() + "Empire enters golden age" -> civInfo.goldenAges.enterGoldenAge() "Free Great Person" -> { if (civInfo.isSpectator()) return if (civInfo.isPlayerCivilization()) civInfo.greatPeople.freeGreatPeople++ @@ -81,7 +81,8 @@ object UniqueTriggerActivation { city.population.population += 1 city.population.autoAssignPopulation() } - "Free Technology" -> civInfo.tech.freeTechs += 1 + "Free Technology" -> if (!civInfo.isSpectator()) civInfo.tech.freeTechs += 1 + "[] Free Technologies" -> if (!civInfo.isSpectator()) civInfo.tech.freeTechs += unique.params[0].toInt() "Quantity of strategic resources produced by the empire increased by 100%" -> civInfo.updateDetailedCivResources() "+20% attack bonus to all Military Units for 30 turns" -> civInfo.policies.autocracyCompletedTurns = 30