mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 02:42:16 -04:00
Don't random-walk to tiles that have units in them!
This commit is contained in:
parent
b59e235df5
commit
af47880f48
@ -150,8 +150,13 @@ class GameInfo {
|
||||
continue
|
||||
}
|
||||
|
||||
if(unit.health < 100){
|
||||
healUnit()
|
||||
continue
|
||||
}
|
||||
|
||||
// else, go to a random space
|
||||
unit.moveToTile(distanceToTiles.keys.toList().getRandom())
|
||||
unit.moveToTile(distanceToTiles.keys.filter { it.unit==null }.toList().getRandom())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user