Go to the documentation of this file.
19 #ifndef OBJECT_TVAL_H
20 #define OBJECT_TVAL_H
22 #include "object.h"
27 #define SV_UNKNOWN 0
29 bool tval_can_have_charges(const struct object *obj);
30 bool tval_can_have_failure(const struct object *obj);
31 bool tval_can_have_flavor_k(const struct object_kind *kind);
32 bool tval_can_have_nourishment(const struct object *obj);
33 bool tval_can_have_timeout(const struct object *obj);
34 int tval_find_idx(const char *name);
35 const char *tval_find_name(int tval);
36 bool tval_is_ammo(const struct object *obj);
37 bool tval_is_sharp_missile(const struct object *obj);
38 bool tval_is_armor(const struct object *obj);
39 bool tval_is_body_armor(const struct object *obj);
40 bool tval_is_book_k(const struct object_kind *kind);
41 bool tval_is_chest(const struct object *obj);
42 bool tval_is_food(const struct object *obj);
43 bool tval_is_food_k(const struct object_kind *kind);
44 bool tval_is_mushroom(const struct object *obj);
45 bool tval_is_mushroom_k(const struct object_kind *kind);
46 bool tval_is_fuel(const struct object *obj);
47 bool tval_is_head_armor(const struct object *obj);
48 bool tval_is_jewelry(const struct object *obj);
49 bool tval_is_launcher(const struct object *obj);
50 bool tval_is_light(const struct object *obj);
51 bool tval_is_light_k(const struct object_kind *kind);
52 bool tval_is_melee_weapon(const struct object *obj);
53 bool tval_is_money(const struct object *obj);
54 bool tval_is_money_k(const struct object_kind *kind);
55 bool tval_is_digger(const struct object *obj);
56 bool tval_is_potion(const struct object *obj);
57 bool tval_is_ring(const struct object *obj);
58 bool tval_is_rod(const struct object *obj);
59 bool tval_is_scroll(const struct object *obj);
60 bool tval_is_staff(const struct object *obj);
61 bool tval_is_useable(const struct object *obj);
62 bool tval_is_wand(const struct object *obj);
63 bool tval_is_weapon(const struct object *obj);
64 bool tval_has_variable_power(const struct object *obj);
65 bool tval_is_wearable(const struct object *obj);
66 bool tval_is_edible(const struct object *obj);
67 bool tval_is_zapper(const struct object *obj);
68 int tval_sval_count(const char *name);
69 int tval_sval_list(const char *name, int *list, int max_size);
71 #endif /* OBJECT_TVAL_H */
bool tval_is_jewelry(const struct object *obj)
Definition: obj-tval.c:198
bool tval_can_have_timeout(const struct object *obj)
Definition: obj-tval.c:120
bool tval_is_money(const struct object *obj)
Definition: obj-tval.c:94
bool tval_is_weapon(const struct object *obj)
Definition: obj-tval.c:203
bool tval_is_head_armor(const struct object *obj)
Definition: obj-tval.c:137
Information about object kinds, including player knowledge.
Definition: object.h:182
bool tval_can_have_nourishment(const struct object *obj)
Definition: obj-tval.c:109
bool tval_is_launcher(const struct object *obj)
Definition: obj-tval.c:165
bool tval_is_ammo(const struct object *obj)
Definition: obj-tval.c:142
bool tval_is_armor(const struct object *obj)
Definition: obj-tval.c:220
bool tval_is_money_k(const struct object_kind *kind)
Definition: obj-tval.c:99
bool tval_is_rod(const struct object *obj)
Definition: obj-tval.c:34
bool tval_is_potion(const struct object *obj)
Definition: obj-tval.c:39
bool tval_is_wand(const struct object *obj)
Definition: obj-tval.c:29
bool tval_is_wearable(const struct object *obj)
Definition: obj-tval.c:280
bool tval_is_food(const struct object *obj)
Definition: obj-tval.c:49
bool tval_is_melee_weapon(const struct object *obj)
Definition: obj-tval.c:238
bool tval_is_food_k(const struct object_kind *kind)
Definition: obj-tval.c:54
bool tval_is_light(const struct object *obj)
Definition: obj-tval.c:69
bool tval_can_have_flavor_k(const struct object_kind *kind)
Definition: obj-tval.c:317
int tval
General object type (see TV_ macros)
Definition: object.h:191
bool tval_is_edible(const struct object *obj)
Definition: obj-tval.c:306
bool tval_is_fuel(const struct object *obj)
Definition: obj-tval.c:89
bool tval_can_have_charges(const struct object *obj)
Definition: obj-tval.c:115
bool tval_is_body_armor(const struct object *obj)
Definition: obj-tval.c:125
int tval_find_idx(const char *name)
Returns the numeric equivalent tval of the textual tval name.
Definition: obj-tval.c:382
bool tval_is_mushroom_k(const struct object_kind *kind)
Definition: obj-tval.c:64
bool tval_is_book_k(const struct object_kind *kind)
Definition: obj-tval.c:334
basic object structs and enums
int tval_sval_count(const char *name)
Counts the svals (from object.txt) of a given non-null tval.
Definition: obj-tval.c:423
bool tval_is_chest(const struct object *obj)
Definition: obj-tval.c:84
bool tval_is_digger(const struct object *obj)
Definition: obj-tval.c:104
bool tval_is_light_k(const struct object_kind *kind)
Definition: obj-tval.c:74
int tval_sval_list(const char *name, int *list, int max_size)
Lists up to max_size svals (from object.txt) of a given non-null tval Assumes list has allocated spac...
Definition: obj-tval.c:445
bool tval_has_variable_power(const struct object *obj)
Definition: obj-tval.c:251
const char * tval_find_name(int tval)
Returns the textual equivalent tval of the numeric tval name.
Definition: obj-tval.c:407
Intialize random names
Definition: init.c:1084
bool tval_is_ring(const struct object *obj)
Definition: obj-tval.c:79
bool tval_is_staff(const struct object *obj)
Definition: obj-tval.c:24
bool tval_is_useable(const struct object *obj)
Definition: obj-tval.c:170
bool tval_is_sharp_missile(const struct object *obj)
Definition: obj-tval.c:154
bool tval_is_zapper(const struct object *obj)
Definition: obj-tval.c:348
bool tval_is_scroll(const struct object *obj)
Definition: obj-tval.c:44
bool tval_is_mushroom(const struct object *obj)
Definition: obj-tval.c:59
bool tval_can_have_failure(const struct object *obj)
Definition: obj-tval.c:186