Lines Matching refs:rn2
142 croom = &rooms[rn2(nroom)];
149 croom = &rooms[rn2(nroom - 1)];
168 if (!rn2(3))
174 while (!rn2(8 - (dlevel / 6)))
176 if (!goldseen && !rn2(3))
178 if (!rn2(3)) {
181 while (!rn2(5)) {
197 if (rn2(3)) {
205 if (!rn2(3))
215 if (dlevel > 1 && dlevel < 20 && rn2(dlevel) < 3)
217 else if (dlevel > 6 && !rn2(7))
219 else if (dlevel > 9 && !rn2(5))
221 else if (dlevel > 11 && !rn2(6))
223 else if (dlevel > 18 && !rn2(6))
250 !rn2((MAXNROFROOMS - nroom) * (MAXNROFROOMS - nroom)))
254 rsp = &rs[rn2(rscnt)];
264 dx = 2 + rn2((hx - lx - 8 > 20) ? 12 : 8);
265 dy = 2 + rn2(4);
274 if (secret || !rn2(MAXNROFROOMS + 1 - nroom - tryct)) {
284 lowx = lx + xlim + rn2(hx - lx - dx - 2 * xlim + 1);
285 lowy = ly + ylim + rn2(hy - ly - dy - 2 * ylim + 1);
384 x = (xl == xh) ? xl : (xl + rn2(xh - xl + 1));
385 y = (yl == yh) ? yl : (yl + rn2(yh - yl + 1));
430 dosdoor(x, y, aroom, rn2(8) ? DOOR : SDOOR);
488 if (!rn2(3))
507 if ((rnd(dlevel) < 10 && rn2(77)) || (ddx == 1 && ddy == 1)) {
559 for (nxcor = rn2(nroom) + 4; nxcor; nxcor--) {
560 a = rn2(nroom);
561 b = rn2(nroom - 2);
630 if (cct++ > 500 || (nxcor && !rn2(35)))
638 if (rn2(100)) {
641 if (nxcor && !rn2(50))
735 aroom = &rooms[rn2(nroom - 1)];
738 if (aroom->doorct == 1 && rn2(5))
740 if (rn2(2)) {
751 if (with_trap || !rn2(4)) {
763 if (rn2(7))
764 dosdoor(xx, yy, aroom, rn2(5) ? SDOOR : DOOR);
767 if (!rn2(3))
788 kind = rn2(TRAPNUM - nopierc - nomimic);
796 fakedoor = (!rn2(3) && !mazeflag);
797 fakegold = (!fakedoor && !rn2(2));
805 if (rn2(2)) {
806 if (rn2(2))
812 if (rn2(2))
832 (mazeflag && rn2(2)) ? AMULET_SYM :
833 "=/)%?![<>"[rn2(9)];
851 if (mazeflag && !rn2(10) && ttmp->ttyp < PIERC)