From 87ff876db36c306788e9c73fb6fa71d01e029d4f Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 5 Sep 2021 18:00:16 -0400 Subject: [PATCH] Take block timeScale into account for sector damage --- core/src/mindustry/maps/SectorDamage.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/maps/SectorDamage.java b/core/src/mindustry/maps/SectorDamage.java index 5ee6e1f15a..2b1c9995e3 100644 --- a/core/src/mindustry/maps/SectorDamage.java +++ b/core/src/mindustry/maps/SectorDamage.java @@ -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; } }