mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Some slight balancing changes to the energy bar
This commit is contained in:
parent
dc6371ccf0
commit
bb9d23d686
4 changed files with 9 additions and 4 deletions
|
@ -62,7 +62,7 @@ public class UnicornCastingAbility implements Ability<Hit> {
|
|||
|
||||
@Override
|
||||
public void preApply(Pony player, AbilitySlot slot) {
|
||||
player.getMagicalReserves().getEnergy().add(3);
|
||||
player.getMagicalReserves().getEnergy().multiply(3.3F);
|
||||
player.spawnParticles(MagicParticleEffect.UNICORN, 5);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,8 @@ public interface MagicReserves {
|
|||
* Multiplies the current value.
|
||||
*/
|
||||
default void multiply(float scalar) {
|
||||
set(get() * scalar);
|
||||
float newVal = get() * scalar;
|
||||
set(newVal > -0.0001F && newVal < 0.0001F ? 0 : newVal);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,7 @@ class PlayerLevelStore implements Levelled.LevelStore {
|
|||
@Override
|
||||
public void add(int levels) {
|
||||
if (levels > 0) {
|
||||
pony.getMagicalReserves().getMana().set(pony.getMagicalReserves().getEnergy().getMax());
|
||||
pony.getMagicalReserves().getMana().add(pony.getMagicalReserves().getMana().getMax() / 2);
|
||||
pony.getWorld().playSound(null, pony.getOrigin(), SoundEvents.ENTITY_PLAYER_LEVELUP, SoundCategory.PLAYERS, 1, 2);
|
||||
}
|
||||
Levelled.LevelStore.super.add(levels);
|
||||
|
|
|
@ -296,7 +296,11 @@ public class Pony implements Caster<PlayerEntity>, Equine<PlayerEntity>, Transmi
|
|||
}
|
||||
|
||||
mana.getExertion().add(-10);
|
||||
mana.getEnergy().add(-1);
|
||||
if (mana.getEnergy().get() > 5) {
|
||||
mana.getEnergy().multiply(0.8F);
|
||||
} else {
|
||||
mana.getEnergy().add(-1);
|
||||
}
|
||||
|
||||
if (!getSpecies().canFly() || !gravity.isFlying()) {
|
||||
mana.getMana().add(60);
|
||||
|
|
Loading…
Reference in a new issue