+ default:
+ break;
+ }
+ playerx = lastpx;
+ playery = lastpy;
+ } else {
+ forget();
+ item[playerx][playery] = OOPENDOOR;
+ }
+ }
+ break;
+
+ case OENTRANCE:
+ lprcat("\nYou have found ");
+ lprcat(objectname[OENTRANCE]);
+ lprcat("\nDo you (g) go inside");
+ iopts();
+ i = 0;
+ while ((i != 'g') && (i != 'i') && (i != '\33'))
+ i = ttgetch();
+ if (i == 'g') {
+ newcavelevel(1);
+ playerx = 33;
+ playery = MAXY - 2;
+ item[33][MAXY - 1] = know[33][MAXY - 1] = mitem[33][MAXY - 1] = 0;
+ draws(0, MAXX, 0, MAXY);
+ bot_linex();
+ return;
+ } else
+ ignore();
+ break;
+
+ case OVOLDOWN:
+ lprcat("\nYou have found ");
+ lprcat(objectname[OVOLDOWN]);
+ lprcat("\nDo you (c) climb down");
+ iopts();
+ i = 0;
+ while ((i != 'c') && (i != 'i') && (i != '\33'))
+ i = ttgetch();
+ if ((i == '\33') || (i == 'i')) {
+ ignore();
+ break;
+ }
+ if (level != 0) {
+ lprcat("\nThe shaft only extends 5 feet downward!");
+ return;
+ }
+ if (packweight() > 45 + 3 * (c[STRENGTH] + c[STREXTRA])) {
+ lprcat("\nYou slip and fall down the shaft");
+ beep();
+ lastnum = 275;
+ losehp(30 + rnd(20));
+ bottomhp();
+ } else
+ lprcat("climb down");
+ nap(3000);
+ newcavelevel(MAXLEVEL);
+ for (i = 0; i < MAXY; i++)
+ for (j = 0; j < MAXX; j++) /* put player near
+ * volcano shaft */
+ if (item[j][i] == OVOLUP) {
+ playerx = j;
+ playery = i;
+ j = MAXX;
+ i = MAXY;
+ positionplayer();
+ }
+ draws(0, MAXX, 0, MAXY);
+ bot_linex();
+ return;
+
+ case OVOLUP:
+ lprcat("\nYou have found ");
+ lprcat(objectname[OVOLUP]);
+ lprcat("\nDo you (c) climb up");
+ iopts();
+ i = 0;
+ while ((i != 'c') && (i != 'i') && (i != '\33'))
+ i = ttgetch();
+ if ((i == '\33') || (i == 'i')) {
+ ignore();
+ break;
+ }
+ if (level != 11) {
+ lprcat("\nThe shaft only extends 8 feet upwards before you find a blockage!");
+ return;
+ }
+ if (packweight() > 45 + 5 * (c[STRENGTH] + c[STREXTRA])) {
+ lprcat("\nYou slip and fall down the shaft");
+ beep();
+ lastnum = 275;
+ losehp(15 + rnd(20));
+ bottomhp();
+ return;
+ }
+ lprcat("climb up");
+ lflush();
+ nap(3000);
+ newcavelevel(0);
+ for (i = 0; i < MAXY; i++)
+ for (j = 0; j < MAXX; j++) /* put player near
+ * volcano shaft */
+ if (item[j][i] == OVOLDOWN) {
+ playerx = j;
+ playery = i;
+ j = MAXX;
+ i = MAXY;
+ positionplayer();
+ }
+ draws(0, MAXX, 0, MAXY);
+ bot_linex();
+ return;
+
+ case OTRAPARROWIV:
+ if (rnd(17) < 13)
+ return; /* for an arrow trap */
+ item[playerx][playery] = OTRAPARROW;
+ know[playerx][playery] = 0;
+
+ /* FALLTHROUGH */
+ case OTRAPARROW:
+ lprcat("\nYou are hit by an arrow");
+ beep(); /* for an arrow trap */
+ lastnum = 259;
+ losehp(rnd(10) + level);
+ bottomhp();
+ return;
+
+ case OIVDARTRAP:
+ if (rnd(17) < 13)
+ return; /* for a dart trap */
+ item[playerx][playery] = ODARTRAP;
+ know[playerx][playery] = 0;
+
+ /* FALLTHROUGH */
+ case ODARTRAP:
+ lprcat("\nYou are hit by a dart");
+ beep(); /* for a dart trap */
+ lastnum = 260;
+ losehp(rnd(5));
+ if ((--c[STRENGTH]) < 3)
+ c[STRENGTH] = 3;
+ bottomline();
+ return;
+
+ case OIVTRAPDOOR:
+ if (rnd(17) < 13)
+ return; /* for a trap door */
+ item[playerx][playery] = OTRAPDOOR;
+ know[playerx][playery] = 1;
+
+ /* FALLTHROUGH */
+ case OTRAPDOOR:
+ lastnum = 272; /* a trap door */
+ if ((level == MAXLEVEL - 1) || (level == MAXLEVEL + MAXVLEVEL - 1)) {
+ lprcat("\nYou fell through a bottomless trap door!");
+ beep();
+ nap(3000);
+ died(271);
+ }
+ lprcat("\nYou fall through a trap door!");
+ beep(); /* for a trap door */
+ losehp(rnd(5 + level));
+ nap(2000);
+ newcavelevel(level + 1);
+ draws(0, MAXX, 0, MAXY);
+ bot_linex();
+ return;
+
+
+ case OTRADEPOST:
+ if (nearbymonst())
+ return;
+ lprcat("\nYou have found the Larn trading Post.");
+ lprcat("\nDo you (g) go inside, or (i) stay here? ");
+ i = 0;
+ while ((i != 'g') && (i != 'i') && (i != '\33'))
+ i = ttgetch();
+ if (i == 'g')
+ otradepost();
+ else
+ lprcat("stay here");
+ return;
+
+ case OHOME:
+ if (nearbymonst())
+ return;
+ lprcat("\nYou have found your way home.");
+ lprcat("\nDo you (g) go inside, or (i) stay here? ");
+ i = 0;
+ while ((i != 'g') && (i != 'i') && (i != '\33'))
+ i = ttgetch();
+ if (i == 'g')
+ ohome();
+ else
+ lprcat("stay here");
+ return;
+
+ case OWALL:
+ break;
+
+ case OANNIHILATION:
+ died(283);
+ return; /* annihilated by sphere of annihilation */
+
+ case OLRS:
+ if (nearbymonst())
+ return;
+ lprcat("\n\nThere is an LRS office here.");
+ lprcat("\nDo you (g) go inside, or (i) stay here? ");
+ i = 0;
+ while ((i != 'g') && (i != 'i') && (i != '\33'))
+ i = ttgetch();
+ if (i == 'g')
+ olrs(); /* the larn revenue service */
+ else
+ lprcat(" stay here");
+ break;