- }
-
- if (j==MAXLEVEL) fillroom(OVOLUP,0); /* volcano shaft up from the temple */
-
-/* make the fixed objects in the maze STAIRS */
- if ((j>0) && (j != MAXLEVEL-1) && (j != MAXLEVEL+MAXVLEVEL-1))
- fillroom(OSTAIRSDOWN,0);
- if ((j > 1) && (j != MAXLEVEL)) fillroom(OSTAIRSUP,0);
-
-/* make the random objects in the maze */
-
- fillmroom(rund(3),OBOOK,j); fillmroom(rund(3),OALTAR,0);
- fillmroom(rund(3),OSTATUE,0); fillmroom(rund(3),OPIT,0);
- fillmroom(rund(3),OFOUNTAIN,0); fillmroom( rnd(3)-2,OIVTELETRAP,0);
- fillmroom(rund(2),OTHRONE,0); fillmroom(rund(2),OMIRROR,0);
- fillmroom(rund(2),OTRAPARROWIV,0); fillmroom( rnd(3)-2,OIVDARTRAP,0);
- fillmroom(rund(3),OCOOKIE,0);
- if (j==1) fillmroom(1,OCHEST,j);
- else fillmroom(rund(2),OCHEST,j);
- if ((j != MAXLEVEL-1) && (j != MAXLEVEL+MAXVLEVEL-1))
- fillmroom(rund(2),OIVTRAPDOOR,0);
- if (j<=10)
- {
- fillmroom((rund(2)),ODIAMOND,rnd(10*j+1)+10);
- fillmroom(rund(2),ORUBY,rnd(6*j+1)+6);
- fillmroom(rund(2),OEMERALD,rnd(4*j+1)+4);
- fillmroom(rund(2),OSAPPHIRE,rnd(3*j+1)+2);
- }
- for (i=0; i<rnd(4)+3; i++)
- fillroom(OPOTION,newpotion()); /* make a POTION */
- for (i=0; i<rnd(5)+3; i++)
- fillroom(OSCROLL,newscroll()); /* make a SCROLL */
- for (i=0; i<rnd(12)+11; i++)
- fillroom(OGOLDPILE,12*rnd(j+1)+(j<<3)+10); /* make GOLD */
- if (j==5) fillroom(OBANK2,0); /* branch office of the bank */
- froom(2,ORING,0); /* a ring mail */
- froom(1,OSTUDLEATHER,0); /* a studded leather */
- froom(3,OSPLINT,0); /* a splint mail */
- froom(5,OSHIELD,rund(3)); /* a shield */
- froom(2,OBATTLEAXE,rund(3)); /* a battle axe */
- froom(5,OLONGSWORD,rund(3)); /* a long sword */
- froom(5,OFLAIL,rund(3)); /* a flail */
- froom(4,OREGENRING,rund(3)); /* ring of regeneration */
- froom(1,OPROTRING,rund(3)); /* ring of protection */
- froom(2,OSTRRING,4); /* ring of strength + 4 */
- froom(7,OSPEAR,rnd(5)); /* a spear */
- froom(3,OORBOFDRAGON,0); /* orb of dragon slaying*/
- froom(4,OSPIRITSCARAB,0); /*scarab of negate spirit*/
- froom(4,OCUBEofUNDEAD,0); /* cube of undead control */
- froom(2,ORINGOFEXTRA,0); /* ring of extra regen */
- froom(3,ONOTHEFT,0); /* device of antitheft */
- froom(2,OSWORDofSLASHING,0); /* sword of slashing */
- if (c[BESSMANN]==0)
- {
- froom(4,OHAMMER,0);/*Bessman's flailing hammer*/ c[BESSMANN]=1;
- }
- if (c[HARDGAME]<3 || (rnd(4)==3))
- {
- if (j>3)
- {
- froom(3,OSWORD,3); /* sunsword + 3 */
- froom(5,O2SWORD,rnd(4)); /* a two handed sword */
- froom(3,OBELT,4); /* belt of striking */
- froom(3,OENERGYRING,3); /* energy ring */
- froom(4,OPLATE,5); /* platemail + 5 */
- }
+ }
+ if (j == MAXLEVEL)
+ fillroom(OVOLUP, 0); /* volcano shaft up from the temple */
+
+ /* make the fixed objects in the maze STAIRS */
+ if ((j > 0) && (j != MAXLEVEL - 1) && (j != MAXLEVEL + MAXVLEVEL - 1))
+ fillroom(OSTAIRSDOWN, 0);
+ if ((j > 1) && (j != MAXLEVEL))
+ fillroom(OSTAIRSUP, 0);
+
+ /* make the random objects in the maze */
+
+ fillmroom(rund(3), OBOOK, j);
+ fillmroom(rund(3), OALTAR, 0);
+ fillmroom(rund(3), OSTATUE, 0);
+ fillmroom(rund(3), OPIT, 0);
+ fillmroom(rund(3), OFOUNTAIN, 0);
+ fillmroom(rnd(3) - 2, OIVTELETRAP, 0);
+ fillmroom(rund(2), OTHRONE, 0);
+ fillmroom(rund(2), OMIRROR, 0);
+ fillmroom(rund(2), OTRAPARROWIV, 0);
+ fillmroom(rnd(3) - 2, OIVDARTRAP, 0);
+ fillmroom(rund(3), OCOOKIE, 0);
+ if (j == 1)
+ fillmroom(1, OCHEST, j);
+ else
+ fillmroom(rund(2), OCHEST, j);
+ if ((j != MAXLEVEL - 1) && (j != MAXLEVEL + MAXVLEVEL - 1))
+ fillmroom(rund(2), OIVTRAPDOOR, 0);
+ if (j <= 10) {
+ fillmroom((rund(2)), ODIAMOND, rnd(10 * j + 1) + 10);
+ fillmroom(rund(2), ORUBY, rnd(6 * j + 1) + 6);
+ fillmroom(rund(2), OEMERALD, rnd(4 * j + 1) + 4);
+ fillmroom(rund(2), OSAPPHIRE, rnd(3 * j + 1) + 2);
+ }
+ for (i = 0; i < rnd(4) + 3; i++)
+ fillroom(OPOTION, newpotion()); /* make a POTION */
+ for (i = 0; i < rnd(5) + 3; i++)
+ fillroom(OSCROLL, newscroll()); /* make a SCROLL */
+ for (i = 0; i < rnd(12) + 11; i++)
+ fillroom(OGOLDPILE, 12 * rnd(j + 1) + (j << 3) + 10); /* make GOLD */
+ if (j == 5)
+ fillroom(OBANK2, 0); /* branch office of the bank */
+ froom(2, ORING, 0); /* a ring mail */
+ froom(1, OSTUDLEATHER, 0); /* a studded leather */
+ froom(3, OSPLINT, 0); /* a splint mail */
+ froom(5, OSHIELD, rund(3)); /* a shield */
+ froom(2, OBATTLEAXE, rund(3)); /* a battle axe */
+ froom(5, OLONGSWORD, rund(3)); /* a long sword */
+ froom(5, OFLAIL, rund(3)); /* a flail */
+ froom(4, OREGENRING, rund(3)); /* ring of regeneration */
+ froom(1, OPROTRING, rund(3)); /* ring of protection */
+ froom(2, OSTRRING, 4); /* ring of strength + 4 */
+ froom(7, OSPEAR, rnd(5)); /* a spear */
+ froom(3, OORBOFDRAGON, 0); /* orb of dragon slaying */
+ froom(4, OSPIRITSCARAB, 0); /* scarab of negate spirit */
+ froom(4, OCUBEofUNDEAD, 0); /* cube of undead control */
+ froom(2, ORINGOFEXTRA, 0); /* ring of extra regen */
+ froom(3, ONOTHEFT, 0); /* device of antitheft */
+ froom(2, OSWORDofSLASHING, 0); /* sword of slashing */
+ if (c[BESSMANN] == 0) {
+ froom(4, OHAMMER, 0); /* Bessman's flailing hammer */
+ c[BESSMANN] = 1;
+ }
+ if (c[HARDGAME] < 3 || (rnd(4) == 3)) {
+ if (j > 3) {
+ froom(3, OSWORD, 3); /* sunsword + 3 */
+ froom(5, O2SWORD, rnd(4)); /* a two handed sword */
+ froom(3, OBELT, 4); /* belt of striking */
+ froom(3, OENERGYRING, 3); /* energy ring */
+ froom(4, OPLATE, 5); /* platemail + 5 */