修改面包弹的效果等级

This commit is contained in:
17146 2025-01-12 00:16:29 +08:00
parent f69b4997e0
commit 3a0b17751b
2 changed files with 17 additions and 1 deletions

View file

@ -215,6 +215,8 @@ public class GunEventHandler {
int amplifier; int amplifier;
if (perk.descriptionId.equals("blade_bullet")) { if (perk.descriptionId.equals("blade_bullet")) {
amplifier = level / 3; amplifier = level / 3;
} else if (perk.descriptionId.equals("bread_bullet")) {
amplifier = 1;
} else { } else {
amplifier = level - 1; amplifier = level - 1;
} }

View file

@ -265,12 +265,26 @@ public class FireMessage {
projectile.setRGB(ammoPerk.rgb); projectile.setRGB(ammoPerk.rgb);
if (!ammoPerk.mobEffects.get().isEmpty()) { if (!ammoPerk.mobEffects.get().isEmpty()) {
int amplifier;
if (perk.descriptionId.equals("blade_bullet")) {
amplifier = level / 3;
} else if (perk.descriptionId.equals("bread_bullet")) {
amplifier = 1;
} else {
amplifier = level - 1;
}
ArrayList<MobEffectInstance> mobEffectInstances = new ArrayList<>(); ArrayList<MobEffectInstance> mobEffectInstances = new ArrayList<>();
for (MobEffect effect : ammoPerk.mobEffects.get()) { for (MobEffect effect : ammoPerk.mobEffects.get()) {
mobEffectInstances.add(new MobEffectInstance(effect, 70 + 30 * level, level - 1)); mobEffectInstances.add(new MobEffectInstance(effect, 70 + 30 * level, amplifier));
} }
projectile.effect(mobEffectInstances); projectile.effect(mobEffectInstances);
} }
if (perk.descriptionId.equals("bread_bullet")) {
projectile.knockback(level * 0.3f);
projectile.forceKnockback();
}
} }
bypassArmorRate = Math.max(bypassArmorRate, 0); bypassArmorRate = Math.max(bypassArmorRate, 0);