Crossfire Server, Branch 1.12
R12190
|
Monster placement for random maps. More...
Go to the source code of this file.
Functions | |
void | insert_multisquare_ob_in_map (object *new_obj, mapstruct *map) |
Inserts a monster in the map. | |
void | place_monsters (mapstruct *map, char *monsterstyle, int difficulty, RMParms *RP) |
Place some monsters into the map. |
Monster placement for random maps.
Definition in file monster.c.
void insert_multisquare_ob_in_map | ( | object * | new_obj, |
mapstruct * | map | ||
) |
Inserts a monster in the map.
Some monsters are multisquare, and these guys require special handling.
new_obj | monster to insert. Its x and y fields must be the desired location. |
map | where to insert to. |
Definition at line 49 of file monster.c.
References arch_to_object(), and insert_ob_in_map().
Referenced by include_map_in_map(), and place_monsters().
void place_monsters | ( | mapstruct * | map, |
char * | monsterstyle, | ||
int | difficulty, | ||
RMParms * | RP | ||
) |
Place some monsters into the map.
Their experience is linked to difficulty to insert a suitable number of critters.
map | where to put monsters on. |
monsterstyle | style. Can be NULL, in which case a random one is used. |
difficulty | how difficult the monsters should be, and how many there should be. |
RP | random map parameters. |
Definition at line 89 of file monster.c.
References arch_to_object(), copy_object_with_inv(), find_first_free_spot(), find_style(), freearr_x, freearr_y, insert_multisquare_ob_in_map(), level_exp(), MAP_HEIGHT, MAP_WIDTH, pick_random_object(), snprintf(), RMParms::total_map_hp, RMParms::Xsize, and RMParms::Ysize.
Referenced by generate_random_map().