mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 15:27:50 +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:
@ -139,8 +139,6 @@ class UnitAutomation{
|
|||||||
.filter { unit.currentMovement - it.value > 0.1 }
|
.filter { unit.currentMovement - it.value > 0.1 }
|
||||||
.map { it.key }
|
.map { it.key }
|
||||||
.filter { unit.canMoveTo(it) || it==unit.getTile() }
|
.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
|
for(reachableTile in tilesToAttackFrom){ // tiles we'll still have energy after we reach there
|
||||||
val tilesInAttackRange = if (unit.hasUnique("Indirect fire")) reachableTile.getTilesInDistance(rangeOfAttack)
|
val tilesInAttackRange = if (unit.hasUnique("Indirect fire")) reachableTile.getTilesInDistance(rangeOfAttack)
|
||||||
|
Reference in New Issue
Block a user