Merge pull request #627 from ninjatao/invisible_submarine

Battle table no longer pops up when clicking on invisible submarines.
This commit is contained in:
Yair Morgenstern 2019-04-03 16:05:54 +03:00 committed by GitHub
commit 55860fb480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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