OSDN Git Service

866a7a6a786b11f8bd9bc820445a22b9325f1dd0
[hengband/hengband.git] / src / system / object-type-definition.h
1 #pragma once
2
3 #include "system/angband.h"
4 #include "object/tval-types.h"
5
6 #define TR_FLAG_SIZE 5
7
8 typedef struct object_type {
9     KIND_OBJECT_IDX k_idx; /* Kind index (zero if "dead") */
10     POSITION iy; /* Y-position on map, or zero */
11     POSITION ix; /* X-position on map, or zero */
12     tval_type tval; /* Item type (from kind) */
13
14     OBJECT_SUBTYPE_VALUE sval; /* Item sub-type (from kind) */
15     PARAMETER_VALUE pval; /* Item extra-parameter */
16     DISCOUNT_RATE discount; /* Discount (if any) */
17     ITEM_NUMBER number; /* Number of items */
18     WEIGHT weight; /* Item weight */
19     ARTIFACT_IDX name1; /* Artifact type, if any */
20     EGO_IDX name2; /* Ego-Item type, if any */
21
22     XTRA8 xtra1; /* Extra info type (now unused) */
23     XTRA16 xtra2; /*!< エゴ/アーティファクトの発動ID / Extra info activation index */
24     XTRA8 xtra3; /*!< 複数の使用用途 捕らえたモンスターの速度,付加した特殊なエッセンスID / Extra info for weaponsmith */
25     XTRA16 xtra4; /*!< 複数の使用用途 光源の残り寿命、あるいは捕らえたモンスターの現HP / Extra info fuel or captured monster's current HP */
26     XTRA16 xtra5; /*!< 複数の使用用途 捕らえたモンスターの最大HP / Extra info captured monster's max HP */
27
28     HIT_PROB to_h; /* Plusses to hit */
29     HIT_POINT to_d; /* Plusses to damage */
30     ARMOUR_CLASS to_a; /* Plusses to AC */
31     ARMOUR_CLASS ac; /* Normal AC */
32
33     DICE_NUMBER dd;
34     DICE_SID ds; /* Damage dice/sides */
35     TIME_EFFECT timeout; /* Timeout Counter */
36     byte ident; /* Special flags  */
37     byte marked; /* Object is marked */
38     u16b inscription; /* Inscription index */
39     u16b art_name; /* Artifact name (random artifacts) */
40     byte feeling; /* Game generated inscription number (eg, pseudo-id) */
41
42     BIT_FLAGS art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
43     BIT_FLAGS curse_flags; /* Flags for curse */
44     OBJECT_IDX next_o_idx; /* Next object in stack (if any) */
45     MONSTER_IDX held_m_idx; /*!< アイテムを所持しているモンスターID (いないなら 0) / Monster holding us (if any) */
46     ARTIFACT_BIAS_IDX artifact_bias; /*!< ランダムアーティファクト生成時のバイアスID */
47 } object_type;