From 8f654177ec0a72b563b66b611140018f8897bd5f Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 29 Jan 2021 19:22:04 +0200 Subject: [PATCH] Rebalance the energy cost calculation for shields --- .../unicopia/ability/magic/spell/ShieldSpell.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/ShieldSpell.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/ShieldSpell.java index cd410412..7da7838a 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/ShieldSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/ShieldSpell.java @@ -74,9 +74,9 @@ public class ShieldSpell extends AbstractRangedAreaSpell implements Attached { int costMultiplier = applyEntities(source); if (costMultiplier > 0) { if (source.getMaster().age % 20 == 0) { - double cost = 4 + (source.getLevel().get() * 2); + double cost = 2 + source.getLevel().get(); - cost *= costMultiplier / 5F; + cost *= Math.max(1, costMultiplier / 12F); if (!source.subtractEnergyCost(cost)) { onDestroyed(source); @@ -87,8 +87,11 @@ public class ShieldSpell extends AbstractRangedAreaSpell implements Attached { return !isDead(); } + /** + * Calculates the maximum radius of the shield. aka The area of effect. + */ public double getDrawDropOffRange(Caster source) { - float multiplier = (source.getMaster().isSneaking() ? 1 : 2); + float multiplier = source.getMaster().isSneaking() ? 1 : 2; return (4 + (source.getLevel().get() * 2)) / multiplier; }