mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-08 01:54:02 +07:00
Modding: Replaced "Hidden when religion is disabled" with "Only available <when religion is enabled>"
This commit is contained in:
parent
579ea79d09
commit
63765ef73f
@ -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 <when religion is enabled>"
|
||||
},
|
||||
// Column 1
|
||||
{
|
||||
@ -49,7 +49,7 @@
|
||||
"cost": 40,
|
||||
"maintenance": 1,
|
||||
"requiredTech": "Pottery",
|
||||
"uniques": ["Hidden when religion is disabled"]
|
||||
"uniques": ["Only available <when religion is enabled>"]
|
||||
},
|
||||
{
|
||||
"name": "Pyramid",
|
||||
@ -60,7 +60,7 @@
|
||||
"cost": 40,
|
||||
"maintenance": 1,
|
||||
"requiredTech": "Pottery",
|
||||
"uniques": ["Hidden when religion is disabled"]
|
||||
"uniques": ["Only available <when religion is enabled>"]
|
||||
},
|
||||
{
|
||||
"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 <when religion is enabled>", "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 <when religion is enabled>"],
|
||||
"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 <when religion is enabled>",
|
||||
"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 <if [Temple] is constructed in all [non-[Puppeted]] cities>", "Cost increases by [30] per owned city",
|
||||
"[+100]% Natural religion spread [in this city]", "Hidden when religion is disabled", "Can only be built <in [Holy] cities>"],
|
||||
"[+100]% Natural religion spread [in this city]", "Only available <when religion is enabled>", "Can only be built <in [Holy] cities>"],
|
||||
"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 <when religion is enabled>"]
|
||||
},
|
||||
{
|
||||
"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 <when religion is enabled>", "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 <when religion is enabled>"]
|
||||
},
|
||||
{
|
||||
"name": "Pagoda",
|
||||
@ -1215,6 +1215,6 @@
|
||||
"culture": 2,
|
||||
"faith": 2,
|
||||
"happiness": 2,
|
||||
"uniques": ["Unbuildable", "Hidden when religion is disabled"]
|
||||
"uniques": ["Unbuildable", "Only available <when religion is enabled>"]
|
||||
}
|
||||
]
|
||||
|
@ -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 <before founding a Pantheon>", "Only available <after turn number [20]>"],
|
||||
"uniques": ["Only available <when religion is enabled>", "Gain enough Faith for a Pantheon", "Only available <before founding a Pantheon>", "Only available <after turn number [20]>"],
|
||||
"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 <after generating a Great Prophet>",
|
||||
"uniques": ["Only available <when religion is enabled>", "Gain enough Faith for [33]% of a Great Prophet", "Unavailable <after generating a Great Prophet>",
|
||||
"Only available <after founding a Pantheon>", "Only available <after turn number [20]>"],
|
||||
"color": "#CDDDF4"
|
||||
}
|
||||
|
@ -1623,7 +1623,7 @@
|
||||
"May found a religion <by consuming this unit> <if it hasn't used other actions yet>",
|
||||
"May enhance a religion <by consuming this unit> <if it hasn't used other actions yet>",
|
||||
"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 <when religion is enabled>",
|
||||
"Takes your religion over the one in their birth city"],
|
||||
"movement": 2,
|
||||
"religiousStrength": 1000
|
||||
@ -1663,7 +1663,7 @@
|
||||
"Can Spread Religion <for [4] movement> <[2] times> <after which this unit is consumed>",
|
||||
"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 <when religion is enabled>"],
|
||||
"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 <in [Friendly] tiles> <once> <after which this unit is consumed>",
|
||||
"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 <when religion is enabled>", "Unbuildable", "Religious Unit"
|
||||
],
|
||||
"movement": 3
|
||||
},
|
||||
|
@ -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()
|
||||
|
@ -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] }
|
||||
|
@ -100,6 +100,8 @@ interface IHasUniques : INamed {
|
||||
UniqueType.ConditionalVictoryDisabled,
|
||||
UniqueType.ConditionalVictoryEnabled,
|
||||
UniqueType.ConditionalSpeed,
|
||||
UniqueType.ConditionalReligionEnabled,
|
||||
UniqueType.ConditionalReligionDisabled,
|
||||
)
|
||||
val stateForConditionals = StateForConditionals(gameInfo = gameInfo)
|
||||
|
||||
|
@ -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 <when [victoryType] Victory is enabled>"))
|
||||
HiddenWithoutVictoryType("Hidden when [victoryType] Victory is disabled", UniqueTarget.Building, UniqueTarget.Unit, flags = UniqueFlag.setOfHiddenToUsers),
|
||||
|
||||
@Deprecated("As of 4.13.18", ReplaceWith("Only available <when religion is enabled>"))
|
||||
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 <when [victoryType] Victory is enabled>"))
|
||||
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),
|
||||
|
Loading…
Reference in New Issue
Block a user