diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java index 27c44024f..0d6808be2 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java @@ -88,6 +88,7 @@ public class Hunger extends Buff implements Hero.Doom { if (newLevel >= STARVING) { GLog.n( TXT_STARVING ); + hero.restoreHealth = false; hero.damage( 1, this ); statusUpdated = true; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index df6c59ae6..73d321a13 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -430,7 +430,7 @@ public class Hero extends Char { if (curAction == null) { if (restoreHealth) { - if (isStarving() || HP >= HT || Dungeon.level.locked) { + if (HP >= HT || Dungeon.level.locked) { restoreHealth = false; } else { spend( TIME_TO_REST ); next(); @@ -909,10 +909,10 @@ public class Hero extends Char { if (buff(TimekeepersHourglass.timeStasis.class) != null) return; - restoreHealth = false; - - if (!(src instanceof Hunger || src instanceof Viscosity.DeferedDamage) && damageInterrupt) + if (!(src instanceof Hunger || src instanceof Viscosity.DeferedDamage) && damageInterrupt) { interrupt(); + restoreHealth = false; + } if (this.buff(Drowsy.class) != null){ Buff.detach(this, Drowsy.class); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/HeroSprite.java b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/HeroSprite.java index 2a1cdf175..8a08e0681 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/HeroSprite.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/HeroSprite.java @@ -103,7 +103,7 @@ public class HeroSprite extends CharSprite { @Override public void update() { - sleeping = ((Hero)ch).restoreHealth; + sleeping = ch.isAlive() && ((Hero)ch).restoreHealth; super.update(); }