Add Firerate Stat to Lustre and sublimate

This commit is contained in:
EggleEgg 2026-01-19 15:09:36 +01:00
parent 9150360f74
commit 144793592b
4 changed files with 5 additions and 8 deletions

View file

@ -427,7 +427,7 @@ public class BulletType extends Content implements Cloneable{
return Math.max(Mathf.zero(drag) ? speed * lifetime : speed * (1f - Mathf.pow(1f - drag, lifetime)) / drag, maxRange);
}
/** @return continuous damage in damage/sec, or -1 if not continuous. */
/** @return continuous damage interval per second, or -1 if not continuous. */
public float continuousDamage(){
return -1f;
}

View file

@ -32,7 +32,7 @@ public class ContinuousBulletType extends BulletType{
@Override
public float continuousDamage(){
if(!continuous) return -1f;
return damage / damageInterval * 60f;
return 60f / damageInterval;
}
@Override

View file

@ -47,7 +47,7 @@ public class PointLaserBulletType extends BulletType{
@Override
public float continuousDamage(){
return damage / damageInterval * 60f;
return 60f / damageInterval;
}
@Override

View file

@ -640,11 +640,8 @@ public class StatValues{
}
if(type.damage > 0 && (type.collides || type.splashDamage <= 0)){
if(type.continuousDamage() > 0){
bt.add(Core.bundle.format("bullet.damage", type.continuousDamage()) + StatUnit.perSecond.localized());
}else{
bt.add(Core.bundle.format("bullet.damage", type.damage));
}
bt.add(Core.bundle.format("bullet.damage", type.damage) + (type.continuousDamage() > 0 ?
"[lightgray] ~ [stat]" + Strings.autoFixed(type.continuousDamage(), 0) + "[lightgray] " + StatUnit.perSecond.localized() : ""));
}
if(type.buildingDamageMultiplier != 1){