Minor AI fix

This commit is contained in:
Anuken 2024-09-14 09:43:30 -04:00
parent a15a0d945f
commit f0027a3eff

View File

@ -470,12 +470,16 @@ public class Pathfinder implements Runnable{
for(int attempt = 0; attempt < 5 && max > 0; attempt++){
var targets = indexer.getEnemy(team, randomTargets[rand.random(randomTargets.length - 1)]);
if(!targets.isEmpty()){
max --;
boolean any = false;
for(Building other : targets){
if((other.items != null && other.items.any()) || other.status() != BlockStatus.noInput){
out.add(other.tile.array());
any = true;
}
}
if(any){
max --;
}
}
}
}