diff --git a/core/src/com/unciv/models/ruleset/unique/Unique.kt b/core/src/com/unciv/models/ruleset/unique/Unique.kt index 1d1a435e48..4b230b4b99 100644 --- a/core/src/com/unciv/models/ruleset/unique/Unique.kt +++ b/core/src/com/unciv/models/ruleset/unique/Unique.kt @@ -176,11 +176,14 @@ class Unique(val text: String, val sourceObjectType: UniqueTarget? = null, val s UniqueType.ConditionalWLTKD -> state.city != null && state.city.isWeLoveTheKingDayActive() UniqueType.ConditionalBeforeEra -> - state.civInfo != null && state.civInfo.getEraNumber() < ruleset().eras[condition.params[0]]!!.eraNumber + state.civInfo != null && ruleset().eras.containsKey(condition.params[0]) + && state.civInfo.getEraNumber() < ruleset().eras[condition.params[0]]!!.eraNumber UniqueType.ConditionalStartingFromEra -> - state.civInfo != null && state.civInfo.getEraNumber() >= ruleset().eras[condition.params[0]]!!.eraNumber + state.civInfo != null && ruleset().eras.containsKey(condition.params[0]) + && state.civInfo.getEraNumber() >= ruleset().eras[condition.params[0]]!!.eraNumber UniqueType.ConditionalDuringEra -> - state.civInfo != null && state.civInfo.getEraNumber() == ruleset().eras[condition.params[0]]!!.eraNumber + state.civInfo != null && ruleset().eras.containsKey(condition.params[0]) + && state.civInfo.getEraNumber() == ruleset().eras[condition.params[0]]!!.eraNumber UniqueType.ConditionalIfStartingInEra -> state.civInfo != null && state.civInfo.gameInfo.gameParameters.startingEra == condition.params[0] UniqueType.ConditionalTech ->