Merge pull request #330 from ninjatao/fix_embark_attack

Allow embarked units to attack land units, like in civ5.
This commit is contained in:
yairm210 2018-12-11 21:34:56 +02:00 committed by GitHub
commit 6110fc1cd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)