Angband
mon-util.h
Go to the documentation of this file.
1 
19 #ifndef MONSTER_UTILITIES_H
20 #define MONSTER_UTILITIES_H
21 
22 #include "monster.h"
23 
25 const char *describe_race_flag(int flag);
26 void create_mon_flag_mask(bitflag *f, ...);
27 struct monster_race *lookup_monster(const char *name);
28 struct monster_base *lookup_monster_base(const char *name);
29 bool monster_is_nonliving(struct monster_race *race);
30 bool monster_is_unusual(struct monster_race *race);
31 bool match_monster_bases(const struct monster_base *base, ...);
32 void update_mon(struct monster *mon, struct chunk *c, bool full);
33 void update_monsters(bool full);
34 bool monster_carry(struct chunk *c, struct monster *mon, struct object *obj);
35 void monster_swap(int y1, int x1, int y2, int x2);
36 void become_aware(struct monster *m);
37 bool is_mimicking(struct monster *m);
38 void update_smart_learn(struct monster *m, struct player *p, int flag,
39  int pflag, int element);
40 
41 #endif /* MONSTER_UTILITIES_H */
Monster "race" information, including racial memories.
Definition: monster.h:263
bool is_mimicking(struct monster *m)
Returns true if the given monster is currently mimicking an item.
Definition: mon-util.c:675
struct monster_base * lookup_monster_base(const char *name)
Return the monster base matching the given name.
Definition: mon-util.c:126
Monster information, for a specific monster.
Definition: monster.h:320
void update_smart_learn(struct monster *m, struct player *p, int flag, int pflag, int element)
The given monster learns about an "observed" resistance or other player state property, or lack of it.
Definition: mon-util.c:688
png_infop png_uint_32 flag
Definition: libpng12/png.h:2191
bool match_monster_bases(const struct monster_base *base,...)
Return whether the given base matches any of the names given.
Definition: mon-util.c:144
Definition: cave.h:142
void update_monsters(bool full)
Updates all the (non-dead) monsters via update_mon().
Definition: mon-util.c:471
void become_aware(struct monster *m)
Make player fully aware of the given mimic.
Definition: mon-util.c:626
bool monster_is_unusual(struct monster_race *race)
Nonliving and stupid monsters are destroyed rather than dying.
Definition: mon-util.c:170
struct monster_race * lookup_monster(const char *name)
Returns the monster with the given name.
Definition: mon-util.c:99
void create_mon_flag_mask(bitflag *f,...)
Create a mask of monster flags of a specific type.
Definition: mon-util.c:71
Base monster type.
Definition: monster.h:190
const char ** p[]
Definition: name.c:40
byte bitflag
Definition: z-bitflag.h:27
Flags, structures and variables for monsters.
const char * describe_race_flag(int flag)
Functions.
Definition: mon-util.c:53
bool monster_is_nonliving(struct monster_race *race)
Nonliving monsters are immune to life drain.
Definition: mon-util.c:161
void update_mon(struct monster *mon, struct chunk *c, bool full)
This function updates the monster record of the given monster.
Definition: mon-util.c:236
Intialize random names
Definition: init.c:658
void monster_swap(int y1, int x1, int y2, int x2)
Swap the players/monsters (if any) at two locations.
Definition: mon-util.c:525
Most of the "player" information goes here.
Definition: player.h:454
bool monster_carry(struct chunk *c, struct monster *mon, struct object *obj)
Add the given object to the given monster's inventory.
Definition: mon-util.c:492