public void clearMobs() {
   for (Mob mob : mobs.toArray(new Mob[0])) {
     if (!mob.reset()) {
       if (ButteredPixelDungeon.scene() instanceof GameScene) {
         GameScene.remove(mob);
       } else {
         mobs.remove(mob);
       }
     }
   }
 }
  public void spawnMobs() {
    int mobsToSpawn = Random.Int(5, 10);

    while (mobsToSpawn > 0) {
      Mob mob = Bestiary.mob(Dungeon.wave);
      mob.pos = Random.Int(LENGTH);

      if (findMob(mob.pos) == null
          && Level.passable[mob.pos]
          && !fieldOfView[mob.pos]
          && Level.distance(mob.pos, entrance) > 1) {
        mobsToSpawn--;
        if (Dungeon.level instanceof ArenaLevel) {
          GameScene.add(mob);
        } else {
          mobs.add(mob);
        }
      }
    }
  }
  public void spawnBoss(Mob mob) {
    while (true) {
      mob.pos = Random.Int(LENGTH);

      if (findMob(mob.pos) == null && Level.passable[mob.pos] && !fieldOfView[mob.pos]) {
        if (Dungeon.level != null) {
          GameScene.add(mob);
        } else {
          mobs.add(mob);
        }

        if (mob instanceof Yog) {
          ((Yog) mob).spawnFists();
        }

        break;
      }
    }
  }