mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 02:09:21 +07:00
Tech, policy, unit and terrain uniques provide multiplied uniques with "for every [countable]" / "for every [amount] [countable]" modifiers
This commit is contained in:
@ -268,6 +268,7 @@ class UniqueMap() : HashMap<String, ArrayList<Unique>>() {
|
||||
|
||||
fun getMatchingUniques(uniqueType: UniqueType, state: StateForConditionals) = getUniques(uniqueType)
|
||||
.filter { it.conditionalsApply(state) && !it.isTimedTriggerable }
|
||||
.flatMap { it.getMultiplied(state) }
|
||||
|
||||
fun getAllUniques() = this.asSequence().flatMap { it.value.asSequence() }
|
||||
|
||||
|
Reference in New Issue
Block a user