Home | History | Annotate | Download | only in warp

Lines Matching refs:rand_mod

106 	    inumstars = 50 + rand_mod(50);
108 inumstars = exdis(800) + rand_mod(100) + 1;
110 inumstars = exdis(700) + rand_mod(150-super*2) + 50+super*2;
112 tmptholspec = (smarts > 15 && inumstars < 450 && ! rand_mod(90-sm80));
114 inumenemies = rand_mod((smarts+1)/2) + 1;
119 inumfriends = rand_mod(smarts/8+1);
121 inumpirates = rand_mod(inumfriends/2+1);
138 ((!numstars || rand_mod(2) || smarts < 10) ? 0 : 1);
142 crushspec||massacre?1:(rand_mod(2000) < inumstars);
145 !rand_mod(inumcrushes?3-massacre:8) ); /* < and & are fun together */
147 if (!rand_mod(40)) {
149 inumfriends += rand_mod(10);
150 inumpirates += rand_mod(10);
155 if (!rand_mod(10))
157 if (!rand_mod(4))
158 inhenergy += rand_mod(3500+super*150);
172 dist = rand_mod(starspec||smarts<=5?3:5);
180 if (inumstars < 700 && !rand_mod(3-(inumstars<50))) {
182 y = rand_mod(YSIZE);
183 x = rand_mod(XSIZE);
184 if (rand_mod(2))
191 ydist = rand_mod(4);
192 xdist = rand_mod(2);
195 yoff = rand_mod(YSIZE);
196 xoff = rand_mod(XSIZE);
208 (prescene>=0?prescene:rand_mod(MAPS)) );
214 ydist = rand_mod(2) + 4; /* flip y axis? */
215 xdist = rand_mod(2) + 4; /* flip x axis? */
216 yoff = rand_mod(YSIZE); /* how much to shift y */
217 xoff = rand_mod(XSIZE); /* how much to shift x */
222 if (rand_mod(2))
230 ydist = rand_mod(4);
231 xdist = rand_mod(2);
232 if (!rand_mod(4)) {
239 yoff = rand_mod(YSIZE);
240 xoff = rand_mod(XSIZE);
246 x = rand_mod(XSIZE); /* pick from 0..39, uniform */
264 x += rand_mod(3) - 1;
269 y = rand_mod(YSIZE);
299 y += rand_mod(3) - 1;
303 if (!rand_mod(walksplit)) {
304 y = rand_mod(YSIZE);
305 x = rand_mod(XSIZE);
314 e = rand_mod(32768);
324 obj = make_object(Star,ch,y,x,0,0,e+rand_mod(super*100+1),e/4,&root);
328 !rand_mod(3 - (inumstars > 400) - (inhenergy > 32768)) ) {
334 while (rand_mod(2) && inuminhab < inumstars/2) {
335 for (i=rand_mod(smarts)*2+20; i; i--) {
343 y = (y + rand_mod(3) + YSIZE99) % YSIZE;
344 x = (x + rand_mod(3) + XSIZE99) % XSIZE;
351 x = initx = rand_mod(XSIZE);
352 y = inity = rand_mod(YSIZE);
359 x = rand_mod(XSIZE);
360 y = rand_mod(YSIZE);
368 x = rand_mod(XSIZE);
369 y = rand_mod(YSIZE);
380 x = rand_mod(XSIZE);
381 y = rand_mod(YSIZE);
390 x = rand_mod(XSIZE);
391 y = rand_mod(YSIZE);
394 (long)entmax+entmax+rand_mod(entmax),&root);
397 if (rand_mod(2))
398 modify_amoeba(y,x,2,'~',(int)rand_mod(smarts<<1));/* just make blob */
401 nuke->strategy = rand_mod(256); /* random direction */
402 modify_amoeba(y,x,2,'~',(int)rand_mod(5));
403 modify_amoeba(y,x,2,'~',(int)rand_mod(5));
404 modify_amoeba(y,x,2,'~',(int)rand_mod(5));
405 modify_amoeba(y,x,2,'~',(int)rand_mod(5)); /* extend pseudopod */
413 if (rand_mod(27-sm50/2) && !romspec && !gornspec)
416 dist = rand_mod(4) + 1;
419 x = rand_mod(XSIZE);
420 y = rand_mod(YSIZE);
422 if (rand_mod(dist)) {
423 if (!tholspec && !tmptholspec && rand_mod((inumstars*3)/sm50+2))
437 if (rand_mod(100) < e) {
453 e + rand_mod(super*200+2) + 10000*massacre,e/4,&root);
479 x = rand_mod(XSIZE);
480 y = rand_mod(YSIZE);
489 dist = rand_mod(20);
493 e + rand_mod(super*200+2),e/4,&root);
496 if (smarts >= 20 && !rand_mod(10-smarts/10))