Added victoryType conditionals (#11542)

This commit is contained in:
PLynx 2024-05-04 20:03:22 +02:00 committed by GitHub
parent 69b5e0c905
commit a13f71e654
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 0 deletions

View File

@ -196,6 +196,8 @@ object Conditionals {
UniqueType.ConditionalDuringEra -> compareEra(condition.params[0]) { current, param -> current == param }
UniqueType.ConditionalIfStartingInEra -> checkOnGameInfo { gameParameters.startingEra == condition.params[0] }
UniqueType.ConditionalSpeed -> checkOnGameInfo { gameParameters.speed == condition.params[0] }
UniqueType.ConditionalVictoryEnabled -> checkOnGameInfo { gameParameters.victoryTypes.contains(condition.params[0]) }
UniqueType.ConditionalVictoryDisabled-> checkOnGameInfo { !gameParameters.victoryTypes.contains(condition.params[0]) }
UniqueType.ConditionalTech -> checkOnCiv { tech.isResearched(condition.params[0]) }
UniqueType.ConditionalNoTech -> checkOnCiv { !tech.isResearched(condition.params[0]) }
UniqueType.ConditionalWhileResearching -> checkOnCiv { tech.currentTechnologyName() == condition.params[0] }

View File

@ -664,6 +664,8 @@ enum class UniqueType(
ConditionalIfStartingInEra("if starting in the [era]", UniqueTarget.Conditional),
ConditionalSpeed("on [speed] game speed", UniqueTarget.Conditional),
ConditionalVictoryEnabled("when [victoryType] Victory is enabled", UniqueTarget.Conditional),
ConditionalVictoryDisabled("when [victoryType] Victory is disabled", UniqueTarget.Conditional),
ConditionalFirstCivToResearch("if no other Civilization has researched this", UniqueTarget.Conditional),
ConditionalTech("after discovering [tech]", UniqueTarget.Conditional),

View File

@ -1997,6 +1997,16 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
Applicable to: Conditional
??? example "<when [victoryType] Victory is enabled>"
Example: "<when [Domination] Victory is enabled>"
Applicable to: Conditional
??? example "<when [victoryType] Victory is disabled>"
Example: "<when [Domination] Victory is disabled>"
Applicable to: Conditional
??? example "<if no other Civilization has researched this>"
Applicable to: Conditional