Fixed #8462
This commit is contained in:
@@ -323,6 +323,11 @@ public class SectorDamage{
|
|||||||
if(Structs.find(unit.abilities, a -> a instanceof RepairFieldAbility) instanceof RepairFieldAbility h){
|
if(Structs.find(unit.abilities, a -> a instanceof RepairFieldAbility) instanceof RepairFieldAbility h){
|
||||||
sumRps += h.amount / h.reload * 60f;
|
sumRps += h.amount / h.reload * 60f;
|
||||||
}
|
}
|
||||||
|
sumRps += unit.type.weapons.sumf(w -> w.shotsPerSec() * (w.bullet.healPercent * 60f + w.bullet.healAmount));
|
||||||
|
if(unit.canBuild()){
|
||||||
|
//assume it rebuilds 1 block with 'standard' build cost (20) and health (50) every 2 seconds
|
||||||
|
sumRps += unit.type.buildSpeed * (60f / 20f) * (1f / 2f) * 50f;
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
float bossMult = unit.isBoss() ? 3f : 1f;
|
float bossMult = unit.isBoss() ? 3f : 1f;
|
||||||
curEnemyDps += unit.type.dpsEstimate * unit.damageMultiplier() * bossMult;
|
curEnemyDps += unit.type.dpsEstimate * unit.damageMultiplier() * bossMult;
|
||||||
|
|||||||
@@ -173,6 +173,10 @@ public class Weapon implements Cloneable{
|
|||||||
return (bullet.estimateDPS() / reload) * shoot.shots * 60f;
|
return (bullet.estimateDPS() / reload) * shoot.shots * 60f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float shotsPerSec(){
|
||||||
|
return shoot.shots * 60f / reload;
|
||||||
|
}
|
||||||
|
|
||||||
//TODO copy-pasted code
|
//TODO copy-pasted code
|
||||||
public void drawOutline(Unit unit, WeaponMount mount){
|
public void drawOutline(Unit unit, WeaponMount mount){
|
||||||
if(!outlineRegion.found()) return;
|
if(!outlineRegion.found()) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user