Take block timeScale into account for sector damage

This commit is contained in:
Anuken 2021-09-05 18:00:16 -04:00
parent e35d09fe62
commit 87ff876db3

View File

@ -272,16 +272,22 @@ public class SectorDamage{
float e = build.efficiency();
if(e > 0.08f){
if(build.team == state.rules.defaultTeam && build instanceof Ranged ranged && sparse.contains(t -> t.within(build, ranged.range() + 4*tilesize))){
//TODO make sure power turret network supports the turrets?
if(build.block instanceof Turret t && build instanceof TurretBuild b && b.hasAmmo()){
sumDps += t.shots / t.reloadTime * 60f * b.peekAmmo().estimateDPS() * e;
sumDps += t.shots / t.reloadTime * 60f * b.peekAmmo().estimateDPS() * e * build.timeScale;
}
if(build.block instanceof MendProjector m){
sumRps += m.healPercent / m.reload * avgHealth * 60f / 100f * e;
sumRps += m.healPercent / m.reload * avgHealth * 60f / 100f * e * build.timeScale;
}
//point defense turrets act as flat health right now
if(build.block instanceof PointDefenseTurret && build.consValid()){
sumHealth += 150f * build.timeScale;
}
if(build.block instanceof ForceProjector f){
sumHealth += f.shieldHealth * e;
sumHealth += f.shieldHealth * e * build.timeScale;
sumRps += e;
}
}