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)){ 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)){ if (hero.hasTalent(EMPOWERING_MEAL)){
//2/3 bonus wand damage for next 3 zaps //2/3 bonus wand damage for next 3 zaps

View File

@ -74,8 +74,6 @@ public class Food extends Item {
satisfy(hero); satisfy(hero);
GLog.i( message ); GLog.i( message );
Talent.onFoodEaten(hero, energy, this);
hero.sprite.operate( hero.pos ); hero.sprite.operate( hero.pos );
hero.busy(); hero.busy();
SpellSprite.show( hero, SpellSprite.FOOD ); SpellSprite.show( hero, SpellSprite.FOOD );
@ -83,6 +81,8 @@ public class Food extends Item {
hero.spend( eatingTime() ); hero.spend( eatingTime() );
Talent.onFoodEaten(hero, energy, this);
Statistics.foodEaten++; Statistics.foodEaten++;
Badges.validateFoodEaten(); Badges.validateFoodEaten();