From 21581b43a0eaa3557fa026465f5d7bcb259dc20d Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 25 Jan 2024 00:12:40 +0200 Subject: [PATCH] CityCombatant.matchesFilter contains multifilter and civ filter --- core/src/com/unciv/logic/battle/CityCombatant.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/battle/CityCombatant.kt b/core/src/com/unciv/logic/battle/CityCombatant.kt index a50c35484b..62fe3db67f 100644 --- a/core/src/com/unciv/logic/battle/CityCombatant.kt +++ b/core/src/com/unciv/logic/battle/CityCombatant.kt @@ -1,5 +1,6 @@ package com.unciv.logic.battle +import com.unciv.logic.MultiFilter import com.unciv.logic.city.City import com.unciv.logic.civilization.Civilization import com.unciv.logic.map.tile.Tile @@ -23,7 +24,7 @@ class CityCombatant(val city: City) : ICombatant { override fun isDefeated(): Boolean = city.health == 1 override fun isInvisible(to: Civilization): Boolean = false override fun canAttack(): Boolean = city.canBombard() - override fun matchesFilter(filter: String) = filter == "City" || filter == "All" + override fun matchesFilter(filter: String) = MultiFilter.multiFilter(filter, {it == "City" || it == "All" || city.civ.matchesFilter(it)}) override fun getAttackSound() = UncivSound.Bombard override fun takeDamage(damage: Int) {