mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Fixed a bug where every improvement pretended to be a citadel (#5563)
This commit is contained in:
parent
cbfbec166b
commit
b2557de5d0
@ -1015,7 +1015,10 @@ class MapUnit {
|
||||
// Check for Citadel damage - note: 'Damage does not stack with other Citadels'
|
||||
val citadelTile = currentTile.neighbors
|
||||
.filter {
|
||||
it.getOwner() != null && civInfo.isAtWarWith(it.getOwner()!!) && it.improvement != null
|
||||
it.getOwner() != null
|
||||
&& it.improvement != null
|
||||
&& civInfo.isAtWarWith(it.getOwner()!!)
|
||||
&& it.getTileImprovement()!!.hasUnique(UniqueType.DamagesAdjacentEnemyUnits)
|
||||
}.maxByOrNull { tile ->
|
||||
tile.getTileImprovement()!!
|
||||
.getMatchingUniques(UniqueType.DamagesAdjacentEnemyUnits)
|
||||
|
Loading…
x
Reference in New Issue
Block a user