Make submarine only attack water tiles.

This commit is contained in:
Duan Tao 2018-12-13 18:36:35 +08:00
parent ac241d2744
commit a9249ede0c

View File

@ -114,6 +114,7 @@ class UnitAutomation{
if(unit.type.isRanged()) return false
if(tile.isWater()) return false // can't attack water units while embarked, only land
}
if (unit.hasUnique("Can only attack water") && tile.isLand()) return false
val tileCombatant = Battle(unit.civInfo.gameInfo).getMapCombatantOfTile(tile)
if(tileCombatant==null) return false
if(tileCombatant.getCivilization()==unit.civInfo ) return false