mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -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'
|
// Check for Citadel damage - note: 'Damage does not stack with other Citadels'
|
||||||
val citadelTile = currentTile.neighbors
|
val citadelTile = currentTile.neighbors
|
||||||
.filter {
|
.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 ->
|
}.maxByOrNull { tile ->
|
||||||
tile.getTileImprovement()!!
|
tile.getTileImprovement()!!
|
||||||
.getMatchingUniques(UniqueType.DamagesAdjacentEnemyUnits)
|
.getMatchingUniques(UniqueType.DamagesAdjacentEnemyUnits)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user