diff --git a/core/src/com/unciv/logic/battle/BattleDamage.kt b/core/src/com/unciv/logic/battle/BattleDamage.kt index 56592f3c1d..9a5301a9b2 100644 --- a/core/src/com/unciv/logic/battle/BattleDamage.kt +++ b/core/src/com/unciv/logic/battle/BattleDamage.kt @@ -60,7 +60,8 @@ object BattleDamage { } } - for (unique in adjacentUnits.flatMap { it.getMatchingUniques("[]% Strength for enemy [] units in adjacent [] tiles") }) + for (unique in adjacentUnits.filter { it.civInfo.isAtWarWith(combatant.getCivInfo()) } + .flatMap { it.getMatchingUniques("[]% Strength for enemy [] units in adjacent [] tiles") }) if (combatant.matchesCategory(unique.params[1]) && combatant.getTile().matchesFilter(unique.params[2])) modifiers.add("Adjacent enemy units", unique.params[0].toInt()) diff --git a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt index 34672f01ef..b816bda563 100644 --- a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt +++ b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt @@ -546,7 +546,8 @@ class UnitMovementAlgorithms(val unit:MapUnit) { class PathsToTilesWithinTurn : LinkedHashMap() { fun getPathToTile(tile: TileInfo): List { - if (!containsKey(tile)) throw Exception("Can't reach this tile!") + if (!containsKey(tile)) + throw Exception("Can't reach this tile!") val reversePathList = ArrayList() var currentTile = tile while (get(currentTile)!!.parentTile != currentTile) {