From e41202594e3817c23fc9d944b371fa484d81b5ca Mon Sep 17 00:00:00 2001 From: cheaterpaul Date: Fri, 7 Jun 2024 19:25:27 +0200 Subject: [PATCH] silver effect reduces attack damage by 10% per level --- .../de/teamlapen/werewolves/effects/SilverEffect.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/main/java/de/teamlapen/werewolves/effects/SilverEffect.java b/src/main/java/de/teamlapen/werewolves/effects/SilverEffect.java index e4541a86..0c03b75e 100644 --- a/src/main/java/de/teamlapen/werewolves/effects/SilverEffect.java +++ b/src/main/java/de/teamlapen/werewolves/effects/SilverEffect.java @@ -21,16 +21,7 @@ public class SilverEffect extends WerewolfWeakeningEffect { private static final String DAMAGE = "67318644-855f-49ad-9c74-f310e270a7f5"; public SilverEffect() { - super(0xC0C0C0, List.of(new Modifier(Attributes.MOVEMENT_SPEED, UUID.fromString(MOVEMENT_SPEED), "Silver effect", 0.15f), new Modifier(Attributes.ARMOR, UUID.fromString(ARMOR), "Silver effect", 0.15f), new Modifier(Attributes.ATTACK_DAMAGE, UUID.fromString(DAMAGE), "Silver effect", 0.075f) { - @Override - public AttributeModifier createModifier(int level, int maxLevel, int amplifier) { - if (amplifier > 0) { - return super.createModifier(level, maxLevel, amplifier-1); - } else { - return new AttributeModifier(this.uuid, this.name, 0, AttributeModifier.Operation.MULTIPLY_TOTAL); - } - } - })); + super(0xC0C0C0, List.of(new Modifier(Attributes.MOVEMENT_SPEED, UUID.fromString(MOVEMENT_SPEED), "Silver effect", 0.15f), new Modifier(Attributes.ARMOR, UUID.fromString(ARMOR), "Silver effect", 0.15f), new Modifier(Attributes.ATTACK_DAMAGE, UUID.fromString(DAMAGE), "Silver effect", 0.1f))); } public static MobEffectInstance createSilverEffect(LivingEntity entity, int defaultDuration, int amplifier) {