Sector simplification

This commit is contained in:
Anuken
2020-10-11 10:51:33 -04:00
parent 65d9978fa1
commit 3d99e38f10
13 changed files with 64 additions and 27 deletions

View File

@@ -9,7 +9,7 @@ import static mindustry.Vars.*;
@Component
abstract class ShieldComp implements Healthc, Posc{
@Import float health, hitTime, x, y;
@Import float health, hitTime, x, y, healthMultiplier;
@Import boolean dead;
/** Absorbs health damage. */
@@ -22,6 +22,7 @@ abstract class ShieldComp implements Healthc, Posc{
@Replace
@Override
public void damage(float amount){
amount /= healthMultiplier;
//apply armor
amount = Math.max(amount - armor, minArmorDamage * amount);