Added a conditional for WLTKD (#7830)

This commit is contained in:
Xander Lenstra 2022-09-23 07:34:47 +02:00 committed by GitHub
parent 77a1f4a6c1
commit 14d253fe24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -17,8 +17,9 @@ class GlobalUniques: RulesetObject() {
UniqueType.ConditionalGoldenAge -> "Golden Age"
UniqueType.ConditionalHappy -> "Happiness"
UniqueType.ConditionalBetweenHappiness, UniqueType.ConditionalBelowHappiness -> "Unhappiness"
UniqueType.ConditionalWLTKD -> "We Love The King Day"
else -> "Global Effect"
}
}
}
}
}

View File

@ -157,6 +157,8 @@ class Unique(val text: String, val sourceObjectType: UniqueTarget? = null, val s
state.civInfo != null && state.civInfo.happinessForNextTurn < condition.params[0].toInt()
UniqueType.ConditionalGoldenAge ->
state.civInfo != null && state.civInfo.goldenAges.isGoldenAge()
UniqueType.ConditionalWLTKD ->
state.cityInfo != null && state.cityInfo.isWeLoveTheKingDayActive()
UniqueType.ConditionalBeforeEra ->
state.civInfo != null && state.civInfo.getEraNumber() < ruleset().eras[condition.params[0]]!!.eraNumber
UniqueType.ConditionalStartingFromEra ->

View File

@ -602,6 +602,7 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags:
ConditionalWar("when at war", UniqueTarget.Conditional),
ConditionalNotWar("when not at war", UniqueTarget.Conditional),
ConditionalGoldenAge("during a Golden Age", UniqueTarget.Conditional),
ConditionalWLTKD("during We Love The King Day", UniqueTarget.Conditional),
ConditionalHappy("while the empire is happy", UniqueTarget.Conditional),
ConditionalBetweenHappiness("when between [amount] and [amount] Happiness", UniqueTarget.Conditional),