Merge pull request #3277 from MEEPofFaith/patch-1

Tractor Beam Status Effects
This commit is contained in:
Anuken
2020-11-06 13:25:58 -05:00
committed by GitHub

View File

@@ -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);
@@ -98,6 +100,10 @@ public class TractorBeamTurret extends BaseTurret{
if(damage > 0){ if(damage > 0){
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)){