62 for (at = new_obj->
arch->
more; at != NULL; at = at->
more) {
68 new_seg->
map = old_seg->
map;
71 old_seg->
more = new_seg;
90 char styledirname[256];
92 int failed_placements;
93 sint64 exp_per_sq, total_experience;
94 int number_monsters = 0;
97 snprintf(styledirname,
sizeof(styledirname),
"%s",
"/styles/monsterstyles");
98 style_map =
find_style(styledirname, monsterstyle, difficulty);
99 if (style_map == NULL)
104 total_experience = 0;
105 failed_placements = 0;
107 while (exp_per_sq <=
level_exp(difficulty, 1.0)
108 && failed_placements < 100
109 && number_monsters < (RP->
Xsize*RP->
Ysize)/8) {
113 if (this_monster == NULL)
115 x = RANDOM()%RP->
Xsize;
116 y = RANDOM()%RP->
Ysize;
118 if (freeindex != -1) {
127 total_experience += this_monster->
stats.
exp;
128 for (at = new_monster->
arch; at != NULL; at = at->
more)
short freearr_x[SIZEOFFREE]
sint64 level_exp(int level, double expmul)
object * pick_random_object(mapstruct *style)
short freearr_y[SIZEOFFREE]
long unsigned int total_map_hp
int find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
object * insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag)
int snprintf(char *dest, int max, const char *format,...)
void insert_multisquare_ob_in_map(object *new_obj, mapstruct *map)
void copy_object_with_inv(object *src_ob, object *dest_ob)
mapstruct * find_style(const char *dirname, const char *stylename, int difficulty)
void place_monsters(mapstruct *map, char *monsterstyle, int difficulty, RMParms *RP)
object * arch_to_object(archetype *at)