diff --git a/android/assets/jsons/Civ V - Gods & Kings/Buildings.json b/android/assets/jsons/Civ V - Gods & Kings/Buildings.json index 52956fe4c2..2cc3f92f89 100644 --- a/android/assets/jsons/Civ V - Gods & Kings/Buildings.json +++ b/android/assets/jsons/Civ V - Gods & Kings/Buildings.json @@ -30,7 +30,7 @@ "cost": 40, "hurryCostModifier": 40, "maintenance": 1, - "uniques": ["Destroyed when the city is captured"] //"Hidden when religion is disabled" + "uniques": ["Destroyed when the city is captured"] //"Only available " }, // Column 1 { @@ -49,7 +49,7 @@ "cost": 40, "maintenance": 1, "requiredTech": "Pottery", - "uniques": ["Hidden when religion is disabled"] + "uniques": ["Only available "] }, { "name": "Pyramid", @@ -60,7 +60,7 @@ "cost": 40, "maintenance": 1, "requiredTech": "Pottery", - "uniques": ["Hidden when religion is disabled"] + "uniques": ["Only available "] }, { "name": "Temple of Artemis", @@ -296,7 +296,7 @@ "maintenance": 2, "hurryCostModifier": 25, "requiredTech": "Philosophy", - "uniques": ["Hidden when religion is disabled", "Destroyed when the city is captured"] + "uniques": ["Only available ", "Destroyed when the city is captured"] }, { "name": "Burial Tomb", @@ -447,7 +447,7 @@ "name": "Hagia Sophia", "faith": 3, "isWonder": true, - "uniques": ["Gain a free [Temple] [in this city]", "Free [Great Prophet] appears", "Hidden when religion is disabled"], + "uniques": ["Gain a free [Temple] [in this city]", "Free [Great Prophet] appears", "Only available "], "requiredTech": "Theology", "quote": "'For it soars to a height to match the sky, and as if surging up from among the other buildings it stands on high and looks down upon the remainder of the city, adorning it, because it is a part of it, but glorying in its own beauty' - Procopius, De Aedificis" }, @@ -457,7 +457,7 @@ "faith": 3, "greatPersonPoints": {"Great Engineer": 1}, "isWonder": true, - "uniques": ["Gain a free [Mosque] [in this city]", "Hidden when religion is disabled", + "uniques": ["Gain a free [Mosque] [in this city]", "Only available ", "All newly-trained [Missionary] units [in this city] receive the [Devout] promotion", "All newly-trained [Great Prophet] units [in this city] receive the [Devout] promotion"], "requiredTech": "Theology", @@ -469,7 +469,7 @@ "culture": 1, "faith": 8, "uniques": ["Only available ", "Cost increases by [30] per owned city", - "[+100]% Natural religion spread [in this city]", "Hidden when religion is disabled", "Can only be built "], + "[+100]% Natural religion spread [in this city]", "Only available ", "Can only be built "], "requiredTech": "Theology", "isNationalWonder": true }, @@ -1190,7 +1190,7 @@ "culture": 3, "happiness": 1, "specialistSlots": {"Artist": 1}, - "uniques": ["Unbuildable", "Hidden when religion is disabled"] + "uniques": ["Unbuildable", "Only available "] }, { "name": "Monastery", @@ -1199,7 +1199,7 @@ "faith": 2, "uniques": ["[+1 Culture, +1 Faith] from [Wine] tiles [in this city]", "[+1 Culture, +1 Faith] from [Incense] tiles [in this city]", - "Unbuildable", "Hidden when religion is disabled", "Destroyed when the city is captured"] + "Unbuildable", "Only available ", "Destroyed when the city is captured"] }, { "name": "Mosque", @@ -1207,7 +1207,7 @@ "culture": 2, "faith": 3, "happiness": 1, - "uniques": ["Unbuildable", "Hidden when religion is disabled"] + "uniques": ["Unbuildable", "Only available "] }, { "name": "Pagoda", @@ -1215,6 +1215,6 @@ "culture": 2, "faith": 2, "happiness": 2, - "uniques": ["Unbuildable", "Hidden when religion is disabled"] + "uniques": ["Unbuildable", "Only available "] } ] diff --git a/android/assets/jsons/Civ V - Gods & Kings/Ruins.json b/android/assets/jsons/Civ V - Gods & Kings/Ruins.json index e552a2d6c6..96a4123034 100644 --- a/android/assets/jsons/Civ V - Gods & Kings/Ruins.json +++ b/android/assets/jsons/Civ V - Gods & Kings/Ruins.json @@ -58,13 +58,13 @@ { "name": "discover holy symbols", "notification": "We have found holy symbols in the ruins, giving us a deeper understanding of religion! (+[faithAmount] Faith)", - "uniques": ["Hidden when religion is disabled", "Gain enough Faith for a Pantheon", "Only available ", "Only available "], + "uniques": ["Only available ", "Gain enough Faith for a Pantheon", "Only available ", "Only available "], "color": "#CDDDF4" }, { "name": "an ancient prophecy", "notification": "We have found an ancient prophecy in the ruins, greatly increasing our spiritual connection! (+[faithAmount] Faith)", - "uniques": ["Hidden when religion is disabled", "Gain enough Faith for [33]% of a Great Prophet", "Unavailable ", + "uniques": ["Only available ", "Gain enough Faith for [33]% of a Great Prophet", "Unavailable ", "Only available ", "Only available "], "color": "#CDDDF4" } diff --git a/android/assets/jsons/Civ V - Gods & Kings/Units.json b/android/assets/jsons/Civ V - Gods & Kings/Units.json index b9111316a9..6be7cd75b5 100644 --- a/android/assets/jsons/Civ V - Gods & Kings/Units.json +++ b/android/assets/jsons/Civ V - Gods & Kings/Units.json @@ -1623,7 +1623,7 @@ "May found a religion ", "May enhance a religion ", "May enter foreign tiles without open borders", "[-1] Sight", "Great Person - [Faith]", - "Unbuildable", "Religious Unit", "Hidden when religion is disabled", + "Unbuildable", "Religious Unit", "Only available ", "Takes your religion over the one in their birth city"], "movement": 2, "religiousStrength": 1000 @@ -1663,7 +1663,7 @@ "Can Spread Religion <[2] times> ", "May enter foreign tiles without open borders, but loses [250] religious strength each turn it ends there", "Can be purchased with [Faith] [in all cities in which the majority religion is a major religion]", - "[-1] Sight", "Unbuildable", "Religious Unit", "Hidden when religion is disabled"], + "[-1] Sight", "Unbuildable", "Religious Unit", "Only available "], "movement": 4, "religiousStrength": 1000 }, @@ -1673,7 +1673,7 @@ "uniques": ["Prevents spreading of religion to the city it is next to", "Can remove other religions from cities ", "Can be purchased with [Faith] [in all cities in which the majority religion is a major religion]", - "[+1] Sight", "Hidden when religion is disabled", "Unbuildable", "Religious Unit" + "[+1] Sight", "Only available ", "Unbuildable", "Religious Unit" ], "movement": 3 }, diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index d2e9d4842f..1f9104c851 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -292,14 +292,12 @@ class GameInfo : IsPartOfGameInfoSerialization, HasGameInfoSerializationVersion } fun isReligionEnabled(): Boolean { - val religionDisabledByRuleset = (ruleset.eras[gameParameters.startingEra]!!.hasUnique(UniqueType.DisablesReligion) - || ruleset.modOptions.hasUnique(UniqueType.DisableReligion)) - return !religionDisabledByRuleset + if (ruleset.eras[gameParameters.startingEra]!!.hasUnique(UniqueType.DisablesReligion)) return false + if (ruleset.modOptions.hasUnique(UniqueType.DisableReligion)) return false + return true } - fun isEspionageEnabled(): Boolean { - return gameParameters.espionageEnabled - } + fun isEspionageEnabled(): Boolean = gameParameters.espionageEnabled private fun getEquivalentTurn(): Int { val totalTurns = speed.numTotalTurns() diff --git a/core/src/com/unciv/models/ruleset/unique/Conditionals.kt b/core/src/com/unciv/models/ruleset/unique/Conditionals.kt index 8101356809..18524d4054 100644 --- a/core/src/com/unciv/models/ruleset/unique/Conditionals.kt +++ b/core/src/com/unciv/models/ruleset/unique/Conditionals.kt @@ -139,7 +139,9 @@ object Conditionals { UniqueType.ConditionalIfStartingInEra -> checkOnGameInfo { gameParameters.startingEra == conditional.params[0] } UniqueType.ConditionalSpeed -> checkOnGameInfo { gameParameters.speed == conditional.params[0] } UniqueType.ConditionalVictoryEnabled -> checkOnGameInfo { gameParameters.victoryTypes.contains(conditional.params[0]) } - UniqueType.ConditionalVictoryDisabled-> checkOnGameInfo { !gameParameters.victoryTypes.contains(conditional.params[0]) } + UniqueType.ConditionalVictoryDisabled -> checkOnGameInfo { !gameParameters.victoryTypes.contains(conditional.params[0]) } + UniqueType.ConditionalReligionEnabled -> checkOnGameInfo { isReligionEnabled() } + UniqueType.ConditionalReligionDisabled -> checkOnGameInfo { !isReligionEnabled() } UniqueType.ConditionalTech -> checkOnCiv { tech.isResearched(conditional.params[0]) } UniqueType.ConditionalNoTech -> checkOnCiv { !tech.isResearched(conditional.params[0]) } UniqueType.ConditionalWhileResearching -> checkOnCiv { tech.currentTechnologyName() == conditional.params[0] } diff --git a/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt b/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt index e848b6ad39..270db8ce49 100644 --- a/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt +++ b/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt @@ -100,6 +100,8 @@ interface IHasUniques : INamed { UniqueType.ConditionalVictoryDisabled, UniqueType.ConditionalVictoryEnabled, UniqueType.ConditionalSpeed, + UniqueType.ConditionalReligionEnabled, + UniqueType.ConditionalReligionDisabled, ) val stateForConditionals = StateForConditionals(gameInfo = gameInfo) diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index ed16ec95a3..3115985355 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -661,6 +661,8 @@ enum class UniqueType( ConditionalSpeed("on [speed] game speed", UniqueTarget.Conditional), ConditionalVictoryEnabled("when [victoryType] Victory is enabled", UniqueTarget.Conditional), ConditionalVictoryDisabled("when [victoryType] Victory is disabled", UniqueTarget.Conditional), + ConditionalReligionEnabled("when religion is enabled", UniqueTarget.Conditional), + ConditionalReligionDisabled("when religion is disabled", UniqueTarget.Conditional), /////// general conditionals @@ -936,18 +938,22 @@ enum class UniqueType( ConditionalTimedUnique("for [amount] turns", UniqueTarget.MetaModifier, docDescription = "Turns this unique into a trigger, activating this unique as a *global* unique for a number of turns"), + + @Deprecated("As of 4.13.18", ReplaceWith("Only available ")) + HiddenWithoutVictoryType("Hidden when [victoryType] Victory is disabled", UniqueTarget.Building, UniqueTarget.Unit, flags = UniqueFlag.setOfHiddenToUsers), + + @Deprecated("As of 4.13.18", ReplaceWith("Only available ")) HiddenWithoutReligion("Hidden when religion is disabled", UniqueTarget.Unit, UniqueTarget.Building, UniqueTarget.Ruins, UniqueTarget.Tutorial, flags = UniqueFlag.setOfHiddenToUsers), + HiddenWithoutEspionage("Hidden when espionage is disabled", UniqueTarget.Building, flags = UniqueFlag.setOfHiddenToUsers), AiChoiceWeight("[relativeAmount]% weight to this choice for AI decisions", UniqueTarget.Tech, UniqueTarget.Promotion, UniqueTarget.Policy, flags = UniqueFlag.setOfHiddenToUsers), - @Deprecated("As of 4.13.18", ReplaceWith("Only available ")) - HiddenWithoutVictoryType("Hidden when [victoryType] Victory is disabled", UniqueTarget.Building, UniqueTarget.Unit, flags = UniqueFlag.setOfHiddenToUsers), HiddenFromCivilopedia("Will not be displayed in Civilopedia", *UniqueTarget.Displayable, flags = UniqueFlag.setOfHiddenToUsers), ModifierHiddenFromUsers("hidden from users", UniqueTarget.MetaModifier), ForEveryCountable("for every [countable]", UniqueTarget.MetaModifier),