mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed the stressful enchantment. Fixes #200
This commit is contained in:
parent
8f2cd29488
commit
d86f750efa
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue