From 967b70a4b9a54d36995f3c83063a145f1ff332d0 Mon Sep 17 00:00:00 2001 From: itanasi <44038014+itanasi@users.noreply.github.com> Date: Tue, 8 Feb 2022 03:07:54 -0800 Subject: [PATCH] Sea Unit can't capture Land Civilian (and vice versa) (#6128) * Relevant Code * Negate check Co-authored-by: itanasi --- core/src/com/unciv/logic/automation/BattleHelper.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/com/unciv/logic/automation/BattleHelper.kt b/core/src/com/unciv/logic/automation/BattleHelper.kt index dbc790c6a8..ff92538e5b 100644 --- a/core/src/com/unciv/logic/automation/BattleHelper.kt +++ b/core/src/com/unciv/logic/automation/BattleHelper.kt @@ -47,6 +47,8 @@ object BattleHelper { // DO NOT use "!unit.movement.canPassThrough(it)" since then we won't be able to // capture enemy units since we can't move through them! && !it.canCivPassThrough(unit.civInfo) + // Land Unit can't capture Naval and vice versa + && !(unit.type.isLandUnit() && it.isWater || unit.type.isWaterUnit() && it.isLand) } val rangeOfAttack = unit.getRange()