monster.c File Reference

#include "monster.h"
#include "level.h"
#include "weapons.h"
#include "genmacro.h"
#include "generalfunc.h"
#include "item.h"
#include "skillpr.h"
#include <stdlib.h>
#include <math.h>
Include dependency graph for monster.c:
This graph shows which files directly or indirectly include this file:

Functions

void add_monster (struct monster m)
 Registers monster.
struct monster get_randmon (int diff)
 Returns random monster with specified difficulty.
void monster_init ()
void createmonsters (struct leveldata ld, struct player pl)
 Places monsters into level.
struct exit_code m_interact (struct player *pl, struct monster *mon)
 Interaction between player and monster.
struct exit_code dodmg_tomon (struct player *pl, struct monster *mon, int damage)
 Does damage to monster (usually ranged).
struct int_container findmon (struct cell *level, int columns, int rows, int idx, float radius)
 Finds near monsters.
struct monsterfind_class_prop (int class)
void monster_killall ()
struct monster_container get_all_monsters ()
 Returns container with all registered monsters.

Function Documentation

void add_monster ( struct monster  m  ) 

Registers monster.

void createmonsters ( struct leveldata  ld,
struct player  pl 
)

Places monsters into level.

Parameters:
ld - Level
pl - Player on level

Here is the call graph for this function:

struct exit_code dodmg_tomon ( struct player pl,
struct monster mon,
int  damage 
) [read]

Does damage to monster (usually ranged).

struct monster* find_class_prop ( int  class  )  [read]
struct int_container findmon ( struct cell level,
int  columns,
int  rows,
int  idx,
float  radius 
) [read]

Finds near monsters.

Finds monsters on level in sphere with radius radius and center in idx

Parameters:
level - Level
columns - Number of columns
rows - Number of rows

Here is the call graph for this function:

struct monster_container get_all_monsters (  )  [read]

Returns container with all registered monsters.

struct monster get_randmon ( int  diff  )  [read]

Returns random monster with specified difficulty.

struct exit_code m_interact ( struct player pl,
struct monster mon 
) [read]

Interaction between player and monster.

Interaction between player and monster when player has turn

Here is the call graph for this function:

void monster_init (  ) 
void monster_killall (  ) 
Generated on Mon Nov 15 10:27:01 2010 for Tales of Paraverse by  doxygen 1.6.3