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:
itanasi 2022-02-08 03:07:54 -08:00 committed by GitHub
parent 1420ad845c
commit 967b70a4b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()