Angband
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

◆ ac

s16b ac

◆ activation

◆ artifact

struct artifact* artifact

◆ brands

bool* brands

◆ curses

struct curse_data* curses

◆ dd

byte dd

◆ ds

byte ds

◆ effect

struct effect* effect

◆ effect_msg

char* effect_msg

Message on use.

Referenced by do_curse_effect(), and parse_curse_msg().

◆ ego

struct ego_item* ego

◆ el_info

struct element_info el_info[ELEM_MAX]

◆ flags

bitflag flags[OF_SIZE]

◆ held_m_idx

s16b held_m_idx

◆ ix

byte ix

◆ iy

byte iy

◆ kind

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(), earlier_object(), easy_know(), effect_handler_RECHARGE(), ego_find_random(), find_inven(), get_known_flags(), get_use_device_chance(), ignore_drop(), ignore_type_of(), inven_can_stack_partial(), inven_carry_num(), is_object_good(), make_object(), map_info(), mass_produce(), melee_effect_handler_DRAIN_CHARGES(), obj_can_browse(), obj_desc_combat(), obj_desc_get_basename(), obj_desc_name(), object_absorb(), object_absorb_partial(), 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_similar(), object_stackable(), object_value(), 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_maint(), store_object_absorb(), textui_cmd_ignore_menu(), use_aux(), wiz_display_item(), wiz_reroll_item(), wiz_tweak_item(), wr_gear_aux(), write_curse_kinds(), and write_pile().

◆ known

struct object* known

Known version of this object.

Referenced by artifact_power(), calc_bonuses(), check_devices(), chest_check(), chest_death(), combine_pack(), context_menu_cave(), curse_menu(), death_knowledge(), delete_monster_idx(), desc_art_fake(), desc_obj_fake(), describe_brands(), describe_curses(), describe_flavor_text(), describe_slays(), describe_stats(), do_cmd_buy(), do_cmd_disarm_chest(), do_cmd_open_chest(), do_cmd_retrieve(), do_cmd_sell(), 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_aware(), 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(), prepare_next_level(), 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(), wiz_tweak_item(), wr_objects_aux(), wr_stores(), and write_curse_kinds().

◆ mimicking_m_idx

s16b mimicking_m_idx

◆ modifiers

s16b modifiers[OBJ_MOD_MAX]

◆ next

struct object* next

Next object in a pile.

Referenced by autoinscribe_ground(), autoinscribe_pack(), black_market_ok(), calc_inventory(), chest_check(), chunk_copy(), chunk_validate_objects(), combine_pack(), compact_monsters_aux(), death_info(), death_knowledge(), delete_monster_idx(), do_autopickup(), drop_find_grid(), effect_handler_DESTRUCTION(), effect_handler_DETECT_TRAPS(), find_artifact(), find_inven(), find_stack_object_in_inventory(), floor_carry(), floor_get_oldest_ignored(), home_carry(), inven_carry(), inven_carry_num(), inven_damage(), inven_wield(), map_info(), monster_carry(), monster_death(), monster_turn_grab_objects(), object_copy(), object_delete(), object_flavor_aware(), object_is_in_store(), object_pile_free(), option_toggle_handle(), pack_slots_used(), pile_check_integrity(), pile_contains(), pile_excise(), pile_insert(), pile_insert_end(), pile_integrity_fail(), pile_last_item(), player_pickup_gold(), prepare_next_level(), project_o(), push_object(), rd_gear(), rd_gear_aux(), rd_monster(), recharge_objects(), run_step(), run_test(), rune_autoinscribe(), scan_distant_floor(), scan_floor(), search(), square_changeable(), square_know_pile(), square_sense_pile(), store_carry(), store_check_num(), store_delete_random(), store_find_kind(), store_maint(), store_stock_list(), target_accept(), target_set_interactive_aux(), test_obj_piles(), update_player_object_knowledge(), wield_all(), wipe_mon_list(), wiz_reroll_item(), wiz_tweak_item(), wr_gear_aux(), wr_monster(), wr_objects_aux(), wr_stores(), and write_pile().

◆ note

quark_t note

◆ notice

bitflag notice

◆ number

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(), mon_create_mimicked_object(), 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(), player_outfit(), player_pickup_aux(), project_o(), project_object_elemental(), project_object_handler_MANA(), quiver_absorb_num(), rd_gear(), 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().

◆ oidx

u16b oidx

◆ origin

byte origin

◆ origin_depth

byte origin_depth

◆ origin_race

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().

◆ prev

struct object* prev

◆ pval

s16b pval

◆ slays

bool* slays

◆ sval

byte sval

◆ time

◆ timeout

s16b timeout

◆ to_a

s16b to_a

◆ to_d

s16b to_d

◆ to_h

s16b to_h

◆ tval

byte tval

◆ weight

s16b weight

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