Generate tool bugfixes / Map edits / New blocks

This commit is contained in:
Anuken
2019-03-17 18:30:33 -04:00
parent 6dcf889ffe
commit 783f453da3
21 changed files with 1176 additions and 1056 deletions

View File

@@ -32,20 +32,18 @@ public abstract class FlyingUnit extends BaseUnit{
target = null;
}
if(target == null){
retarget(() -> {
targetClosest();
retarget(() -> {
targetClosest();
if(target == null) targetClosestEnemyFlag(BlockFlag.producer);
if(target == null) targetClosestEnemyFlag(BlockFlag.turret);
if(target == null) targetClosestEnemyFlag(BlockFlag.producer);
if(target == null) targetClosestEnemyFlag(BlockFlag.turret);
if(target == null){
setState(patrol);
}
});
if(target == null){
setState(patrol);
}
});
}else{
if(target != null){
attack(type.attackLength);
if((Angles.near(angleTo(target), rotation, type.shootCone) || getWeapon().ignoreRotation) //bombers and such don't care about rotation