@Override public void onDeath() { Badges.validateDeathFromGas(); Dungeon.fail(Utils.format(ResultDescriptions.GAS, Dungeon.depth)); GLog.n("You died from a toxic gas.."); }
public void earnExp(int exp) { this.exp += exp; boolean levelUp = false; while (this.exp >= maxExp()) { this.exp -= maxExp(); lvl++; HT += 5; HP += 5; attackSkill++; defenseSkill++; if (lvl < 10) { updateAwareness(); } levelUp = true; } if (levelUp) { GLog.p(TXT_NEW_LEVEL, lvl); sprite.showStatus(CharSprite.POSITIVE, TXT_LEVEL_UP); Sample.INSTANCE.play(Assets.SND_LEVELUP); Badges.validateLevelReached(); } if (subClass == HeroSubClass.WARLOCK) { int value = Math.min(HT - HP, 1 + (Dungeon.depth - 1) / 5); if (value > 0) { HP += value; sprite.emitter().burst(Speck.factory(Speck.HEALING), 1); } ((Hunger) buff(Hunger.class)).satisfy(1); } }