Merge remote-tracking branch 'upstream/master' into ground-support-heal

This commit is contained in:
Leonwang4234
2020-10-16 08:49:55 -07:00
76 changed files with 968 additions and 476 deletions
@@ -139,6 +139,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;