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 0f975b998..80d2fea79 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 @@ -177,7 +177,9 @@ public enum Talent { } } if (hero.hasTalent(IRON_STOMACH)){ - Buff.affect(hero, WarriorFoodImmunity.class, 1f); + if (hero.cooldown() > 0) { + Buff.affect(hero, WarriorFoodImmunity.class, hero.cooldown()); + } } if (hero.hasTalent(EMPOWERING_MEAL)){ //2/3 bonus wand damage for next 3 zaps diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Food.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Food.java index 983366170..89c7fb81f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Food.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Food.java @@ -73,8 +73,6 @@ public class Food extends Item { satisfy(hero); GLog.i( message ); - - Talent.onFoodEaten(hero, energy, this); hero.sprite.operate( hero.pos ); hero.busy(); @@ -82,6 +80,8 @@ public class Food extends Item { Sample.INSTANCE.play( Assets.Sounds.EAT ); hero.spend( eatingTime() ); + + Talent.onFoodEaten(hero, energy, this); Statistics.foodEaten++; Badges.validateFoodEaten();