From aec3e178f5a62a30e9c617fd9e2bb7ffd2b47064 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Sat, 25 Mar 2023 10:47:53 -0700 Subject: [PATCH] Fix armor piercing ignoring status effect health multiplier (#8387) * Make rawDamage protected * pierceArmor ignores status effect health multiplier * This is no longer the case --- core/src/mindustry/entities/bullet/BulletType.java | 2 +- core/src/mindustry/entities/comp/ShieldComp.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 29e7ab4ee1..caee6d3cc7 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -143,7 +143,7 @@ public class BulletType extends Content implements Cloneable{ public boolean fragOnHit = true; /** If false, this bullet will not create fraags when absorbed by a shield. */ public boolean fragOnAbsorb = true; - /** If true, unit armor is ignored in damage calculations. Ignored for building armor. */ + /** If true, unit armor is ignored in damage calculations. */ public boolean pierceArmor = false; /** Whether status and despawnHit should automatically be set. */ public boolean setDefaults = true; diff --git a/core/src/mindustry/entities/comp/ShieldComp.java b/core/src/mindustry/entities/comp/ShieldComp.java index 5739a4f81c..98974396b8 100644 --- a/core/src/mindustry/entities/comp/ShieldComp.java +++ b/core/src/mindustry/entities/comp/ShieldComp.java @@ -34,14 +34,14 @@ abstract class ShieldComp implements Healthc, Posc{ public void damagePierce(float amount, boolean withEffect){ float pre = hitTime; - rawDamage(amount); + rawDamage(amount / healthMultiplier); if(!withEffect){ hitTime = pre; } } - private void rawDamage(float amount){ + protected void rawDamage(float amount){ boolean hadShields = shield > 0.0001f; if(hadShields){