Skip to content

Commit

Permalink
silver effect reduces attack damage by 10% per level
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheaterpaul committed Jun 7, 2024
1 parent 95da64c commit e412025
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/main/java/de/teamlapen/werewolves/effects/SilverEffect.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e412025

Please sign in to comment.