- k = rnd(101);
- if (k < 40) {
- lprcat("\nThe chest explodes as you open it");
- beep();
- i = rnd(10);
- lastnum = 281; /* in case he dies */
- lprintf("\nYou suffer %d hit points damage!", (long) i);
- checkloss(i);
- switch (rnd(10)) { /* see if he gets a
- * curse */
- case 1:
- c[ITCHING] += rnd(1000) + 100;
- lprcat("\nYou feel an irritation spread over your skin!");
- beep();
- break;
-
- case 2:
- c[CLUMSINESS] += rnd(1600) + 200;
- lprcat("\nYou begin to lose hand to eye coordination!");
- beep();
- break;
-
- case 3:
- c[HALFDAM] += rnd(1600) + 200;
- beep();
- lprcat("\nA sickness engulfs you!");
- break;
- };
- item[playerx][playery] = know[playerx][playery] = 0;
- if (rnd(100) < 69)
- creategem(); /* gems from the chest */
- dropgold(rnd(110 * iarg[playerx][playery] + 200));
- for (i = 0; i < rnd(4); i++)
- something(iarg[playerx][playery] + 2);
- } else
- lprcat("\nnothing happens");