Added conditionals for religion state

This commit is contained in:
Yair Morgenstern 2023-02-23 23:05:42 +02:00
parent 1eba9bb4d9
commit 04cc091d94
2 changed files with 12 additions and 0 deletions

View File

@ -193,6 +193,14 @@ class Unique(val text: String, val sourceObjectType: UniqueTarget? = null, val s
state.civInfo != null && state.civInfo.religionManager.religionState == ReligionState.None
UniqueType.ConditionalAfterPantheon ->
state.civInfo != null && state.civInfo.religionManager.religionState != ReligionState.None
UniqueType.ConditionalBeforeReligion ->
state.civInfo != null && state.civInfo.religionManager.religionState < ReligionState.Religion
UniqueType.ConditionalAfterReligion ->
state.civInfo != null && state.civInfo.religionManager.religionState >= ReligionState.Religion
UniqueType.ConditionalBeforeEnhancingReligion ->
state.civInfo != null && state.civInfo.religionManager.religionState < ReligionState.EnhancedReligion
UniqueType.ConditionalAfterEnhancingReligion ->
state.civInfo != null && state.civInfo.religionManager.religionState >= ReligionState.EnhancedReligion
UniqueType.ConditionalBuildingBuilt ->
state.civInfo != null && state.civInfo.cities.any { it.cityConstructions.containsBuildingOrEquivalent(condition.params[0]) }

View File

@ -609,6 +609,10 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags:
ConditionalBeforePantheon("before founding a Pantheon", UniqueTarget.Conditional),
ConditionalAfterPantheon("after founding a Pantheon", UniqueTarget.Conditional),
ConditionalBeforeReligion("before founding a religion", UniqueTarget.Conditional),
ConditionalAfterReligion("after founding a religion", UniqueTarget.Conditional),
ConditionalBeforeEnhancingReligion("before enhancing a religion", UniqueTarget.Conditional),
ConditionalAfterEnhancingReligion("after enhancing a religion", UniqueTarget.Conditional),
ConditionalBuildingBuilt("if [buildingFilter] is constructed", UniqueTarget.Conditional),