mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Copy-pasta code is bad.
This commit is contained in:
@ -47,14 +47,9 @@ public class AxeManager extends SkillManager {
|
||||
return;
|
||||
}
|
||||
|
||||
int randomChance = 100;
|
||||
if (Permissions.luckyAxes(player)) {
|
||||
randomChance = 75;
|
||||
}
|
||||
|
||||
double chance = (Axes.criticalHitMaxChance / Axes.criticalHitMaxBonusLevel) * eventHandler.skillModifier;
|
||||
|
||||
if (chance > Misc.getRandom().nextInt(randomChance) && !eventHandler.defender.isDead()) {
|
||||
if (chance > Misc.getRandom().nextInt(activationChance) && !eventHandler.defender.isDead()) {
|
||||
eventHandler.modifyEventDamage();
|
||||
eventHandler.sendAbilityMessages();
|
||||
}
|
||||
|
@ -62,12 +62,7 @@ public class ImpactEventHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
int randomChance = 100;
|
||||
if (Permissions.luckyAxes(player)) {
|
||||
randomChance = 75;
|
||||
}
|
||||
|
||||
if (Misc.getRandom().nextInt(randomChance) <= Axes.greaterImpactChance) {
|
||||
if (Misc.getRandom().nextInt(manager.getActivationChance()) <= Axes.greaterImpactChance) {
|
||||
handleGreaterImpactEffect();
|
||||
sendAbilityMessge();
|
||||
}
|
||||
|
Reference in New Issue
Block a user