Fixed the stressful enchantment. Fixes #200

This commit is contained in:
Sollace 2023-09-28 22:10:40 +01:00
parent 8f2cd29488
commit d86f750efa
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -15,9 +15,10 @@ public class StressfulEnchantment extends SimpleEnchantment {
public void onUserTick(Living<?> user, int level) { public void onUserTick(Living<?> user, int level) {
if (user instanceof Pony) { if (user instanceof Pony) {
Bar bar = ((Pony)user).getMagicalReserves().getEnergy(); Bar bar = ((Pony)user).getMagicalReserves().getEnergy();
float targetPercent = (level / (float)getMaxLevel()) * 0.25F; float targetPercent = (level / (float)getMaxLevel()) * 0.05125F;
float increase = 1F + (level * level)/100F;
if (bar.getPercentFill() < targetPercent) { if (bar.getPercentFill() < targetPercent) {
bar.add(0.1F); bar.add(increase);
} }
} }
} }