This commit is contained in:
Anuken
2020-12-22 10:48:11 -05:00
parent eda134a18c
commit 24c71e49c7

View File

@@ -51,8 +51,8 @@ abstract class HealthComp implements Entityc, Posc{
/** Damage and pierce armor. */
void damagePierce(float amount, boolean withEffect){
if(this instanceof Shieldc){
damage(amount + ((Shieldc)this).armor(), withEffect);
if(this instanceof Shieldc c){
damage(amount + c.armor(), withEffect);
}else{
damage(amount, withEffect);
}