Data Fields
object Struct Reference

Object information, for a specific object. More...

#include <object.h>

Data Fields

struct object_kindkind
 Kind of the object. More...
struct ego_itemego
 Ego item info of the object, if any. More...
struct artifactartifact
 Artifact info of the object, if any. More...
struct objectprev
 Previous object in a pile. More...
struct objectnext
 Next object in a pile. More...
struct objectknown
 Known version of this object. More...
u16b oidx
 Item list index, if any. More...
byte iy
 Y-position on map, or zero. More...
byte ix
 X-position on map, or zero. More...
byte tval
 Item type (from kind) More...
byte sval
 Item sub-type (from kind) More...
s16b pval
 Item extra-parameter. More...
s16b weight
 Item weight. More...
byte dd
 Number of damage dice. More...
byte ds
 Number of sides on each damage die. More...
s16b ac
 Normal AC. More...
s16b to_a
 Plusses to AC. More...
s16b to_h
 Plusses to hit. More...
s16b to_d
 Plusses to damage. More...
bitflag flags [OF_SIZE]
 Object flags. More...
s16b modifiers [OBJ_MOD_MAX]
 Object modifiers. More...
struct element_info el_info [ELEM_MAX]
 Object element info. More...
bool * brands
 Array of brand structures. More...
bool * slays
 Array of slay structures. More...
struct curse_datacurses
 Array of curse powers and timeouts. More...
struct effecteffect
 Effect this item produces (effects.c) More...
char * effect_msg
 Message on use. More...
struct activationactivation
 Artifact activation, if applicable. More...
random_value time
 Recharge time (rods/activation) More...
s16b timeout
 Timeout Counter. More...
byte number
 Number of items. More...
bitflag notice
 Attention paid to the object. More...
s16b held_m_idx
 Monster holding us (if any) More...
s16b mimicking_m_idx
 Monster mimicking us (if any) More...
byte origin
 How this item was found. More...
byte origin_depth
 What depth the item was found at. More...
struct monster_raceorigin_race
 Monster race that dropped it. More...
quark_t note
 Inscription index. More...

Detailed Description

Object information, for a specific object.

Note that inscriptions are now handled via the "quark_str()" function applied to the "note" field, which will return NULL if "note" is zero.

Each cave grid points to one (or zero) objects via the "obj" field in its "squares" struct. Each object then points to one (or zero) objects via the "next" field, and (aside from the first) back via its "prev" field, forming a doubly linked list, which in game terms represents a stack of objects in the same grid.

Each monster points to one (or zero) objects via the "held_obj" field (see monster.h). Each object then points to one (or zero) objects and back to previous objects by its own "next" and "prev" fields, forming a doubly linked list, which in game terms represents the monster's inventory.

The "held_m_idx" field is used to indicate which monster, if any, is holding the object. Objects being held have "ix = 0" and "iy = 0".

Note that object records are not now copied, but allocated on object creation and freed on object destruction. These records are handed around between player and monster inventories and the floor on a fairly regular basis, and care must be taken when handling such objects.

Field Documentation

s16b ac
struct artifact* artifact
bool* brands
struct curse_data* curses
byte dd
byte ds
struct effect* effect
char* effect_msg

Message on use.

Referenced by do_curse_effect(), and parse_curse_msg().

struct ego_item* ego
struct element_info el_info[ELEM_MAX]
bitflag flags[OF_SIZE]
s16b held_m_idx
byte ix
byte iy
struct object_kind* kind

Kind of the object.

Referenced by activation_message(), apply_autoinscription(), apply_magic(), black_market_ok(), brand_object(), breakage_chance(), calc_bonuses(), calc_mana(), chest_death(), combine_pack(), compare_items(), death_info(), desc_art_fake(), describe_effect(), describe_flavor_text(), describe_stats(), do_cmd_buy(), do_cmd_equip(), do_cmd_inven(), do_cmd_quiver(), do_cmd_sell(), earlier_object(), easy_know(), effect_handler_RECHARGE(), ego_find_random(), find_inven(), get_known_flags(), get_use_device_chance(), ignore_drop(), ignore_type_of(), is_object_good(), make_artifact(), map_info(), melee_effect_handler_DRAIN_CHARGES(), obj_can_browse(), obj_desc_combat(), obj_desc_get_basename(), obj_desc_name(), object_attr(), object_char(), object_desc(), object_flags_known(), object_flavor_aware(), object_flavor_is_aware(), object_flavor_tried(), object_flavor_was_tried(), object_has_standard_to_h(), object_ignore_flavor_of(), object_info_ego(), object_info_out(), object_is_ignored(), object_learn_on_use(), object_learn_on_wield(), object_list_collect(), object_list_entry_line_attribute(), object_list_format_name(), object_list_format_section(), object_list_should_ignore_object(), object_power(), object_power_calculation_EFFECT_POWER(), object_prep(), object_see(), object_sense(), object_set_base_known(), object_stackable(), object_value_base(), object_value_real(), player_know_object(), player_pickup_aux(), rd_item(), rd_stores_aux(), recharge_objects(), run_power_calculation(), scan_distant_floor(), show_obj(), store_carry(), store_display_entry(), store_find_kind(), store_will_buy_tester(), textui_cmd_ignore_menu(), use_aux(), wiz_display_item(), wiz_reroll_item(), wr_gear_aux(), and write_curse_kinds().

struct object* known

Known version of this object.

Referenced by artifact_power(), calc_bonuses(), cave_generate(), check_devices(), chest_check(), chest_death(), combine_pack(), context_menu_cave(), death_knowledge(), delete_monster_idx(), desc_art_fake(), desc_obj_fake(), describe_brands(), describe_curses(), describe_flavor_text(), describe_slays(), describe_stats(), display_resistance_panel(), do_cmd_buy(), do_cmd_disarm_chest(), do_cmd_open_chest(), do_cmd_retrieve(), effect_handler_DESTRUCTION(), effect_handler_DETECT_TRAPS(), effect_handler_DISENCHANT(), effect_handler_RECHARGE(), enchant(), equip_learn_after_time(), equip_learn_element(), equip_learn_flag(), equip_learn_on_defend(), equip_learn_on_melee_attack(), equip_learn_on_ranged_attack(), floor_carry_fail(), floor_object_for_use(), gear_excise_object(), gear_insert_end(), gear_object_for_use(), get_art_name(), get_artifact_display_name(), get_artifact_name(), get_known_elements(), get_panel_combat(), home_carry(), ignore_level_of(), inven_carry(), inven_damage(), inven_wield(), item_tester_uncursable(), kind_info(), melee_effect_handler_EAT_FOOD(), minus_ac(), missile_learn_on_ranged_attack(), obj_desc_chest(), obj_desc_inscrip(), obj_desc_name(), obj_known_blows(), obj_known_damage(), obj_known_digging(), obj_known_light(), object_absorb_merge(), object_delete(), object_desc(), object_effect_is_known(), object_element_is_known(), object_flag_is_known(), object_flags_known(), object_flavor_aware(), object_info_ego(), object_info_out(), object_is_ignored(), object_is_known_artifact(), object_learn_on_use(), object_learn_on_wield(), object_list_entry_line_attribute(), object_lists_check_integrity(), object_runes_known(), object_see(), object_sense(), object_set_base_known(), object_split(), object_stackable(), object_touch(), object_value(), player_know_object(), player_outfit(), player_pickup_aux(), player_pickup_gold(), player_update_light(), project_o(), project_object_handler_KILL_TRAP(), rd_gear(), rd_monsters(), rd_stores_aux(), refill_lamp(), run_step(), run_test(), scan_floor(), search(), spoil_artifact(), square_know_pile(), store_carry(), store_create_item(), store_create_random(), store_delete(), store_maint(), textui_cmd_ignore_menu(), uncurse_object(), use_aux(), wipe_mon_list(), wiz_display_item(), wiz_reroll_item(), wiz_test_kind(), wr_objects_aux(), wr_stores(), and write_curse_kinds().

s16b mimicking_m_idx
s16b modifiers[OBJ_MOD_MAX]
struct object* next
quark_t note
bitflag notice
byte number

Number of items.

Referenced by brand_object(), calc_inventory(), chest_death(), context_menu_object(), context_menu_store_item(), distribute_charges(), do_cmd_buy(), do_cmd_drop(), do_cmd_retrieve(), do_cmd_sell(), do_cmd_stash(), effect_handler_DISENCHANT(), effect_handler_RECHARGE(), enchant(), enchant_spell(), find_inven(), floor_carry_fail(), floor_object_for_use(), gear_excise_object(), gear_object_for_use(), ignore_drop(), inven_can_stack_partial(), inven_carry(), inven_carry_num(), inven_damage(), inven_drop(), inven_wield(), make_artifact(), make_object(), mass_produce(), melee_effect_handler_EAT_FOOD(), melee_effect_handler_EAT_ITEM(), mon_create_drop(), number_charging(), obj_can_zap(), obj_desc_charges(), obj_desc_name(), obj_desc_name_prefix(), object_absorb(), object_absorb_partial(), object_copy_amt(), object_list_collect(), object_list_format_name(), object_prep(), object_see(), object_sense(), object_set_base_known(), object_similar(), object_split(), object_value_real(), pack_slots_used(), place_monster(), player_outfit(), player_pickup_aux(), project_o(), project_object_elemental(), project_object_handler_HOLY_ORB(), project_object_handler_MANA(), quiver_absorb_num(), rd_gear_aux(), rd_item(), recharge_objects(), recharged_notice(), refill_lamp(), show_obj(), store_carry(), store_delete(), store_delete_random(), store_display_entry(), store_maint(), store_object_absorb(), store_purchase(), store_sell(), target_set_interactive_aux(), test_drop_eat(), test_drop_pickup(), wield_all(), wiz_display_item(), wiz_quantity_item(), and wr_item().

u16b oidx
byte origin
byte origin_depth
struct monster_race* origin_race

Monster race that dropped it.

Referenced by describe_origin(), mon_create_drop(), object_origin_combine(), rd_item(), and wr_item().

struct object* prev
s16b pval
bool* slays
byte sval
s16b timeout
s16b to_a
s16b to_d
s16b to_h
byte tval
s16b weight

The documentation for this struct was generated from the following file: