mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 21:34:39 +07:00
Add two population-related conditional uniques (#12258)
* Added the Conditional Below Population * Added the Conditional Between Population
This commit is contained in:
parent
7fbd8a194b
commit
5d1c05d8e4
@ -195,6 +195,10 @@ object Conditionals {
|
||||
checkOnCity { population.getPopulationFilterAmount(conditional.params[1]) >= conditional.params[0].toInt() }
|
||||
UniqueType.ConditionalExactPopulationFilter ->
|
||||
checkOnCity { population.getPopulationFilterAmount(conditional.params[1]) == conditional.params[0].toInt() }
|
||||
UniqueType.ConditionalBetweenPopulationFilter ->
|
||||
checkOnCity {population.getPopulationFilterAmount(conditional.params[2]) in conditional.params[0].toInt()..conditional.params[1].toInt() }
|
||||
UniqueType.ConditionalBelowPopulationFilter ->
|
||||
checkOnCity { population.getPopulationFilterAmount(conditional.params[1]) < conditional.params[0].toInt() }
|
||||
UniqueType.ConditionalWhenGarrisoned ->
|
||||
checkOnCity { getCenterTile().militaryUnit?.canGarrison() == true }
|
||||
|
||||
|
@ -729,6 +729,8 @@ enum class UniqueType(
|
||||
ConditionalCityWithoutBuilding("in cities without a [buildingFilter]", UniqueTarget.Conditional),
|
||||
ConditionalPopulationFilter("in cities with at least [amount] [populationFilter]", UniqueTarget.Conditional),
|
||||
ConditionalExactPopulationFilter("in cities with [amount] [populationFilter]", UniqueTarget.Conditional),
|
||||
ConditionalBetweenPopulationFilter("in cities with between [amount] and [amount] [populationFilter]", UniqueTarget.Conditional),
|
||||
ConditionalBelowPopulationFilter("in cities with less than [amount] [populationFilter]", UniqueTarget.Conditional),
|
||||
ConditionalWhenGarrisoned("with a garrison", UniqueTarget.Conditional),
|
||||
|
||||
/////// unit conditionals
|
||||
|
@ -3005,6 +3005,16 @@ If your mod renames Coast or Lakes, do not use this with one of these as paramet
|
||||
|
||||
Applicable to: Conditional
|
||||
|
||||
??? example "<in cities with between [amount] and [amount] [populationFilter]>"
|
||||
Example: "<in cities with between [3] and [3] [Followers of this Religion]>"
|
||||
|
||||
Applicable to: Conditional
|
||||
|
||||
??? example "<in cities with less than [amount] [populationFilter]>"
|
||||
Example: "<in cities with less than [3] [Followers of this Religion]>"
|
||||
|
||||
Applicable to: Conditional
|
||||
|
||||
??? example "<with a garrison>"
|
||||
Applicable to: Conditional
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user