Fix point defense weapons ignore damage multiplier (#8922)

This commit is contained in:
南门阳德
2023-08-12 23:40:25 +08:00
committed by GitHub
parent 7999eb4c4d
commit a7e8dd126e
2 changed files with 11 additions and 4 deletions

View File

@@ -14,6 +14,8 @@ import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.world.meta.*;
import static mindustry.Vars.*;
public class PointDefenseTurret extends ReloadTurret{
public final int timerTarget = timers++;
public float retargetTime = 5f;
@@ -80,8 +82,9 @@ public class PointDefenseTurret extends ReloadTurret{
//shoot when possible
if(Angles.within(rotation, dest, shootCone) && reloadCounter >= reload){
if(target.damage() > bulletDamage){
target.damage(target.damage() - bulletDamage);
float realDamage = bulletDamage * state.rules.blockDamage(team);
if(target.damage() > realDamage){
target.damage(target.damage() - realDamage);
}else{
target.remove();
}