#include "cell.h"
#include "player.h"
#include "gc.h"
#include "step.h"
#include "main.h"
Data Structures | |
struct | monster_container |
struct | monster |
Structure for storing monster info. More... | |
struct | mon_exit_code |
Defines | |
#define | MONSTER 4 |
#define | DIFF_GRADES 16 |
#define | MAX_SPEC 20 |
#define | CL_MOLD 0 |
#define | LICHEN 0 |
#define | GREEN_MOLD 1 |
#define | BROWN_MOLD 2 |
#define | RED_MOLD 3 |
#define | SHRIEKER 4 |
#define | CL_DUMMY -99 |
#define | CL_ORC 1 |
#define | ORC_WARRIOR 0 |
#define | ORC_SHAMAN 1 |
#define | ORC_KING 2 |
#define | CL_TROLL 2 |
#define | ICE_TROLL 0 |
#define | MOUNTAIN_TROLL 1 |
#define | FOREST_TROLL 2 |
#define | M_SET_CLASS_PROP(...) |
#define | REGISTER_MONSTER(...) |
#define | M_ALIVE 4 |
#define | M_DEAD 5 |
#define | PL2MON 0 |
Player hits monster. | |
#define | MON2PL 1 |
Monster hits player. | |
#define | INTERACT 2 |
Fight between monster and player. | |
Functions | |
void | add_monster (struct monster m) |
Registers monster. | |
struct monster | get_randmon (int diff) |
Returns random monster with specified difficulty. | |
struct monster_container | get_all_monsters () |
Returns container with all registered monsters. | |
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 dmg) |
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 () |
Variables | |
struct monster_container | all_monsters |
struct monster_container | group_general |
#define BROWN_MOLD 2 |
#define CL_DUMMY -99 |
#define CL_MOLD 0 |
#define CL_ORC 1 |
#define CL_TROLL 2 |
#define DIFF_GRADES 16 |
#define FOREST_TROLL 2 |
#define GREEN_MOLD 1 |
#define ICE_TROLL 0 |
#define INTERACT 2 |
Fight between monster and player.
#define LICHEN 0 |
#define M_ALIVE 4 |
#define M_DEAD 5 |
#define M_SET_CLASS_PROP | ( | ... | ) |
{struct monster mon; __VA_ARGS__ struct monster *mel = \ find_class_prop (mon.class); \ if (mel != NULL) *mel = mon; else {*(group_general.con+group_general.num[0]) = \ mon; group_general.num[0]++;}}
#define MAX_SPEC 20 |
#define MON2PL 1 |
Monster hits player.
#define MONSTER 4 |
#define MOUNTAIN_TROLL 1 |
#define ORC_KING 2 |
#define ORC_SHAMAN 1 |
#define ORC_WARRIOR 0 |
#define PL2MON 0 |
Player hits monster.
#define RED_MOLD 3 |
#define REGISTER_MONSTER | ( | ... | ) |
{struct monster mon; __VA_ARGS__ struct monster *mel = \ find_class_prop (mon.class); \ if (mel != NULL) {mon = *mel; __VA_ARGS__} add_monster(mon);}
#define SHRIEKER 4 |
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 | ( | ) |
struct monster_container all_monsters |
struct monster_container group_general |