Angband
obj-gear.h
Go to the documentation of this file.
1 
20 #ifndef OBJECT_GEAR_H
21 #define OBJECT_GEAR_H
22 
23 #include "player.h"
24 
28 enum
29 {
30  #define EQUIP(a, b, c, d, e, f) EQUIP_##a,
31  #include "list-equip-slots.h"
32  #undef EQUIP
33  EQUIP_MAX
34 };
35 
36 int slot_by_name(struct player *p, const char *name);
37 bool slot_type_is(int slot, int type);
38 struct object *slot_object(struct player *p, int slot);
39 struct object *equipped_item_by_slot_name(struct player *p, const char *name);
40 int object_slot(struct player_body body, const struct object *obj);
41 bool object_is_equipped(struct player_body body, const struct object *obj);
42 bool object_is_carried(struct player *p, const struct object *obj);
43 const char *equip_mention(struct player *p, int slot);
44 const char *equip_describe(struct player *p, int slot);
45 int wield_slot(const struct object *obj);
46 bool minus_ac(struct player *p);
47 char gear_to_label(struct object *obj);
48 struct object *gear_last_item(void);
49 struct object *gear_object_for_use(struct object *obj, int num, bool message,
50  bool *none_left);
51 int inven_carry_num(const struct object *obj, bool stack);
52 bool inven_carry_okay(const struct object *obj);
53 void inven_item_charges(struct object *obj);
54 void inven_carry(struct player *p, struct object *obj, bool absorb,
55  bool message);
56 void inven_wield(struct object *obj, int slot);
57 void inven_takeoff(struct object *item);
58 void inven_drop(struct object *obj, int amt);
59 void combine_pack(void);
60 bool pack_is_full(void);
61 bool pack_is_overfull(void);
62 void pack_overflow(struct object *obj);
63 
64 
65 #endif /* OBJECT_GEAR_H */
const char * equip_describe(struct player *p, int slot)
Definition: obj-gear.c:217
bool object_is_carried(struct player *p, const struct object *obj)
Definition: obj-gear.c:136
const char * equip_mention(struct player *p, int slot)
Definition: obj-gear.c:198
void inven_carry(struct player *p, struct object *obj, bool absorb, bool message)
Add an item to the players inventory.
Definition: obj-gear.c:605
void inven_takeoff(struct object *item)
Take off a non-cursed equipment item.
Definition: obj-gear.c:777
bool object_is_equipped(struct player_body body, const struct object *obj)
Definition: obj-gear.c:131
char gear_to_label(struct object *obj)
Convert a gear object into a one character label.
Definition: obj-gear.c:340
void pack_overflow(struct object *obj)
Overflow an item from the pack, if it is overfull.
Definition: obj-gear.c:983
bool minus_ac(struct player *p)
Acid has hit the player, attempt to affect some armor.
Definition: obj-gear.c:273
int inven_carry_num(const struct object *obj, bool stack)
Calculate how much of an item is can be carried in the inventory or quiver.
Definition: obj-gear.c:524
bool pack_is_full(void)
Returns whether the pack is holding the maximum number of items.
Definition: obj-gear.c:966
Player implementation.
void combine_pack(void)
Combine items in the pack, confirming no blank objects or gold.
Definition: obj-gear.c:914
struct object * slot_object(struct player *p, int slot)
Definition: obj-gear.c:98
Object information, for a specific object.
Definition: object.h:394
struct object * gear_last_item(void)
Definition: obj-gear.c:400
int type
Definition: mon-msg.c:80
int num
Definition: libpng12/png.h:1527
int object_slot(struct player_body body, const struct object *obj)
Definition: obj-gear.c:118
int wield_slot(const struct object *obj)
Determine which equipment slot (if any) an item likes.
Definition: obj-gear.c:238
void inven_wield(struct object *obj, int slot)
Wield or wear a single item from the pack or floor.
Definition: obj-gear.c:683
types of slot for equipment
const char ** p[]
Definition: name.c:40
struct object * equipped_item_by_slot_name(struct player *p, const char *name)
Definition: obj-gear.c:108
int slot_by_name(struct player *p, const char *name)
Definition: obj-gear.c:48
Definition: obj-gear.h:59
bool inven_carry_okay(const struct object *obj)
Check if we have space for some of an item in the pack, optionally requiring stacking.
Definition: obj-gear.c:569
struct object * gear_object_for_use(struct object *obj, int num, bool message, bool *none_left)
Remove an amount of an object from the inventory or quiver, returning a detached object which can be ...
Definition: obj-gear.c:417
bool pack_is_overfull(void)
Returns whether the pack is holding the more than the maximum number of items.
Definition: obj-gear.c:975
Intialize random names
Definition: init.c:656
Most of the "player" information goes here.
Definition: player.h:452
void inven_drop(struct object *obj, int amt)
Drop (some of) a non-cursed inventory/equipment item "near" the current location. ...
Definition: obj-gear.c:819
bool slot_type_is(int slot, int type)
Definition: obj-gear.c:90
A player 'body'.
Definition: player.h:160
void inven_item_charges(struct object *obj)
Describe the charges on an item in the inventory.
Definition: obj-gear.c:577