Status effect display for bullets
This commit is contained in:
@@ -161,6 +161,11 @@ public abstract class BulletType extends Content{
|
||||
return Math.max(speed * lifetime * (1f - drag), maxRange);
|
||||
}
|
||||
|
||||
/** @return continuous damage in damage/sec, or -1 if not continuous. */
|
||||
public float continuousDamage(){
|
||||
return -1f;
|
||||
}
|
||||
|
||||
public boolean testCollision(Bullet bullet, Building tile){
|
||||
return healPercent <= 0.001f || tile.team != bullet.team || tile.healthf() < 1f;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,11 @@ public class ContinuousLaserBulletType extends BulletType{
|
||||
this(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float continuousDamage(){
|
||||
return damage / 5f * 60f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float estimateDPS(){
|
||||
//assume firing duration is about 100 by default, may not be accurate there's no way of knowing in this method
|
||||
|
||||
@@ -19,6 +19,8 @@ public class LightningBulletType extends BulletType{
|
||||
hitEffect = Fx.hitLancer;
|
||||
keepVelocity = false;
|
||||
hittable = false;
|
||||
//for stats
|
||||
status = StatusEffects.shocked;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user