mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-30 01:41:25 +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 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,3 +22,4 @@ general-config:
|
|||||||
|
|
||||||
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
|
Loading…
Reference in New Issue
Block a user