#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>
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 monster * | find_class_prop (int class) |
void | monster_killall () |
struct monster_container | get_all_monsters () |
Returns container with all registered monsters. |
void add_monster | ( | struct monster | m | ) |
Registers monster.
Places monsters into level.
ld | - Level | |
pl | - Player on level |
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
level | - Level | |
columns | - Number of columns | |
rows | - Number of rows |
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.
Interaction between player and monster.
Interaction between player and monster when player has turn
void monster_init | ( | ) |
void monster_killall | ( | ) |