diff --git a/core/src/com/unciv/logic/automation/UnitAutomation.kt b/core/src/com/unciv/logic/automation/UnitAutomation.kt index 1cc70aaf..8731cc67 100644 --- a/core/src/com/unciv/logic/automation/UnitAutomation.kt +++ b/core/src/com/unciv/logic/automation/UnitAutomation.kt @@ -60,7 +60,9 @@ class UnitAutomation{ .map { it.key } .filter { unit.canMoveTo(it) || it==unit.getTile() } for(reachableTile in tilesToAttackFrom){ // tiles we'll still have energy after we reach there - attackableTiles += reachableTile.getTilesInDistance(rangeOfAttack).filter { it in tilesWithEnemies } + val tilesInAttackRange = if (unit.hasUnique("Indirect fire")) reachableTile.getTilesInDistance(rangeOfAttack) + else reachableTile.getViewableTiles(rangeOfAttack) + attackableTiles += tilesInAttackRange.filter { it in tilesWithEnemies } .map { AttackableTile(reachableTile,it) } } return attackableTiles