Method refactoring / Cleanup

This commit is contained in:
Anuken
2020-05-30 12:11:00 -04:00
parent 8d0486d425
commit d988b4b5c9
13 changed files with 41 additions and 23 deletions

View File

@@ -2,7 +2,6 @@ package mindustry.entities.comp;
import arc.math.*;
import arc.util.*;
import mindustry.*;
import mindustry.annotations.Annotations.*;
import mindustry.gen.*;
@@ -53,7 +52,7 @@ abstract class HealthComp implements Entityc{
/** Damage and pierce armor. */
void damagePierce(float amount, boolean withEffect){
if(this instanceof Shieldc){
damage(amount / Math.max(1f - ((Shieldc)this).armor(), Vars.minArmorDamage), withEffect);
damage(amount + ((Shieldc)this).armor(), withEffect);
}else{
damage(amount, withEffect);
}