From d23c4cba18d58b8782b36560111a92f20260c43a Mon Sep 17 00:00:00 2001 From: WinDanesz <31292708+WinDanesz@users.noreply.github.com> Date: Fri, 8 Jul 2022 19:16:54 +0200 Subject: [PATCH] feat: Forcefield loses 1% durability each time it repulses an enemy or a projectile --- .../wizardry/entity/construct/EntityForcefield.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/electroblob/wizardry/entity/construct/EntityForcefield.java b/src/main/java/electroblob/wizardry/entity/construct/EntityForcefield.java index f0891e95..6f9f9ea1 100644 --- a/src/main/java/electroblob/wizardry/entity/construct/EntityForcefield.java +++ b/src/main/java/electroblob/wizardry/entity/construct/EntityForcefield.java @@ -167,7 +167,10 @@ public class EntityForcefield extends EntityMagicConstruct implements ICustomHit if(target instanceof EntityPlayerMP){ ((EntityPlayerMP)target).connection.sendPacket(new SPacketEntityVelocity(target)); } - this.lifetime = (int) (lifetime * 0.92); + + if (this.ticksExisted % 5 == 0) { + this.lifetime = (int) (lifetime * 0.99); + } }else{