From b91e1f418fc33915a761abb90bdc79152ab6245f Mon Sep 17 00:00:00 2001 From: Duan Tao Date: Thu, 13 Dec 2018 12:29:55 +0800 Subject: [PATCH] Fix attackable detection. --- core/src/com/unciv/logic/automation/UnitAutomation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/automation/UnitAutomation.kt b/core/src/com/unciv/logic/automation/UnitAutomation.kt index 07de925702..02ef49b8a7 100644 --- a/core/src/com/unciv/logic/automation/UnitAutomation.kt +++ b/core/src/com/unciv/logic/automation/UnitAutomation.kt @@ -121,7 +121,7 @@ class UnitAutomation{ //only submarine and destroyer can attack submarine if (tileCombatant.isInvisible() - && (!unit.hasUnique("Can attack submarines") || unit.civInfo.viewableInvisibleUnitsTiles.map { it.position }.contains(tile.position))){ + && (!unit.hasUnique("Can attack submarines") || !unit.civInfo.viewableInvisibleUnitsTiles.map { it.position }.contains(tile.position))){ return false } return true