From b368b32cd1c859b1e7e94fce796bae343ea4eea6 Mon Sep 17 00:00:00 2001 From: Duan Tao Date: Wed, 3 Apr 2019 19:18:21 +0800 Subject: [PATCH] Battle table no longer pops up when clicking on invisible submarines. --- core/src/com/unciv/ui/worldscreen/bottombar/BattleTable.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/com/unciv/ui/worldscreen/bottombar/BattleTable.kt b/core/src/com/unciv/ui/worldscreen/bottombar/BattleTable.kt index a7438a9b5f..53509031b5 100644 --- a/core/src/com/unciv/ui/worldscreen/bottombar/BattleTable.kt +++ b/core/src/com/unciv/ui/worldscreen/bottombar/BattleTable.kt @@ -56,6 +56,13 @@ class BattleTable(val worldScreen: WorldScreen): Table() { hide() return } + + if(defender.isInvisible() + && attacker.getCivInfo().viewableInvisibleUnitsTiles.contains(selectedTile)) { + hide() + return + } + simulateBattle(attacker, defender) }