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 
24 const char *describe_race_flag(int flag);
25 void create_mon_flag_mask(bitflag *f, ...);
26 struct monster_race *lookup_monster(const char *name);
27 struct monster_base *lookup_monster_base(const char *name);
28 bool match_monster_bases(const struct monster_base *base, ...);
29 void update_mon(struct monster *mon, struct chunk *c, bool full);
30 void update_monsters(bool full);
31 bool monster_carry(struct chunk *c, struct monster *mon, struct object *obj);
32 void monster_swap(int y1, int x1, int y2, int x2);
33 void become_aware(struct monster *m);
34 void update_smart_learn(struct monster *mon, struct player *p, int flag,
35  int pflag, int element);
36 bool find_any_nearby_injured_kin(struct chunk *c, const struct monster *mon);
37 struct monster *choose_nearby_injured_kin(struct chunk *c, const struct monster *mon);
38 void monster_death(struct monster *mon, bool stats);
39 bool mon_take_hit(struct monster *mon, int dam, bool *fear, const char *note);
40 void monster_take_terrain_damage(struct monster *mon);
41 
42 #endif /* MONSTER_UTILITIES_H */
Monster "race" information, including racial memories.
Definition: monster.h:265
static int stats[STAT_MAX]
All of these should be in some kind of 'birth state' struct somewhere else
Definition: player-birth.c:118
struct monster_base * lookup_monster_base(const char *name)
Return the monster base matching the given name.
Definition: mon-util.c:134
Monster information, for a specific monster.
Definition: monster.h:323
bool find_any_nearby_injured_kin(struct chunk *c, const struct monster *mon)
Find out if there are any injured monsters nearby.
Definition: mon-util.c:753
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:152
Definition: cave.h:160
void update_monsters(bool full)
Updates all the (non-dead) monsters via update_mon().
Definition: mon-util.c:468
void become_aware(struct monster *m)
Make player fully aware of the given mimic.
Definition: mon-util.c:609
struct monster_race * lookup_monster(const char *name)
Returns the monster with the given name.
Definition: mon-util.c:107
void create_mon_flag_mask(bitflag *f,...)
Create a mask of monster flags of a specific type.
Definition: mon-util.c:79
Base monster type.
Definition: monster.h:193
void monster_take_terrain_damage(struct monster *mon)
Terrain damages monster.
Definition: mon-util.c:1067
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)
Return a description for the given monster race flag.
Definition: mon-util.c:61
void update_smart_learn(struct monster *mon, 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:662
void monster_death(struct monster *mon, bool stats)
Handles the "death" of a monster.
Definition: mon-util.c:806
struct monster * choose_nearby_injured_kin(struct chunk *c, const struct monster *mon)
Choose one injured monster of the same base in LOS of the provided monster.
Definition: mon-util.c:772
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:255
Intialize random names
Definition: init.c:756
void monster_swap(int y1, int x1, int y2, int x2)
Swap the players/monsters (if any) at two locations.
Definition: mon-util.c:522
Most of the "player" information goes here.
Definition: player.h:450
bool mon_take_hit(struct monster *mon, int dam, bool *fear, const char *note)
Decreases a monster's hit points by dam and handle monster death.
Definition: mon-util.c:884
void note(const char *message)
Utility
Definition: savefile.c:177
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:489