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);
|
||||||
@@ -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)){
|
||||||
|
|||||||
Reference in New Issue
Block a user