Added use-additive for Criticals

This commit is contained in:
Auxilor 2020-11-18 19:40:25 +00:00
parent 7d452882a2
commit 8594f77231
2 changed files with 11 additions and 3 deletions

View File

@ -21,7 +21,14 @@ public final class Criticals extends EcoEnchant {
double damage = event.getDamage(); double damage = event.getDamage();
double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier"); double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier");
double bonus = 1 + (multiplier * level); if(this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "use-additive")) {
event.setDamage(damage * bonus); damage = damage/1.5;
double bonus = damage * (multiplier * level);
damage = damage + bonus + damage/2;
event.setDamage(damage);
} else {
double bonus = 1 + (multiplier * level);
event.setDamage(damage * bonus);
}
} }
} }

View File

@ -21,4 +21,5 @@ general-config:
maximum-level: 3 maximum-level: 3
config: config:
multiplier: 0.1 # 1 + (Level * Multiplier) is multiplied with the damage multiplier: 0.1 # 1 + (Level * Multiplier) is multiplied with the damage
use-additive: false # Multiply base damage rather than vanilla critical damage