mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 20:29:06 +07:00
Take block timeScale into account for sector damage
This commit is contained in:
parent
e35d09fe62
commit
87ff876db3
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user