@Override
  protected boolean affectHero(Hero hero) {

    Sample.INSTANCE.play(Assets.SND_DRINK);

    PotionOfHealing.heal(hero);
    hero.belongings.uncurseEquipped();
    ((Hunger) hero.buff(Hunger.class)).satisfy(Hunger.STARVING);

    CellEmitter.get(pos).start(ShaftParticle.FACTORY, 0.2f, 3);

    Dungeon.hero.interrupt();

    GLog.p(TXT_PROCCED);

    Journal.remove(Feature.WELL_OF_HEALTH);

    return true;
  }
Esempio n. 2
0
  @Override
  public int attackProc(Char enemy, int damage) {

    if (enemy == Dungeon.hero) {

      Hero hero = Dungeon.hero;
      KindOfWeapon weapon = hero.belongings.weapon;

      if (weapon != null && !(weapon instanceof Knuckles) && !weapon.cursed) {
        if (hitsToDisarm == 0) hitsToDisarm = Random.NormalIntRange(4, 8);

        if (--hitsToDisarm == 0) {
          hero.belongings.weapon = null;
          Dungeon.quickslot.clearItem(weapon);
          weapon.updateQuickslot();
          Dungeon.level.drop(weapon, hero.pos).sprite.drop();
          GLog.w(TXT_DISARM, name, weapon.name());
        }
      }
    }

    return damage;
  }
 @Override
 public void apply(Hero hero) {
   setKnown();
   heal(Dungeon.hero);
   GLog.p("Your wounds heal completely.");
 }