- lprcat("\nDo you (p) pray (d) desecrate"); iopts();
- while (1)
- {
- while (1) switch(getchar())
- {
- case 'p': lprcat(" pray\nDo you (m) give money or (j) just pray? ");
- while (1) switch(getchar())
- {
- case 'j': if (rnd(100)<75)
- lprcat("\nnothing happens");
- else if (rnd(13)<4) ohear();
- else if (rnd(43) == 10)
- {
- if (c[WEAR]) lprcat("\nYou feel your armor vibrate for a moment");
- enchantarmor(); return;
- }
- else if (rnd(43) == 10)
- {
- if (c[WIELD]) lprcat("\nYou feel your weapon vibrate for a moment");
- enchweapon(); return;
- }
- else createmonster(makemonst(level+1));
- return;
-
- case 'm': lprcat("\n\n"); cursor(1,24); cltoeoln();
- cursor(1,23); cltoeoln();
- lprcat("how much do you donate? ");
- k = readnum((long)c[GOLD]);
- if (c[GOLD]<k)
- {
- lprcat("\nYou don't have that much!");
- return;
- }
- c[GOLD] -= k;
- if (k < c[GOLD]/10 || k<rnd(50))
- { createmonster(makemonst(level+1)); c[AGGRAVATE] += 200; }
- else if (rnd(101) > 50) { ohear(); return; }
- else if (rnd(43) == 5)
- {
- if (c[WEAR]) lprcat("\nYou feel your armor vibrate for a moment");
- enchantarmor(); return;
- }
- else if (rnd(43) == 8)
- {
- if (c[WIELD]) lprcat("\nYou feel your weapon vibrate for a moment");
- enchweapon(); return;
- }
- else lprcat("\nThank You.");
- bottomline(); return;
-
- case '\33': return;
- };
-
- case 'd': lprcat(" desecrate");
- if (rnd(100)<60)
- { createmonster(makemonst(level+2)+8); c[AGGRAVATE] += 2500; }
- else
- if (rnd(101)<30)
- {
- lprcat("\nThe altar crumbles into a pile of dust before your eyes");
- forget(); /* remember to destroy the altar */
+ lprcat("\nDo you (p) pray (d) desecrate");
+ iopts();
+ while (1) {
+ while (1)
+ switch (getchar()) {
+ case 'p':
+ lprcat(" pray\nDo you (m) give money or (j) just pray? ");
+ while (1)
+ switch (getchar()) {
+ case 'j':
+ if (rnd(100) < 75)
+ lprcat("\nnothing happens");
+ else if (rnd(13) < 4)
+ ohear();
+ else if (rnd(43) == 10) {
+ if (c[WEAR])
+ lprcat("\nYou feel your armor vibrate for a moment");
+ enchantarmor();
+ return;
+ } else if (rnd(43) == 10) {
+ if (c[WIELD])
+ lprcat("\nYou feel your weapon vibrate for a moment");
+ enchweapon();
+ return;
+ } else
+ createmonster(makemonst(level + 1));
+ return;
+
+ case 'm':
+ lprcat("\n\n");
+ cursor(1, 24);
+ cltoeoln();
+ cursor(1, 23);
+ cltoeoln();
+ lprcat("how much do you donate? ");
+ k = readnum((long) c[GOLD]);
+ if (c[GOLD] < k) {
+ lprcat("\nYou don't have that much!");
+ return;