mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-24 05:31:22 +07:00
Fixed a bug where crosshairs are everywhere with the 'attack when embarked' unique (#6507)
This commit is contained in:
parent
a2a8c0aab5
commit
c45885c763
@ -91,9 +91,10 @@ object BattleHelper {
|
||||
}
|
||||
|
||||
fun containsAttackableEnemy(tile: TileInfo, combatant: ICombatant): Boolean {
|
||||
if (combatant is MapUnitCombatant && combatant.unit.isEmbarked()) {
|
||||
if (combatant is MapUnitCombatant && combatant.unit.isEmbarked() && !combatant.hasUnique(UniqueType.AttackOnSea)) {
|
||||
// Can't attack water units while embarked, only land
|
||||
if (tile.isWater || combatant.isRanged()) return combatant.hasUnique(UniqueType.AttackOnSea)
|
||||
if (tile.isWater || combatant.isRanged())
|
||||
return false
|
||||
}
|
||||
|
||||
val tileCombatant = Battle.getMapCombatantOfTile(tile) ?: return false
|
||||
|
Loading…
Reference in New Issue
Block a user