mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-27 06:21:59 +01:00
Added configurable damage to forcefield
This commit is contained in:
parent
f50c1d7c86
commit
e76ddc6b89
@ -87,7 +87,9 @@ public class Forcefield extends EcoEnchant implements TimedRunnable {
|
||||
|
||||
((Monster) e).damage(damage);
|
||||
|
||||
if (NumberUtils.randFloat(0, 1) < 0.2) {
|
||||
double damageChance = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "damage-chance");
|
||||
|
||||
if (NumberUtils.randFloat(0, 1) < damageChance) {
|
||||
EnchantChecks.getArmorPoints(player, this, 1);
|
||||
}
|
||||
}
|
||||
|
@ -32,3 +32,4 @@ config:
|
||||
bonus-per-level: 0.3 # Bonus range per level (Level 1 also includes bonus)
|
||||
damage-per-level: 0.5
|
||||
repeat-ticks: 20 # Damage nearby mobs every few ticks. Lower values lead to more damage and may cause lag
|
||||
damage-chance: 0.2 # The chance for armor to be damaged every damage tick
|
Loading…
Reference in New Issue
Block a user