Bugfix: Shield makes player get remaining damage as hp.
This commit is contained in:
parent
9bba32307e
commit
742ff1eafc
|
@ -104,7 +104,7 @@ public abstract class LivingEntity extends CollidableEntity implements Hittable
|
||||||
return;
|
return;
|
||||||
if (this.shieldPoints > 0) {
|
if (this.shieldPoints > 0) {
|
||||||
if (this.shieldPoints < damage) {
|
if (this.shieldPoints < damage) {
|
||||||
this.healthPoints = (damage - this.shieldPoints);
|
this.healthPoints -= (damage - this.shieldPoints);
|
||||||
this.shieldPoints = 0;
|
this.shieldPoints = 0;
|
||||||
} else {
|
} else {
|
||||||
this.shieldPoints -= damage;
|
this.shieldPoints -= damage;
|
||||||
|
|
Loading…
Reference in New Issue