Allow embarked units to attack land units, like in civ5.

This commit is contained in:
Duan Tao 2018-12-11 11:43:48 +08:00
parent 63f1f501cd
commit ed507ad063

View File

@ -139,8 +139,6 @@ class UnitAutomation{
.filter { unit.currentMovement - it.value > 0.1 }
.map { it.key }
.filter { unit.canMoveTo(it) || it==unit.getTile() }
if(unit.type.isLandUnit())
tilesToAttackFrom = tilesToAttackFrom.filter { it.getBaseTerrain().type==TerrainType.Land }
for(reachableTile in tilesToAttackFrom){ // tiles we'll still have energy after we reach there
val tilesInAttackRange = if (unit.hasUnique("Indirect fire")) reachableTile.getTilesInDistance(rangeOfAttack)