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

    GameScene.bossSlain();
    Dungeon.level.drop(new ArmorKit(), pos).sprite.drop();

    if (Dungeon.gamemode == GameMode.REGULAR) {
      Dungeon.level.drop(new SkeletonKey(Dungeon.depth), pos).sprite.drop();
    } else if (Dungeon.gamemode == GameMode.ARENA) {
      // Level up
      Dungeon.hero.earnExp(Dungeon.hero.maxExp());

      ArenaShopKey key = new ArenaShopKey();
      key.identify();
      Dungeon.level.drop(key, pos).sprite.drop();
    }

    super.die(cause);

    Badges.validateBossSlain();

    LloydsBeacon beacon = Dungeon.hero.belongings.getItem(LloydsBeacon.class);
    if (beacon != null) {
      beacon.upgrade();
      GLog.p("Your beacon grows stronger!");
    }

    yell("You cannot kill me, " + Dungeon.hero.givenName() + "... I am... immortal...");
  }
 @Override
 public boolean act() {
   if (target instanceof Hero) {
     target.HP = Math.min(target.HP + 1, target.HT);
     ((Hero) target).restoreHealth = true;
     if (target.HP == target.HT) {
       GLog.p("You wake up feeling refreshed and healthy.");
       detach();
     }
   }
   spend(STEP);
   return true;
 }