rund
for (i = 18 * rund(i - '0'); i > 0; i--)
mit = rund(8) + DEMONLORD;
item[i = tx + rund(xsize)][j = ty + (ysize - 1) * rund(2)] = OCLOSEDDOOR;
item[i = tx + (xsize - 1) * rund(2)][j = ty + rund(ysize)] = OCLOSEDDOOR;
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(rund(2), OTHRONE, 0);
fillmroom(rund(2), OMIRROR, 0);
fillmroom(rund(2), OTRAPARROWIV, 0);
fillmroom(rund(3), OCOOKIE, 0);
fillmroom(rund(2), OCHEST, j);
fillmroom(rund(2), OIVTRAPDOOR, 0);
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);
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 */
rndcount[rund(16)]++;
dir = rund(9);
losemspells((int)rund(3)); /* lose spells */
i = rund(26);
raisemspells((int)rund(3));
int rund(int);
#define newscroll() (scprob[rund(81)])
#define newpotion() (potprob[rund(41)])
#define newleather() (nlpts[rund(c[HARDGAME]?13:15)])
#define newchain() (nch[rund(10)])
#define newplate() (nplt[rund(c[HARDGAME]?4:12)])
#define newdagger() (ndgg[rund(13)])
#define newsword() (nsw[rund(c[HARDGAME]?6:13)])
*i = rund(lev / 3 + 1);
*i = rund(lev / 4 + 1);
*i = rund(lev / 2 + 1);
*i = rund(lev / 3 + 1);
*i = rund(lev / 2 + 1);
i = rund(26);
return (spattack(spsel[rund(10)], xx, yy));
i = rund((tmp = splev[lev]) ? tmp : 1);
c[rund(6)]++;