mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-21 01:37:13 +07:00
Fixed wave simulation estimation
This commit is contained in:
parent
8fae99e780
commit
8f2e1163dd
@ -217,7 +217,7 @@ public class BulletType extends Content implements Cloneable{
|
||||
/** Use a negative value to disable homing delay. */
|
||||
public float homingDelay = -1f;
|
||||
|
||||
/** Range of healing bock suppression effect. */
|
||||
/** Range of healing block suppression effect. */
|
||||
public float suppressionRange = -1f;
|
||||
/** Duration of healing block suppression effect. */
|
||||
public float suppressionDuration = 60f * 8f;
|
||||
|
@ -281,10 +281,10 @@ public class SectorDamage{
|
||||
float avgHealth = totalPathBuild <= 1 ? sumHealth : sumHealth / totalPathBuild;
|
||||
|
||||
//block dps + regen + extra health/shields
|
||||
for(Building build : Groups.build){
|
||||
float e = build.efficiency;
|
||||
for(Building build : state.rules.defaultTeam.data().buildings){
|
||||
float e = build.potentialEfficiency;
|
||||
if(e > 0.08f){
|
||||
if(build.team == state.rules.defaultTeam && build instanceof Ranged ranged && sparse.contains(t -> t.within(build, ranged.range() + 4*tilesize))){
|
||||
if(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 instanceof TurretBuild b && b.hasAmmo()){
|
||||
sumDps += b.estimateDps();
|
||||
@ -296,7 +296,7 @@ public class SectorDamage{
|
||||
|
||||
//point defense turrets act as flat health right now
|
||||
if(build.block instanceof PointDefenseTurret){
|
||||
sumHealth += 150f * build.timeScale() * build.efficiency;
|
||||
sumHealth += 150f * build.timeScale() * build.potentialEfficiency;
|
||||
}
|
||||
|
||||
if(build.block instanceof ForceProjector f){
|
||||
|
@ -183,7 +183,7 @@ public class Turret extends ReloadTurret{
|
||||
|
||||
public float estimateDps(){
|
||||
if(!hasAmmo()) return 0f;
|
||||
return shoot.shots / reload * 60f * peekAmmo().estimateDPS() * efficiency * timeScale;
|
||||
return shoot.shots / reload * 60f * peekAmmo().estimateDPS() * potentialEfficiency * timeScale;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user