mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Kirins lose their rage when in the water and mining how has a small chance of increasing rage, with a chance of turning into a nirik when at full rage
This commit is contained in:
parent
79d66439a9
commit
442186978d
1 changed files with 14 additions and 2 deletions
|
@ -440,19 +440,31 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
|||
if (getObservedSpecies() == Race.KIRIN) {
|
||||
var charge = getMagicalReserves().getCharge();
|
||||
|
||||
if (entity.isTouchingWater()) {
|
||||
charge.multiply(0.5F);
|
||||
}
|
||||
|
||||
if (charge.getPercentFill() >= 1) {
|
||||
var energy = getMagicalReserves().getEnergy();
|
||||
if (energy.getPercentFill() < 0.002F) {
|
||||
energy.addPercent(1.03F);
|
||||
if (entity.age % 25 == 0) {
|
||||
playSound(USounds.ENTITY_PLAYER_HEARTBEAT, 0.17F + (float)entity.getWorld().random.nextGaussian() * 0.03F, 0.5F);
|
||||
spawnParticles(ParticleTypes.LAVA, 2);
|
||||
energy.addPercent(1.07F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (entity.getAttackCooldownProgress(0) == 0) {
|
||||
if (entity.getAttackCooldownProgress(0) == 0 && (entity.getAttacking() != null || entity.getWorld().random.nextInt(50) == 0)) {
|
||||
if (charge.getPercentFill() < 1) {
|
||||
charge.addPercent(3);
|
||||
}
|
||||
|
||||
if (!EquinePredicates.RAGING.test(entity) && charge.getPercentFill() >= 1 && entity.getWorld().random.nextInt(1000) == 0) {
|
||||
SpellType.RAGE.withTraits().apply(this, CastingMethod.INNATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return super.beforeUpdate();
|
||||
|
|
Loading…
Reference in a new issue