Merge pull request #3277 from MEEPofFaith/patch-1
Tractor Beam Status Effects
This commit is contained in:
@@ -30,6 +30,8 @@ public class TractorBeamTurret extends BaseTurret{
|
|||||||
public float damage = 0f;
|
public float damage = 0f;
|
||||||
public boolean targetAir = true, targetGround = false;
|
public boolean targetAir = true, targetGround = false;
|
||||||
public Color laserColor = Color.white;
|
public Color laserColor = Color.white;
|
||||||
|
public StatusEffect status = StatusEffects.none;
|
||||||
|
public float statusDuration = 300;
|
||||||
|
|
||||||
public TractorBeamTurret(String name){
|
public TractorBeamTurret(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@@ -99,6 +101,10 @@ public class TractorBeamTurret extends BaseTurret{
|
|||||||
target.damageContinuous(damage * efficiency());
|
target.damageContinuous(damage * efficiency());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(status != StatusEffects.none){
|
||||||
|
target.apply(status, statusDuration)
|
||||||
|
}
|
||||||
|
|
||||||
//shoot when possible
|
//shoot when possible
|
||||||
if(Angles.within(rotation, dest, shootCone)){
|
if(Angles.within(rotation, dest, shootCone)){
|
||||||
target.impulse(Tmp.v1.set(this).sub(target).limit((force + (1f - target.dst(this) / range) * scaledForce) * efficiency() * timeScale));
|
target.impulse(Tmp.v1.set(this).sub(target).limit((force + (1f - target.dst(this) / range) * scaledForce) * efficiency() * timeScale));
|
||||||
|
|||||||
Reference in New Issue
Block a user