Exemplo n.º 1
0
  @Override
  public void die(Object cause) {

    curAction = null;

    DewVial.autoDrink(this);
    if (isAlive()) {
      new Flare(8, 32).color(0xFFFF66, true).show(sprite, 2f);
      return;
    }

    Actor.fixTime();
    super.die(cause);

    Ankh ankh = (Ankh) belongings.getItem(Ankh.class);
    if (ankh == null) {

      reallyDie(cause);

    } else {

      Dungeon.deleteGame(Dungeon.hero.heroClass, false);
      GameScene.show(new WndResurrect(ankh, cause));
    }
  }
Exemplo n.º 2
0
  public static void saveAll() throws IOException {
    if (hero.isAlive()) {

      Actor.fixTime();
      saveGame(gameFile(hero.heroClass));
      saveLevel();

      GamesInProgress.set(hero.heroClass, depth, hero.lvl);

    } else if (WndResurrect.instance != null) {

      WndResurrect.instance.hide();
      Hero.reallyDie(WndResurrect.causeOfDeath);
    }
  }