More logic

This commit is contained in:
Anuken
2020-08-07 16:11:02 -04:00
parent 5040eacda7
commit a12211587c
25 changed files with 816 additions and 966 deletions

View File

@@ -75,16 +75,16 @@ public class TractorBeamTurret extends Block{
}
//look at target
if(target != null && target.within(this, range) && target.team() != team && target.type().flying){
if(target != null && target.within(this, range) && target.team() != team && target.type().flying && efficiency() > 0.01f){
any = true;
float dest = angleTo(target);
rotation = Angles.moveToward(rotation,dest, rotateSpeed * edelta());
rotation = Angles.moveToward(rotation, dest, rotateSpeed * edelta());
lastX = target.x;
lastY = target.y;
strength = Mathf.lerpDelta(strength, 1f, 0.1f);
if(damage > 0){
target.damageContinuous(damage);
target.damageContinuous(damage * efficiency());
}
//shoot when possible