mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-20 17:32:57 +07:00
Merge pull request #330 from ninjatao/fix_embark_attack
Allow embarked units to attack land units, like in civ5.
This commit is contained in:
commit
6110fc1cd3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user