From 442186978d0ef21f57fe4d6a8cc1a1d7f8b9e297 Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 9 Oct 2023 23:45:22 +0100 Subject: [PATCH] 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 --- .../unicopia/entity/player/Pony.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java b/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java index 5451ed02..54f0e46d 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java @@ -440,18 +440,30 @@ public class Pony extends Living implements Copyable, 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) { - charge.addPercent(3); + 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); + } } }