More unit abilities

This commit is contained in:
Anuken
2020-07-10 13:22:45 -04:00
parent baa9f22a0b
commit 21170634bd
10 changed files with 164 additions and 21 deletions

View File

@@ -34,7 +34,7 @@ abstract class ShieldComp implements Healthc, Posc{
shieldAlpha = 1f;
}
float shieldDamage = Math.min(shield, amount);
float shieldDamage = Math.min(Math.max(shield, 0), amount);
shield -= shieldDamage;
amount -= shieldDamage;