Unit factory tweaks / AI fixes

This commit is contained in:
Anuken
2020-05-01 20:38:12 -04:00
parent 35bd6a40c5
commit 39f6bc30b7
4 changed files with 31 additions and 11 deletions

View File

@@ -30,16 +30,16 @@ public class GroundAI extends AIController{
Tilec core = unit.closestEnemyCore();
if(core == null) return;
if(core != null){
float dst = unit.dst(core);
float dst = unit.dst(core);
if(dst < unit.range() / 1.1f){
target = core;
}
if(dst < unit.range() / 1.1f){
target = core;
}
if(dst > unit.range() * 0.5f){
moveToCore(PathTarget.enemyCores);
if(dst > unit.range() * 0.5f){
moveToCore(PathTarget.enemyCores);
}
}
boolean rotate = false, shoot = false;