Status effect display for bullets

This commit is contained in:
Anuken
2021-03-10 16:42:28 -05:00
parent c15a8b52d2
commit 4b9fa9a79e
7 changed files with 28 additions and 23 deletions

View File

@@ -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;
}

View File

@@ -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

View File

@@ -19,6 +19,8 @@ public class LightningBulletType extends BulletType{
hitEffect = Fx.hitLancer;
keepVelocity = false;
hittable = false;
//for stats
status = StatusEffects.shocked;
}
@Override