Crossfire Server, Trunk
monster.cpp File Reference
#include "global.h"
#include <stdlib.h>
#include "random_map.h"
#include "rproto.h"
+ Include dependency graph for monster.cpp:

Go to the source code of this file.


void place_monsters (mapstruct *map, char *monsterstyle, int difficulty, RMParms *RP)

Detailed Description

Monster placement for random maps.

Definition in file monster.cpp.

Function Documentation

◆ 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.

mapwhere to put monsters on.
monsterstylestyle. Can be NULL, in which case a random one is used.
difficultyhow difficult the monsters should be, and how many there should be.
RPrandom map parameters.

Definition at line 38 of file monster.cpp.

References object::arch, living::exp, find_style(), freearr_x, freearr_y, generate_artifact(), living::hp, INS_NO_MERGE, INS_NO_WALK_ON, level_exp(), disinfect::map, MAP_HEIGHT, MAP_WIDTH, archetype::more, object_copy_with_inv(), object_create_arch(), object_find_first_free_spot(), object_insert_in_map_at(), pick_random_object(), RANDOM, rndm(), object::stats, RMParms::total_map_hp, diamondslots::x, RMParms::Xsize, diamondslots::y, and RMParms::Ysize.

Referenced by generate_random_map().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: