too many things to list
This commit is contained in:
@@ -137,6 +137,15 @@ public abstract class BulletType extends Content{
|
||||
this(1f, 1f);
|
||||
}
|
||||
|
||||
/** @return estimated damage per shot. this can be very inaccurate. */
|
||||
public float estimateDPS(){
|
||||
float sum = damage + splashDamage*0.75f;
|
||||
if(fragBullet != null && fragBullet != this){
|
||||
sum += fragBullet.estimateDPS() * fragBullets / 2f;
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
/** Returns maximum distance the bullet this bullet type has can travel. */
|
||||
public float range(){
|
||||
return Math.max(speed * lifetime * (1f - drag), range);
|
||||
|
||||
@@ -44,6 +44,12 @@ public class ContinuousLaserBulletType extends BulletType{
|
||||
this(0);
|
||||
}
|
||||
|
||||
@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
|
||||
return damage * 100f / 5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float range(){
|
||||
return length;
|
||||
|
||||
Reference in New Issue
Block a user