mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-05 21:11:35 +07:00
CityCombatant.matchesFilter contains multifilter and civ filter
This commit is contained in:
parent
414a11a2d6
commit
21581b43a0
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user