mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 18:28:42 +07:00
Add <when espionage is enabled>
conditional (#12326)
* Modding: Replaced "Hidden when espionage is disabled" with "Only available <when espionage is enabled>" * Modding: Fix unique deprecation notice * Add ConditionalEspionageEnabled to isUnavailableBySettings list
This commit is contained in:
@ -714,7 +714,7 @@
|
||||
"cost": 160,
|
||||
"maintenance": 1,
|
||||
"hurryCostModifier": 10,
|
||||
"uniques": ["Hidden when espionage is disabled", "[-25]% enemy spy effectiveness [in this city]"],
|
||||
"uniques": ["Only available <when espionage is enabled>", "[-25]% enemy spy effectiveness [in this city]"],
|
||||
"requiredTech": "Banking"
|
||||
},
|
||||
// will be introduced in BNW expansion pack
|
||||
@ -947,7 +947,7 @@
|
||||
"cost": 300,
|
||||
"maintenance": 1,
|
||||
"hurryCostModifier": 10,
|
||||
"uniques": ["Hidden when espionage is disabled", "[-25]% enemy spy effectiveness [in this city]"],
|
||||
"uniques": ["Only available <when espionage is enabled>", "[-25]% enemy spy effectiveness [in this city]"],
|
||||
"requiredBuilding": "Constabulary",
|
||||
"requiredTech": "Electricity"
|
||||
},
|
||||
@ -986,7 +986,7 @@
|
||||
"cost": 120,
|
||||
"culture": 1,
|
||||
"isNationalWonder": true,
|
||||
"uniques": ["Hidden when espionage is disabled",
|
||||
"uniques": ["Only available <when espionage is enabled>",
|
||||
"New spies start with [1] level(s)",
|
||||
"Promotes all spies [1] time(s)",
|
||||
"Gain an extra spy", // Order is significant here
|
||||
@ -1117,8 +1117,8 @@
|
||||
{
|
||||
"name": "Great Firewall",
|
||||
"isWonder": true,
|
||||
"uniques": ["Hidden when espionage is disabled", "[-99]% enemy spy effectiveness [in this city]",
|
||||
"[-25]% enemy spy effectiveness [in all cities]",],
|
||||
"uniques": ["Only available <when espionage is enabled>", "[-99]% enemy spy effectiveness [in this city]",
|
||||
"[-25]% enemy spy effectiveness [in all cities]"],
|
||||
"requiredTech": "Computers"
|
||||
},
|
||||
|
||||
|
@ -384,7 +384,7 @@
|
||||
"Each civilization can only choose a single pantheon belief, and each pantheon can only be chosen once.",
|
||||
"Generating more ☮Faith will allow you to found a religion."
|
||||
],
|
||||
"uniques": ["Hidden when religion is disabled"]
|
||||
"uniques": ["Only available <when religion is enabled>"]
|
||||
},
|
||||
{
|
||||
"name": "Religion",
|
||||
@ -398,7 +398,7 @@
|
||||
"This will allow you to choose another follower belief, as well as an enhancer belief, that only applies to you.",
|
||||
"Do take care founding a religion soon, only about half the players in the game are able to found a religion!"
|
||||
],
|
||||
"uniques": ["Hidden when religion is disabled"]
|
||||
"uniques": ["Only available <when religion is enabled>"]
|
||||
},
|
||||
{
|
||||
"name": "Beliefs",
|
||||
@ -406,7 +406,7 @@
|
||||
"There are four types of beliefs: Pantheon, Founder, Follower and Enhancer beliefs.",
|
||||
"Pantheon and Follower beliefs apply to each city following your religion, while Founder and Enhancer beliefs only apply to the founder of a religion."
|
||||
],
|
||||
"uniques": ["Hidden when religion is disabled"]
|
||||
"uniques": ["Only available <when religion is enabled>"]
|
||||
},
|
||||
{
|
||||
"name": "Religion inside cities",
|
||||
@ -419,7 +419,7 @@
|
||||
"Based on this, you can get a feel for which religions have a lot of pressure built up in the city, and which have almost none.",
|
||||
"The city follows a religion if a majority of its population follows that religion, and will only then receive the effects of Follower and Pantheon beliefs of that religion."
|
||||
],
|
||||
"uniques": ["Hidden when religion is disabled"]
|
||||
"uniques": ["Only available <when religion is enabled>"]
|
||||
},
|
||||
{
|
||||
"name": "Spreading Religion",
|
||||
@ -441,7 +441,7 @@
|
||||
"Lastly, before founding a religion, new cities you settle will start with 200 pressure for your pantheon.",
|
||||
"This way, all your cities will starting following your pantheon as long as you haven't founded a religion yet."
|
||||
],
|
||||
"uniques": ["Hidden when religion is disabled"]
|
||||
"uniques": ["Only available <when religion is enabled>"]
|
||||
},
|
||||
{
|
||||
"name": "Inquisitors",
|
||||
@ -452,7 +452,7 @@
|
||||
"Often this results in the city immediately converting to their religion",
|
||||
"Additionally, when an inquisitor is stationed in or directly next to a city center, units of other religions cannot spread their faith there, though natural spread is uneffected."
|
||||
],
|
||||
"uniques": ["Hidden when religion is disabled"]
|
||||
"uniques": ["Only available <when religion is enabled>"]
|
||||
},
|
||||
{
|
||||
"name": "Maya Long Count calendar cycle",
|
||||
|
@ -142,6 +142,8 @@ object Conditionals {
|
||||
UniqueType.ConditionalVictoryDisabled -> checkOnGameInfo { !gameParameters.victoryTypes.contains(conditional.params[0]) }
|
||||
UniqueType.ConditionalReligionEnabled -> checkOnGameInfo { isReligionEnabled() }
|
||||
UniqueType.ConditionalReligionDisabled -> checkOnGameInfo { !isReligionEnabled() }
|
||||
UniqueType.ConditionalEspionageEnabled -> checkOnGameInfo { isEspionageEnabled() }
|
||||
UniqueType.ConditionalEspionageDisabled -> checkOnGameInfo { !isEspionageEnabled() }
|
||||
UniqueType.ConditionalTech -> checkOnCiv { tech.isResearched(conditional.params[0]) }
|
||||
UniqueType.ConditionalNoTech -> checkOnCiv { !tech.isResearched(conditional.params[0]) }
|
||||
UniqueType.ConditionalWhileResearching -> checkOnCiv { tech.currentTechnologyName() == conditional.params[0] }
|
||||
|
@ -102,6 +102,8 @@ interface IHasUniques : INamed {
|
||||
UniqueType.ConditionalSpeed,
|
||||
UniqueType.ConditionalReligionEnabled,
|
||||
UniqueType.ConditionalReligionDisabled,
|
||||
UniqueType.ConditionalEspionageEnabled,
|
||||
UniqueType.ConditionalEspionageDisabled,
|
||||
)
|
||||
val stateForConditionals = StateForConditionals(gameInfo = gameInfo)
|
||||
|
||||
|
@ -663,7 +663,8 @@ enum class UniqueType(
|
||||
ConditionalVictoryDisabled("when [victoryType] Victory is disabled", UniqueTarget.Conditional),
|
||||
ConditionalReligionEnabled("when religion is enabled", UniqueTarget.Conditional),
|
||||
ConditionalReligionDisabled("when religion is disabled", UniqueTarget.Conditional),
|
||||
|
||||
ConditionalEspionageEnabled("when espionage is enabled", UniqueTarget.Conditional),
|
||||
ConditionalEspionageDisabled("when espionage is disabled", UniqueTarget.Conditional),
|
||||
|
||||
/////// general conditionals
|
||||
ConditionalChance("with [amount]% chance", UniqueTarget.Conditional),
|
||||
@ -948,6 +949,7 @@ enum class UniqueType(
|
||||
UniqueTarget.Unit, UniqueTarget.Building, UniqueTarget.Ruins, UniqueTarget.Tutorial,
|
||||
flags = UniqueFlag.setOfHiddenToUsers),
|
||||
|
||||
@Deprecated("As of 4.13.19", ReplaceWith("Only available <when espionage is enabled>"))
|
||||
HiddenWithoutEspionage("Hidden when espionage is disabled", UniqueTarget.Building,
|
||||
flags = UniqueFlag.setOfHiddenToUsers),
|
||||
|
||||
|
@ -125,7 +125,7 @@ Some of the rewards ruins can give will have results that are not deterministic
|
||||
A few uniques can be added to ancient ruin effects to modify when they can be earned. These are:
|
||||
|
||||
- "Only available after [amount] turns"
|
||||
- "Hidden when religion is disabled"
|
||||
- "Only available <when religion is enabled>"
|
||||
- "Hidden after a great prophet has been earned"
|
||||
|
||||
## [Tileset-specific json](../../Creating-a-custom-tileset.md)
|
||||
|
@ -1550,9 +1550,6 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
|
||||
??? example "Cannot be hurried"
|
||||
Applicable to: Tech, Building
|
||||
|
||||
??? example "Hidden when espionage is disabled"
|
||||
Applicable to: Building
|
||||
|
||||
??? example "Will not be displayed in Civilopedia"
|
||||
Applicable to: Nation, Tech, Policy, FounderBelief, FollowerBelief, Building, Unit, UnitType, Promotion, Terrain, Improvement, Resource, Ruins, Speed, EventChoice
|
||||
|
||||
@ -2778,6 +2775,12 @@ If your mod renames Coast or Lakes, do not use this with one of these as paramet
|
||||
??? example "<when religion is disabled>"
|
||||
Applicable to: Conditional
|
||||
|
||||
??? example "<when espionage is enabled>"
|
||||
Applicable to: Conditional
|
||||
|
||||
??? example "<when espionage is disabled>"
|
||||
Applicable to: Conditional
|
||||
|
||||
??? example "<with [amount]% chance>"
|
||||
Example: "<with [3]% chance>"
|
||||
|
||||
|
Reference in New Issue
Block a user