v0.9.1: fixed an exploit with iron stomach and time freeze

This commit is contained in:
Evan Debenham 2020-12-05 15:32:12 -05:00
parent 2cdde39511
commit 086c0a56d8
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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();