diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 775af9c679..d2d9c3049d 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -3968,6 +3968,7 @@ public class Blocks{ hitColor = Pal.meltdownHit; status = StatusEffects.melting; drawSize = 420f; + timescaleDamage = true; incendChance = 0.4f; incendSpread = 5f; diff --git a/core/src/mindustry/entities/bullet/ContinuousBulletType.java b/core/src/mindustry/entities/bullet/ContinuousBulletType.java index 0f95881285..a9ea18876b 100644 --- a/core/src/mindustry/entities/bullet/ContinuousBulletType.java +++ b/core/src/mindustry/entities/bullet/ContinuousBulletType.java @@ -11,6 +11,8 @@ public class ContinuousBulletType extends BulletType{ public float damageInterval = 5f; public boolean largeHit = false; public boolean continuous = true; + /** If a building fired this, whether to multiply damage by its timescale. */ + public boolean timescaleDamage = false; { removeAfterPierce = false; @@ -79,7 +81,12 @@ public class ContinuousBulletType extends BulletType{ } public void applyDamage(Bullet b){ + float damage = b.damage; + if(timescaleDamage && b.owner instanceof Building build){ + b.damage *= build.timeScale(); + } Damage.collideLine(b, b.team, hitEffect, b.x, b.y, b.rotation(), currentLength(b), largeHit, laserAbsorb, pierceCap); + b.damage = damage; } public float currentLength(Bullet b){ diff --git a/core/src/mindustry/world/blocks/defense/turrets/LaserTurret.java b/core/src/mindustry/world/blocks/defense/turrets/LaserTurret.java index 2cbf82e0e9..6d3683958f 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/LaserTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/LaserTurret.java @@ -78,7 +78,7 @@ public class LaserTurret extends PowerTurret{ entry.bullet.set(bulletX, bulletY); entry.bullet.time = entry.bullet.type.lifetime * entry.bullet.type.optimalLifeFract; entry.bullet.keepAlive = true; - entry.life -= Time.delta / Math.max(efficiency, 0.00001f); + entry.life -= Time.delta * timeScale / Math.max(efficiency, 0.00001f); } wasShooting = true;