From 1e0889bc4cd11547a3bbb36bf5058364a0a8912b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 15 Oct 2024 14:14:12 -0400 Subject: [PATCH] v3.0.0: improved rounding for heroic energy talent --- .../actors/hero/abilities/ArmorAbility.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java index 23a618fa0..7bc6730e8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java @@ -72,7 +72,20 @@ public abstract class ArmorAbility implements Bundlable { float chargeUse = baseChargeUse; if (hero.hasTalent(Talent.HEROIC_ENERGY)){ //reduced charge use by 12%/23%/32%/40% - chargeUse *= Math.pow( 0.8804, hero.pointsInTalent(Talent.HEROIC_ENERGY)); + switch (hero.pointsInTalent(Talent.HEROIC_ENERGY)){ + case 1: default: + chargeUse *= 0.88f; + break; + case 2: + chargeUse *= 0.77f; + break; + case 3: + chargeUse *= 0.68f; + break; + case 4: + chargeUse *= 0.6f; + break; + } } return chargeUse; }