Resolved #8251 - units check if they can capture enemy units by whether they *will* be embarked, not by whether they *are* embarked

This commit is contained in:
Yair Morgenstern 2023-01-01 14:34:08 +02:00
parent ba7a9708e2
commit 96172c67d4

View File

@ -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