Go to the documentation of this file.
20 #ifndef OBJECT_CHEST_H
21 #define OBJECT_CHEST_H
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
41 };
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(struct loc grid, enum chest_query check_type);
48 int count_chests(struct loc *grid, enum chest_query check_type);
49 bool do_cmd_open_chest(struct loc grid, struct object *obj);
50 bool do_cmd_disarm_chest(struct object *obj);
52 #endif /* OBJECT_CHEST_H */
bool do_cmd_disarm_chest(struct object *obj)
Attempt to disarm the chest at the given location.
Definition: obj-chest.c:428
Definition: z-type.h:24
struct loc grid
position on map, or (0, 0)
Definition: object.h:412
Definition: obj-chest.h:40
uint8_t byte
Definition: h-basic.h:167
Object information, for a specific object.
Definition: object.h:401
struct object * chest_check(struct loc grid, 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
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 do_cmd_open_chest(struct loc grid, struct object *obj)
Attempt to open the given chest at the given location.
Definition: obj-chest.c:354
int count_chests(struct loc *grid, 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_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 check types.
Definition: obj-chest.h:37