mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 02:37:12 +07:00
Fixed #8462
This commit is contained in:
parent
c267743874
commit
c5c65d4475
@ -323,6 +323,11 @@ public class SectorDamage{
|
||||
if(Structs.find(unit.abilities, a -> a instanceof RepairFieldAbility) instanceof RepairFieldAbility h){
|
||||
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{
|
||||
float bossMult = unit.isBoss() ? 3f : 1f;
|
||||
curEnemyDps += unit.type.dpsEstimate * unit.damageMultiplier() * bossMult;
|
||||
|
@ -173,6 +173,10 @@ public class Weapon implements Cloneable{
|
||||
return (bullet.estimateDPS() / reload) * shoot.shots * 60f;
|
||||
}
|
||||
|
||||
public float shotsPerSec(){
|
||||
return shoot.shots * 60f / reload;
|
||||
}
|
||||
|
||||
//TODO copy-pasted code
|
||||
public void drawOutline(Unit unit, WeaponMount mount){
|
||||
if(!outlineRegion.found()) return;
|
||||
|
Loading…
Reference in New Issue
Block a user