diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index 7ba70efb22..66abd4791d 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -212,6 +212,10 @@ class GameInfo : IsPartOfGameInfoSerialization, HasGameInfoSerializationVersion return !religionDisabledByRuleset && gameParameters.religionEnabled } + fun isEspionageEnabled(): Boolean { + return gameParameters.espionageEnabled + } + private fun getEquivalentTurn(): Int { val totalTurns = speed.numTotalTurns() val startPercent = ruleSet.eras[gameParameters.startingEra]!!.startPercent @@ -540,6 +544,7 @@ class GameInfo : IsPartOfGameInfoSerialization, HasGameInfoSerializationVersion //endregion fun asPreview() = GameInfoPreview(this) + } /** diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt b/core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt index 7ed607bd6c..aa9526cb56 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt @@ -479,6 +479,7 @@ object UniqueTriggerActivation { OneTimeGlobalSpiesWhenEnteringEra -> { if (!civInfo.isMajorCiv()) return false + if (!civInfo.gameInfo.isEspionageEnabled()) return false val currentEra = civInfo.getEra().name for (otherCiv in civInfo.gameInfo.getAliveMajorCivs()) { if (currentEra !in otherCiv.espionageManager.erasSpyEarnedFor) { diff --git a/docs/Modders/uniques.md b/docs/Modders/uniques.md index fad9d89311..c8fde307a4 100644 --- a/docs/Modders/uniques.md +++ b/docs/Modders/uniques.md @@ -808,6 +808,9 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl ??? example "Every major Civilization gains a spy once a civilization enters this era" Applicable to: Era +??? example "Every major Civilization gains a spy once a civilization enters this era" + Applicable to: Era + ## Tech uniques ??? example "Starting tech" Applicable to: Tech @@ -1887,4 +1890,4 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl *[stats]: For example: `+2 Production, +3 Food`. Note that the stat names need to be capitalized! *[tech]: The name of any tech. *[tileFilter]: Anything that can be used either in an improvementFilter or in a terrainFilter can be used here, plus 'unimproved' -*[victoryType]: The name of any victory type: 'Neutral', 'Cultural', 'Diplomatic', 'Domination', 'Scientific', 'Time' \ No newline at end of file +*[victoryType]: The name of any victory type: 'Neutral', 'Cultural', 'Diplomatic', 'Domination', 'Scientific', 'Time'