Go to the documentation of this file.
41 int failed_placements;
42 int64_t exp_per_sq, total_experience;
43 int number_monsters = 0;
46 const char *styledirname =
"/styles/monsterstyles";
47 style_map =
find_style(styledirname, monsterstyle, difficulty);
48 if (style_map == NULL) {
55 failed_placements = 0;
57 while (exp_per_sq <=
level_exp(difficulty, 1.0)
58 && failed_placements < 100
59 && number_monsters < (RP->
Xsize*RP->
Ysize)/8) {
63 if (this_monster == NULL) {
69 if (freeindex != -1) {
76 total_experience += this_monster->
stats.
exp;
77 for (at = new_monster->
arch; at != NULL; at = at->
more) {
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
mapstruct * find_style(const char *dirname, const char *stylename, int difficulty)
short freearr_x[SIZEOFFREE]
short freearr_y[SIZEOFFREE]
void object_copy_with_inv(const object *src_ob, object *dest_ob)
object * object_create_arch(archetype *at)
int64_t level_exp(int level, double expmul)
long unsigned int total_map_hp
void place_monsters(mapstruct *map, char *monsterstyle, int difficulty, RMParms *RP)
object * pick_random_object(mapstruct *style)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)