More #12522 edge case

This commit is contained in:
yairm210 2024-11-26 08:32:05 +02:00
parent 72329aec94
commit 7fbdfd13e5

View File

@ -333,7 +333,8 @@ object UnitAutomation {
}
if (unit.movement.canUnitSwapTo(retreatTile)) {
unit.movement.headTowards(retreatTile) // we need to move through the intermediate tiles
if (unit.currentTile.neighbors.contains(otherUnit.currentTile)) {
// if nothing changed
if (unit.currentTile.neighbors.contains(otherUnit.currentTile) && unit.movement.canUnitSwapTo(retreatTile)) {
unit.movement.swapMoveToTile(retreatTile)
}
return true