From 96172c67d4171157a4999ad9e235f478678147bc Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 1 Jan 2023 14:34:08 +0200 Subject: [PATCH] Resolved #8251 - units check if they can capture enemy units by whether they *will* be embarked, not by whether they *are* embarked --- core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt index 0523e7d742..0332dbbe63 100644 --- a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt +++ b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt @@ -706,7 +706,7 @@ class UnitMovementAlgorithms(val unit: MapUnit) { if (firstUnit != null && unit.civInfo != firstUnit.civInfo) { // Allow movement through unguarded, at-war Civilian Unit. Capture on the way // But not for Embarked Units capturing on Water - if (!(unit.isEmbarked() && tile.isWater) + if (!(unit.baseUnit.isLandUnit() && tile.isWater) && firstUnit.isCivilian() && unit.civInfo.isAtWarWith(firstUnit.civInfo)) return true // Cannot enter hostile tile with any unit in there