5 * Object information, for a specific object.
7 * Note that a "discount" on an item is permanent and never goes away.
9 * Note that inscriptions are now handled via the "quark_str()" function
10 * applied to the "note" field, which will return NULL if "note" is zero.
12 * Note that "object" records are "copied" on a fairly regular basis,
13 * and care must be taken when handling such objects.
15 * Note that "object flags" must now be derived from the object kind,
16 * the artifact and ego-item indexes, and the two "xtra" fields.
18 * Each grid points to one (or zero) objects via the "o_idx"
19 * field (above). Each object then points to one (or zero) objects
20 * via the "next_o_idx" field, forming a singly linked list, which
21 * in game terms, represents a "stack" of objects in the same grid.
23 * Each monster points to one (or zero) objects via the "hold_o_idx"
24 * field (below). Each object then points to one (or zero) objects
25 * via the "next_o_idx" field, forming a singly linked list, which
26 * in game terms, represents a pile of objects held by the monster.
28 * The "held_m_idx" field is used to indicate which monster, if any,
29 * is holding the object. Objects being held have "ix=0" and "iy=0".
32 typedef struct object_type object_type;
36 KIND_OBJECT_IDX k_idx; /* Kind index (zero if "dead") */
38 POSITION iy; /* Y-position on map, or zero */
39 POSITION ix; /* X-position on map, or zero */
41 OBJECT_TYPE_VALUE tval; /* Item type (from kind) */
42 OBJECT_SUBTYPE_VALUE sval; /* Item sub-type (from kind) */
44 PARAMETER_VALUE pval; /* Item extra-parameter */
46 DISCOUNT_RATE discount; /* Discount (if any) */
48 ITEM_NUMBER number; /* Number of items */
50 WEIGHT weight; /* Item weight */
52 ARTIFACT_IDX name1; /* Artifact type, if any */
53 EGO_IDX name2; /* Ego-Item type, if any */
55 XTRA8 xtra1; /* Extra info type (now unused) */
56 XTRA8 xtra2; /* Extra info activation index */
57 XTRA8 xtra3; /* Extra info for weaponsmith */
58 XTRA16 xtra4; /*!<
\8cõ
\8c¹
\82Ì
\8ec
\82è
\8eõ
\96½
\81A
\82 \82é
\82¢
\82Í
\95ß
\82ç
\82¦
\82½
\83\82\83\93\83X
\83^
\81[
\82Ì
\8c»HP / Extra info fuel or captured monster's current HP */
59 XTRA16 xtra5; /*!<
\95ß
\82ç
\82¦
\82½
\83\82\83\93\83X
\83^
\81[
\82Ì
\8dÅ
\91åHP / Extra info captured monster's max HP */
61 HIT_PROB to_h; /* Plusses to hit */
62 HIT_POINT to_d; /* Plusses to damage */
63 ARMOUR_CLASS to_a; /* Plusses to AC */
65 ARMOUR_CLASS ac; /* Normal AC */
68 DICE_SID ds; /* Damage dice/sides */
70 TIME_EFFECT timeout; /* Timeout Counter */
72 byte ident; /* Special flags */
73 byte marked; /* Object is marked */
75 u16b inscription; /* Inscription index */
76 u16b art_name; /* Artifact name (random artifacts) */
78 byte feeling; /* Game generated inscription number (eg, pseudo-id) */
80 BIT_FLAGS art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
81 BIT_FLAGS curse_flags; /* Flags for curse */
83 OBJECT_IDX next_o_idx; /* Next object in stack (if any) */
84 MONSTER_IDX held_m_idx; /* Monster holding us (if any) */
86 ARTIFACT_BIAS_IDX artifact_bias; /*!<
\83\89\83\93\83_
\83\80\83A
\81[
\83e
\83B
\83t
\83@
\83N
\83g
\90¶
\90¬
\8e\9e\82Ì
\83o
\83C
\83A
\83XID */
89 extern int bow_tval_ammo(object_type *o_ptr);