mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 05:51:12 +07:00
Added victoryType conditionals (#11542)
This commit is contained in:
parent
69b5e0c905
commit
a13f71e654
@ -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] }
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user