mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +07:00
Add <every [positiveAmount] turns> Conditional unique (not TriggerCondition) (#10871)
* Added a ConditionalEveryTurns unique * Auto-generated the docs entry
This commit is contained in:
parent
aa18e826df
commit
1b6d75c4db
@ -221,6 +221,7 @@ class Unique(val text: String, val sourceObjectType: UniqueTarget? = null, val s
|
||||
UniqueType.ModifierHiddenFromUsers -> true // allowed to be attached to any Unique to hide it, no-op otherwise
|
||||
|
||||
UniqueType.ConditionalChance -> stateBasedRandom.nextFloat() < condition.params[0].toFloat() / 100f
|
||||
UniqueType.ConditionalEveryTurns -> checkOnCiv { gameInfo.turns % condition.params[0].toInt() == 0}
|
||||
UniqueType.ConditionalBeforeTurns -> checkOnCiv { gameInfo.turns < condition.params[0].toInt() }
|
||||
UniqueType.ConditionalAfterTurns -> checkOnCiv { gameInfo.turns >= condition.params[0].toInt() }
|
||||
|
||||
|
@ -601,6 +601,7 @@ enum class UniqueType(
|
||||
/////// general conditionals
|
||||
ConditionalTimedUnique("for [amount] turns", UniqueTarget.Conditional),
|
||||
ConditionalChance("with [amount]% chance", UniqueTarget.Conditional),
|
||||
ConditionalEveryTurns("every [positiveAmount] turns", UniqueTarget.Conditional),
|
||||
ConditionalBeforeTurns("before [amount] turns", UniqueTarget.Conditional),
|
||||
|
||||
ConditionalAfterTurns("after [amount] turns", UniqueTarget.Conditional),
|
||||
|
@ -1820,6 +1820,11 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
|
||||
|
||||
Applicable to: Conditional
|
||||
|
||||
??? example "<every [positiveAmount] turns>"
|
||||
Example: "<every [3] turns>"
|
||||
|
||||
Applicable to: Conditional
|
||||
|
||||
??? example "<before [amount] turns>"
|
||||
Example: "<before [3] turns>"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user