Angband
obj-chest.h
Go to the documentation of this file.
1 
20 #ifndef OBJECT_CHEST_H
21 #define OBJECT_CHEST_H
22 
26 #define CHEST_LOSE_STR 0x01
27 #define CHEST_LOSE_CON 0x02
28 #define CHEST_POISON 0x04
29 #define CHEST_PARALYZE 0x08
30 #define CHEST_EXPLODE 0x10
31 #define CHEST_SUMMON 0x20
32 
33 
41 };
42 
43 byte chest_trap_type(const struct object *obj);
44 bool is_trapped_chest(const struct object *obj);
45 bool is_locked_chest(const struct object *obj);
46 void unlock_chest(struct object *obj);
47 struct object *chest_check(int y, int x, enum chest_query check_type);
48 int count_chests(int *y, int *x, enum chest_query check_type);
49 bool do_cmd_open_chest(int y, int x, struct object *obj);
50 bool do_cmd_disarm_chest(int y, int x, struct object *obj);
51 
52 #endif /* OBJECT_CHEST_H */
bool do_cmd_open_chest(int y, int x, struct object *obj)
Attempt to open the given chest at the given location.
Definition: obj-chest.c:356
bool do_cmd_disarm_chest(int y, int x, struct object *obj)
Attempt to disarm the chest at the given location.
Definition: obj-chest.c:430
Definition: obj-chest.h:40
uint8_t byte
Definition: h-basic.h:167
struct object * chest_check(int y, int x, enum chest_query check_type)
Determine if a grid contains a chest matching the query type, and return a pointer to the first such ...
Definition: obj-chest.c:171
Object information, for a specific object.
Definition: object.h:393
int count_chests(int *y, int *x, enum chest_query check_type)
Return the number of grids holding a chests around (or under) the character.
Definition: obj-chest.c:206
bool is_trapped_chest(const struct object *obj)
Determine if a chest is trapped.
Definition: obj-chest.c:125
byte chest_trap_type(const struct object *obj)
The type of trap a chest has.
Definition: obj-chest.c:112
Definition: obj-chest.h:38
Definition: obj-chest.h:39
bool is_locked_chest(const struct object *obj)
Determine if a chest is locked or trapped.
Definition: obj-chest.c:146
void unlock_chest(struct object *obj)
Unlock a chest.
Definition: obj-chest.c:162
chest_query
Chest check types.
Definition: obj-chest.h:37