diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java index ea5c518e0..43f186756 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java @@ -578,8 +578,8 @@ public enum Talent { public static void onFoodEaten( Hero hero, float foodVal, Item foodSource ){ if (hero.hasTalent(HEARTY_MEAL)){ - //4/6 HP healed, when hero is below 33% health - if (hero.HP/(float)hero.HT <= 0.333f) { + //4/6 HP healed, when hero is below 33% health (with a little rounding up) + if (hero.HP/(float)hero.HT < 0.334f) { int healing = 2 + 2 * hero.pointsInTalent(HEARTY_MEAL); hero.HP = Math.min(hero.HP + healing, hero.HT); hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(healing), FloatingText.HEALING); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java index f729d8acc..853263ec8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java @@ -249,7 +249,7 @@ public class StatusPane extends Component { if (!Dungeon.hero.isAlive()) { avatar.tint(0x000000, 0.5f); - } else if ((health/(float)max) <= 0.333f) { + } else if ((health/(float)max) < 0.334f) { warning += Game.elapsed * 5f *(0.4f - (health/(float)max)); warning %= 1f; avatar.tint(ColorMath.interpolate(warning, warningColors), 0.5f );