version 1.5 | | version 1.6 |
---|
| | |
/* | | /* |
* static char *rcsid_treasure_c = | | * static char *rcsid_treasure_c = |
* "$Id: treasure.c,v 1.5 2000/06/20 07:33:38 peterm Exp $"; | | * "$Id: treasure.c,v 1.6 2000/06/21 04:54:57 peterm Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
while(tries<5&&the_keymaster==NULL) { | | while(tries<5&&the_keymaster==NULL) { |
i = (RANDOM()%(Xsize-2))+1; | | i = (RANDOM()%(Xsize-2))+1; |
j = (RANDOM()%(Ysize-2))+1; | | j = (RANDOM()%(Ysize-2))+1; |
| | tries++; |
the_keymaster=find_closest_monster(map,i,j); | | the_keymaster=find_closest_monster(map,i,j); |
} | | } |
/* if we don't find a good keymaster, drop the key on the ground. */ | | /* if we don't find a good keymaster, drop the key on the ground. */ |