From 733db5035bc3f45c90674eb3bf3a78e0f70712d4 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 21 Sep 2026 19:53:52 -0400 Subject: [PATCH] Fixed sap bullets being able to pierce shields + placeholder balance adjustment for Eclipse lasers --- core/src/mindustry/content/UnitTypes.java | 1 + core/src/mindustry/entities/bullet/BulletType.java | 2 +- core/src/mindustry/entities/bullet/PointLaserBulletType.java | 2 +- core/src/mindustry/entities/bullet/SapBulletType.java | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index f8baafcc4f..ccd79f7211 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -1308,6 +1308,7 @@ public class UnitTypes{ sideLength = 80f; width = 25f; length = 230f; + shieldDamageMultiplier = 2f; shootEffect = Fx.shockwave; colors = new Color[]{Color.valueOf("ec7458aa"), Color.valueOf("ff9c5a"), Color.white}; }}; diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index ebc0ac6700..f83aad7fc0 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -66,7 +66,7 @@ public class BulletType extends Content implements Cloneable{ /** For piercing lasers, setting this to true makes it get absorbed by plastanium walls. */ public boolean laserAbsorb = true; /** Whether force shields absorb this bullet when it hits as a line, even if it isn't a laser. Used by rails. */ - public boolean shieldAbsorb = false; + public boolean shieldAbsorb = true; /** Whether this bullet is considered a laser bullet and thus absorbed by plastanium walls. */ public boolean laserBullet = false; /** Life fraction at which this bullet has the best range/damage/etc. Used for lasers and continuous turrets. */ diff --git a/core/src/mindustry/entities/bullet/PointLaserBulletType.java b/core/src/mindustry/entities/bullet/PointLaserBulletType.java index d33e001f96..b962cc3306 100644 --- a/core/src/mindustry/entities/bullet/PointLaserBulletType.java +++ b/core/src/mindustry/entities/bullet/PointLaserBulletType.java @@ -102,7 +102,7 @@ public class PointLaserBulletType extends BulletType{ @Override public float shieldDamage(Bullet b){ - return b.damage / damageInterval * Time.delta; + return b.damage / damageInterval * Time.delta * shieldDamageMultiplier; } @Override diff --git a/core/src/mindustry/entities/bullet/SapBulletType.java b/core/src/mindustry/entities/bullet/SapBulletType.java index 6bffa4588c..71834830ad 100644 --- a/core/src/mindustry/entities/bullet/SapBulletType.java +++ b/core/src/mindustry/entities/bullet/SapBulletType.java @@ -42,6 +42,7 @@ public class SapBulletType extends BulletType{ lightOpacity = 0.6f; statusDuration = 60f * 3f; impact = true; + shieldAbsorb = true; } @Override @@ -74,8 +75,10 @@ public class SapBulletType extends BulletType{ super.init(b); float len = Mathf.random(length, length + lengthRand); + len = Math.min(len, Damage.findShieldLength(b, len, false, true)); Healthc target = Damage.linecast(b, b.x, b.y, b.rotation(), len); + b.data = target; if(target != null){