From fa9a40e601c6dfe5d6ef0cddd44d8a8f40e97871 Mon Sep 17 00:00:00 2001 From: Shade Date: Sun, 3 May 2026 10:21:11 +0800 Subject: [PATCH 1/2] ArmorMultiplier now correctly works on splash --- core/src/mindustry/entities/Damage.java | 7 ++++++- core/src/mindustry/entities/bullet/BulletType.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index e714b410ed..30caef3d45 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -498,6 +498,11 @@ public class Damage{ /** Damages all entities and blocks in a radius that are enemies of the team. */ public static void damage(Team team, float x, float y, float radius, float damage, boolean complete, boolean air, boolean ground, boolean scaled, @Nullable Bullet source){ + damage(team, x, y, radius, damage, complete, air, ground, scaled, source, 1); + } + + /** Damages all entities and blocks in a radius that are enemies of the team. */ + public static void damage(Team team, float x, float y, float radius, float damage, boolean complete, boolean air, boolean ground, boolean scaled, @Nullable Bullet source, float armorMult){ Cons cons = unit -> { if(unit.team == team || !unit.checkTarget(air, ground) || !unit.hittable() || !unit.within(x, y, radius + (scaled ? unit.hitSize / 2f : 0f))){ return; @@ -506,7 +511,7 @@ public class Damage{ boolean dead = unit.dead; float amount = calculateDamage(scaled ? Math.max(0, unit.dst(x, y) - unit.type.hitSize/2) : unit.dst(x, y), radius, damage); - unit.damage(amount); + unit.damageArmorMult(amount, armorMult); if(source != null){ Events.fire(bulletDamageEvent.set(unit, source)); diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 10d99f323c..9651988275 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -592,7 +592,7 @@ public class BulletType extends Content implements Cloneable{ public void createSplashDamage(Bullet b, float x, float y){ if(splashDamageRadius > 0 && !b.absorbed){ - Damage.damage(b.team, x, y, splashDamageRadius, splashDamage * b.damageMultiplier(), splashDamagePierce, collidesAir, collidesGround, scaledSplashDamage, b); + Damage.damage(b.team, x, y, splashDamageRadius, splashDamage * b.damageMultiplier(), splashDamagePierce, collidesAir, collidesGround, scaledSplashDamage, b, armorMultiplier); if(status != StatusEffects.none){ Damage.status(b.team, x, y, splashDamageRadius, status, statusDuration, collidesAir, collidesGround); From 927b037a527af104d25d46831c1ccfb1773b9e5e Mon Sep 17 00:00:00 2001 From: Shade Date: Sun, 3 May 2026 10:33:25 +0800 Subject: [PATCH 2/2] armmult-fix: better safe than sorry --- core/src/mindustry/entities/Damage.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index 30caef3d45..f82eae6291 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -511,7 +511,11 @@ public class Damage{ boolean dead = unit.dead; float amount = calculateDamage(scaled ? Math.max(0, unit.dst(x, y) - unit.type.hitSize/2) : unit.dst(x, y), radius, damage); - unit.damageArmorMult(amount, armorMult); + if(armorMult != 1){ + unit.damageArmorMult(amount, armorMult); + }else{ + unit.damage(amount); + } if(source != null){ Events.fire(bulletDamageEvent.set(unit, source));