mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 21:03:15 -04:00
Sea Unit can't capture Land Civilian (and vice versa) (#6128)
* Relevant Code * Negate check Co-authored-by: itanasi <spellman23@gmail.com>
This commit is contained in:
parent
1420ad845c
commit
967b70a4b9
@ -47,6 +47,8 @@ object BattleHelper {
|
||||
// DO NOT use "!unit.movement.canPassThrough(it)" since then we won't be able to
|
||||
// capture enemy units since we can't move through them!
|
||||
&& !it.canCivPassThrough(unit.civInfo)
|
||||
// Land Unit can't capture Naval and vice versa
|
||||
&& !(unit.type.isLandUnit() && it.isWater || unit.type.isWaterUnit() && it.isLand)
|
||||
}
|
||||
|
||||
val rangeOfAttack = unit.getRange()
|
||||
|
Loading…
x
Reference in New Issue
Block a user