mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 22:54:44 +07:00
Resolved #12611 - AI can move air units with "Cannot move" unique
This commit is contained in:
parent
e143c76d63
commit
43f8ba47a4
@ -584,6 +584,8 @@ class UnitMovement(val unit: MapUnit) {
|
||||
* Leave it as default unless you know what [canMoveTo] does.
|
||||
*/
|
||||
fun canMoveTo(tile: Tile, assumeCanPassThrough: Boolean = false, allowSwap: Boolean = false, includeOtherEscortUnit: Boolean = true): Boolean {
|
||||
if (unit.cache.cannotMove) return false
|
||||
|
||||
if (unit.baseUnit.movesLikeAirUnits)
|
||||
return canAirUnitMoveTo(tile, unit)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user