mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-30 17:34:57 +07:00
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:
parent
ba7a9708e2
commit
96172c67d4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user