Fix attackable detection.

This commit is contained in:
Duan Tao 2018-12-13 12:29:55 +08:00
parent 11871991d3
commit b91e1f418f

View File

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