diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Forcefield.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Forcefield.java index 0ee074d0..1875220e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Forcefield.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Forcefield.java @@ -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); } } diff --git a/eco-core/core-plugin/src/main/resources/enchants/normal/forcefield.yml b/eco-core/core-plugin/src/main/resources/enchants/normal/forcefield.yml index 58821c59..9e165b7d 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/normal/forcefield.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/normal/forcefield.yml @@ -31,4 +31,5 @@ config: initial-distance: 1.5 # Initial range 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 \ No newline at end of file + 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 \ No newline at end of file