mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 16:54:24 +07:00
Allow combatantFilter for cities to use cityFilter
This commit is contained in:
parent
eb984f06dc
commit
a9c367907d
@ -24,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) = MultiFilter.multiFilter(filter, {it == "City" || it == "All" || city.civ.matchesFilter(it)})
|
||||
override fun matchesFilter(filter: String) = MultiFilter.multiFilter(filter, {it == "City" || it == "All" || city.matchesFilter(it)})
|
||||
override fun getAttackSound() = UncivSound.Bombard
|
||||
|
||||
override fun takeDamage(damage: Int) {
|
||||
|
@ -86,8 +86,9 @@ enum class UniqueParameterType(
|
||||
UniqueType.UniqueParameterErrorSeverity? = getErrorSeverityForFilter(parameterText, ruleset)
|
||||
|
||||
override fun isKnownValue(parameterText: String, ruleset: Ruleset): Boolean {
|
||||
if (parameterText == "City") return true // MapUnitFilter covers CivFilter
|
||||
if (parameterText == "City") return true
|
||||
if (MapUnitFilter.isKnownValue(parameterText, ruleset)) return true
|
||||
if (CityFilter.isKnownValue(parameterText, ruleset)) return true
|
||||
return false
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user