Increase max mana with the player's level

This commit is contained in:
Sollace 2022-09-02 12:53:37 +02:00
parent 37148fad51
commit 1f767f0be3

View file

@ -71,7 +71,7 @@ public class ManaContainer implements MagicReserves, Tickable {
if (!pony.getSpecies().canFly() || !pony.getPhysics().isFlying()) { if (!pony.getSpecies().canFly() || !pony.getPhysics().isFlying()) {
if (mana.getShadowFill() <= mana.getPercentFill()) { if (mana.getShadowFill() <= mana.getPercentFill()) {
mana.add(18); mana.add(18 * pony.getLevel().get());
} }
} }
} }
@ -82,6 +82,11 @@ public class ManaContainer implements MagicReserves, Tickable {
super(marker, max, initial); super(marker, max, initial);
} }
@Override
public float getMax() {
return super.getMax() + 50 * pony.getLevel().get();
}
@Override @Override
public void set(float value) { public void set(float value) {
float diff = value - get(); float diff = value - get();