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_armor(const struct object *obj);
38 bool tval_is_body_armor(const struct object *obj);
39 bool tval_is_book_k(const struct object_kind *kind);
40 bool tval_is_chest(const struct object *obj);
41 bool tval_is_food(const struct object *obj);
42 bool tval_is_food_k(const struct object_kind *kind);
43 bool tval_is_mushroom(const struct object *obj);
44 bool tval_is_mushroom_k(const struct object_kind *kind);
45 bool tval_is_fuel(const struct object *obj);
46 bool tval_is_head_armor(const struct object *obj);
47 bool tval_is_jewelry(const struct object *obj);
48 bool tval_is_launcher(const struct object *obj);
49 bool tval_is_light(const struct object *obj);
50 bool tval_is_light_k(const struct object_kind *kind);
51 bool tval_is_melee_weapon(const struct object *obj);
52 bool tval_is_money(const struct object *obj);
53 bool tval_is_money_k(const struct object_kind *kind);
54 bool tval_is_pointy(const struct object *obj);
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:192
bool tval_can_have_timeout(const struct object *obj)
Definition: obj-tval.c:125
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:197
bool tval_is_head_armor(const struct object *obj)
Definition: obj-tval.c:142
Information about object kinds, including player knowledge.
Definition: object.h:157
bool tval_can_have_nourishment(const struct object *obj)
Definition: obj-tval.c:114
bool tval_is_launcher(const struct object *obj)
Definition: obj-tval.c:159
bool tval_is_ammo(const struct object *obj)
Definition: obj-tval.c:147
bool tval_is_armor(const struct object *obj)
Definition: obj-tval.c:214
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:274
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:232
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:311
int tval
General object type (see TV_ macros)
Definition: object.h:166
bool tval_is_edible(const struct object *obj)
Definition: obj-tval.c:300
bool tval_is_fuel(const struct object *obj)
Definition: obj-tval.c:89
bool tval_is_pointy(const struct object *obj)
Definition: obj-tval.c:104
bool tval_can_have_charges(const struct object *obj)
Definition: obj-tval.c:120
bool tval_is_body_armor(const struct object *obj)
Definition: obj-tval.c:130
int tval_find_idx(const char *name)
Returns the numeric equivalent tval of the textual tval name.
Definition: obj-tval.c:373
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:328
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:414
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:109
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:436
bool tval_has_variable_power(const struct object *obj)
Definition: obj-tval.c:245
const char * tval_find_name(int tval)
Returns the textual equivalent tval of the numeric tval name.
Definition: obj-tval.c:398
Intialize random names
Definition: init.c:658
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:164
bool tval_is_zapper(const struct object *obj)
Definition: obj-tval.c:339
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:180