mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-29 01:31:20 +01:00
Added use-additive for Criticals
This commit is contained in:
parent
7d452882a2
commit
8594f77231
@ -21,7 +21,14 @@ public final class Criticals extends EcoEnchant {
|
||||
|
||||
double damage = event.getDamage();
|
||||
double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier");
|
||||
double bonus = 1 + (multiplier * level);
|
||||
event.setDamage(damage * bonus);
|
||||
if(this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "use-additive")) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,5 @@ general-config:
|
||||
maximum-level: 3
|
||||
|
||||
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
|
Loading…
Reference in New Issue
Block a user