OSDN Git Service

[Refactor] #37353 RF?_* を monster_race 構造体へ移動。
[hengband/hengband.git] / src / types.h
1 /*!
2  * @file types.h
3  * @brief グローバルな構造体の定義 / global type declarations
4  * @date 2014/08/10
5  * @author
6  * <pre>
7  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
8  * This software may be copied and distributed for educational, research,
9  * and not for profit purposes provided that this copyright and statement
10  * are included in all such copies.  Other copyrights may also apply.
11  * </pre>
12  * @details
13  * <pre>
14  * このファイルはangband.hでのみインクルードすること。
15  * This file should ONLY be included by "angband.h"
16  *
17  * Note that "char" may or may not be signed, and that "signed char"
18  * may or may not work on all machines.  So always use "s16b" or "s32b"
19  * for signed values.  Also, note that unsigned values cause math problems
20  * in many cases, so try to only use "u16b" and "u32b" for "bit flags",
21  * unless you really need the extra bit of information, or you really
22  * need to restrict yourself to a single byte for storage reasons.
23  *
24  * Also, if possible, attempt to restrict yourself to sub-fields of
25  * known size (use "s16b" or "s32b" instead of "int", and "byte" instead
26  * of "bool"), and attempt to align all fields along four-byte words, to
27  * optimize storage issues on 32-bit machines.  Also, avoid "bit flags"
28  * since these increase the code size and slow down execution.  When
29  * you need to store bit flags, use one byte per flag, or, where space
30  * is an issue, use a "byte" or "u16b" or "u32b", and add special code
31  * to access the various bit flags.
32  *
33  * Many of these structures were developed to reduce the number of global
34  * variables, facilitate structured program design, allow the use of ascii
35  * template files, simplify access to indexed data, or facilitate efficient
36  * clearing of many variables at once.
37  *
38  * Certain data is saved in multiple places for efficient access, currently,
39  * this includes the tval/sval/weight fields in "object_type", various fields
40  * in "header_type", and the "m_idx" and "o_idx" fields in "grid_type".  All
41  * of these could be removed, but this would, in general, slow down the game
42  * and increase the complexity of the code.
43  * </pre>
44  */
45
46
47 /*!
48  * @struct feature_state
49  * @brief 地形状態変化指定構造体 / Feature state structure
50  */
51 typedef struct feature_state feature_state;
52
53 struct feature_state
54 {
55         FF_FLAGS_IDX action; /*!< 変化条件をFF_*のIDで指定 / Action (FF_*) */
56         STR_OFFSET result_tag; /*!< 変化先ID / Result (f_info ID) */
57         FEAT_IDX result; /*!< 変化先ID / Result (f_info ID) */
58 };
59
60
61 /*!
62  * @struct feature_type
63  * @brief 地形情報の構造体 / Information about terrain "features"
64  */
65
66 typedef struct feature_type feature_type;
67
68 struct feature_type
69 {
70         STR_OFFSET name;                /*!< 地形名参照のためのネームバッファオフセット値 / Name (offset) */
71         STR_OFFSET text;                /*!< 地形説明参照のためのネームバッファオフセット値 /  Text (offset) */
72         STR_OFFSET tag;                 /*!< 地形特性タグ参照のためのネームバッファオフセット値 /  Tag (offset) */
73
74         STR_OFFSET mimic_tag;
75         STR_OFFSET destroyed_tag;
76
77         FEAT_IDX mimic;               /*!< 未確定時の外形地形ID / Feature to mimic */
78         FEAT_IDX destroyed;           /*!< *破壊*に巻き込まれた時の地形移行先(未実装?) / Default destroyed state */
79
80         BIT_FLAGS flags[FF_FLAG_SIZE]; /*!< 地形の基本特性ビット配列 / Flags */
81
82         FEAT_PRIORITY priority;            /*!< 縮小表示で省略する際の表示優先度 / Map priority */
83
84         feature_state state[MAX_FEAT_STATES]; /*!< feature_state テーブル */
85
86         FEAT_SUBTYPE subtype;  /*!< 副特性値 */
87         FEAT_POWER power;    /*!< 地形強度 */
88
89         TERM_COLOR d_attr[F_LIT_MAX];   /*!< デフォルトの地形シンボルカラー / Default feature attribute */
90         SYMBOL_CODE d_char[F_LIT_MAX];   /*!< デフォルトの地形シンボルアルファベット / Default feature character */
91
92         TERM_COLOR x_attr[F_LIT_MAX];   /*!< 設定変更後の地形シンボルカラー / Desired feature attribute */
93         SYMBOL_CODE x_char[F_LIT_MAX];   /*!< 設定変更後の地形シンボルアルファベット / Desired feature character */
94 };
95
96
97 /*!
98  * @struct object_kind
99  * @brief ベースアイテム情報の構造体 / Information about object "kinds", including player knowledge.
100  * @details
101  * ゲーム進行用のセーブファイル上では aware と tried のみ保存対象とすること。と英文ではあるが実際はもっとある様子である。 /
102  * Only "aware" and "tried" are saved in the savefile
103  */
104
105 typedef struct object_kind object_kind;
106
107 struct object_kind
108 {
109         STR_OFFSET name;                        /*!< ベースアイテム名参照のためのネームバッファオフセット値 / Name (offset) */
110         STR_OFFSET text;                        /*!< 解説テキスト参照のためのネームバッファオフセット値 / Text (offset) */
111         STR_OFFSET flavor_name; /*!< 未確定名参照のためのネームバッファオフセット値 / Flavor name (offset) */
112
113         OBJECT_TYPE_VALUE tval;                 /*!< ベースアイテム種別の大項目値 Object type */
114         OBJECT_SUBTYPE_VALUE sval;                      /*!< ベースアイテム種別の小項目値 Object sub type */
115
116         PARAMETER_VALUE pval;   /*!< ベースアイテムのpval(能力修正共通値) Object extra info */
117
118         HIT_PROB to_h;                  /*!< ベースアイテムの命中修正値 / Bonus to hit */
119         HIT_POINT to_d;                 /*!< ベースアイテムのダメージ修正値 / Bonus to damage */
120         ARMOUR_CLASS to_a;                      /*!< ベースアイテムのAC修正値 / Bonus to armor */
121
122         ARMOUR_CLASS ac;                        /*!< ベースアイテムのAC基本値 /  Base armor */
123
124         DICE_NUMBER dd;
125         DICE_SID ds;            /*!< ダメージダイスの数と大きさ / Damage dice/sides */
126
127         WEIGHT weight;          /*!< ベースアイテムの重量 / Weight */
128
129         PRICE cost;                     /*!< ベースアイテムの基本価値 / Object "base cost" */
130
131         BIT_FLAGS flags[TR_FLAG_SIZE];  /*!< ベースアイテムの基本特性ビット配列 / Flags */
132
133         BIT_FLAGS gen_flags;            /*!< ベースアイテムの生成特性ビット配列 / flags for generate */
134
135         DEPTH locale[4];                /*!< ベースアイテムの生成階テーブル / Allocation level(s) */
136         PROB chance[4];         /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */
137
138         DEPTH level;                    /*!< ベースアイテムの基本生成階 / Level */
139         BIT_FLAGS8 extra;                       /*!< その他色々のビットフラグ配列 / Something */
140
141         TERM_COLOR d_attr;              /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
142         SYMBOL_CODE d_char;             /*!< デフォルトのアイテムシンボルアルファベット / Default object character */
143
144         TERM_COLOR x_attr;              /*!< 設定変更後のアイテムシンボルカラー /  Desired object attribute */
145         SYMBOL_CODE x_char;             /*!< 設定変更後のアイテムシンボルアルファベット /  Desired object character */
146
147         IDX flavor;             /*!< 調査中(TODO) / Special object flavor (or zero) */
148
149         bool easy_know;         /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */
150
151         bool aware;                     /*!< ベースアイテムが鑑定済かどうか /  The player is "aware" of the item's effects */
152
153         bool tried;                     /*!< ベースアイテムを未鑑定のまま試したことがあるか /  The player has "tried" one of the items */
154
155         ACTIVATION_IDX act_idx;         /*!< 発動能力のID /  Activative ability index */
156 };
157
158
159
160 typedef struct artifact_type artifact_type;
161
162 /*!
163  * @struct artifact_type
164  * @brief 固定アーティファクト情報の構造体 / Artifact structure.
165  * @details
166  * @note
167  * the save-file only writes "cur_num" to the savefile.
168  * "max_num" is always "1" (if that artifact "exists")
169  */
170 struct artifact_type
171 {
172         STR_OFFSET name;                        /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
173         STR_OFFSET text;                        /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
174
175         OBJECT_TYPE_VALUE tval;         /*!< ベースアイテム大項目ID / Artifact type */
176         OBJECT_SUBTYPE_VALUE sval;      /*!< ベースアイテム小項目ID / Artifact sub type */
177
178         PARAMETER_VALUE pval;   /*!< pval修正値 / Artifact extra info */
179
180         HIT_PROB to_h;                  /*!< 命中ボーナス値 /  Bonus to hit */
181         HIT_POINT to_d;         /*!< ダメージボーナス値 / Bonus to damage */
182         ARMOUR_CLASS to_a;                      /*!< ACボーナス値 / Bonus to armor */
183
184         ARMOUR_CLASS ac;                        /*!< 上書きベースAC値 / Base armor */
185
186         DICE_NUMBER dd;
187         DICE_SID ds;    /*!< ダイス値 / Damage when hits */
188
189         WEIGHT weight;          /*!< 重量 / Weight */
190
191         PRICE cost;                     /*!< 基本価格 / Artifact "cost" */
192
193         BIT_FLAGS flags[TR_FLAG_SIZE];       /*! アイテムフラグ / Artifact Flags */
194
195         BIT_FLAGS gen_flags;            /*! アイテム生成フラグ / flags for generate */
196
197         DEPTH level;            /*! 基本生成階 / Artifact level */
198         RARITY rarity;          /*! レアリティ / Artifact rarity */
199
200         byte cur_num;           /*! 現在の生成数 / Number created (0 or 1) */
201         byte max_num;           /*! (未使用)最大生成数 / Unused (should be "1") */
202
203         FLOOR_IDX floor_id;      /*! アイテムを落としたフロアのID / Leaved on this location last time */
204
205         byte act_idx;           /*! 発動能力ID / Activative ability index */
206 };
207
208
209 /*
210  * Information about "ego-items".
211  */
212
213 typedef struct ego_item_type ego_item_type;
214
215 struct ego_item_type
216 {
217         STR_OFFSET name;                        /* Name (offset) */
218         STR_OFFSET text;                        /* Text (offset) */
219
220         INVENTORY_IDX slot;             /*!< 装備部位 / Standard slot value */
221         PRICE rating;           /*!< ベースアイテムからの価値加速 / Rating boost */
222
223         DEPTH level;                    /* Minimum level */
224         RARITY rarity;          /* Object rarity */
225
226         HIT_PROB max_to_h;              /* Maximum to-hit bonus */
227         HIT_POINT max_to_d;             /* Maximum to-dam bonus */
228         ARMOUR_CLASS max_to_a;          /* Maximum to-ac bonus */
229
230         PARAMETER_VALUE max_pval;               /* Maximum pval */
231
232         PRICE cost;                     /* Ego-item "cost" */
233
234         BIT_FLAGS flags[TR_FLAG_SIZE];  /* Ego-Item Flags */
235         BIT_FLAGS gen_flags;            /* flags for generate */
236
237         IDX act_idx;            /* Activative ability index */
238 };
239
240
241
242
243 /*
244  * Monster blow structure
245  *
246  *      - Method (RBM_*)
247  *      - Effect (RBE_*)
248  *      - Damage Dice
249  *      - Damage Sides
250  */
251
252 typedef struct monster_blow monster_blow;
253
254 struct monster_blow
255 {
256         BLOW_METHOD method;
257         BLOW_EFFECT effect;
258         DICE_NUMBER d_dice;
259         DICE_SID d_side;
260 };
261
262
263 typedef struct mbe_info_type mbe_info_type;
264
265 struct mbe_info_type
266 {
267         int power;        /* The attack "power" */
268         int explode_type; /* Explosion effect */
269 };
270
271
272 /*
273  * Monster "race" information, including racial memories
274  *
275  * Note that "d_attr" and "d_char" are used for MORE than "visual" stuff.
276  *
277  * Note that "x_attr" and "x_char" are used ONLY for "visual" stuff.
278  *
279  * Note that "cur_num" (and "max_num") represent the number of monsters
280  * of the given race currently on (and allowed on) the current level.
281  * This information yields the "dead" flag for Unique monsters.
282  *
283  * Note that "max_num" is reset when a new player is created.
284  * Note that "cur_num" is reset when a new level is created.
285  *
286  * Note that several of these fields, related to "recall", can be
287  * scrapped if space becomes an issue, resulting in less "complete"
288  * monster recall (no knowledge of spells, etc).  All of the "recall"
289  * fields have a special prefix to aid in searching for them.
290  */
291
292
293 typedef struct monster_race monster_race;
294
295 struct monster_race
296 {
297         STR_OFFSET name;        /*!< 名前データのオフセット(日本語) /  Name offset(Japanese) */
298 #ifdef JP
299         STR_OFFSET E_name;              /*!< 名前データのオフセット(英語) /  Name offset(English) */
300 #endif
301         STR_OFFSET text;                /*!< 思い出テキストのオフセット / Lore text offset */
302
303         DICE_NUMBER hdice;              /*!< HPのダイス数 / Creatures hit dice count */
304         DICE_SID hside;                 /*!< HPのダイス面数 / Creatures hit dice sides */
305
306         ARMOUR_CLASS ac;                /*!< アーマークラス / Armour Class */
307
308         SLEEP_DEGREE sleep;                             /*!< 睡眠値 / Inactive counter (base) */
309         POSITION aaf;                           /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
310         SPEED speed;                            /*!< 加速(110で+0) / Speed (normally 110) */
311
312         EXP mexp;                               /*!< 殺害時基本経験値 / Exp value for kill */
313
314         BIT_FLAGS16 extra;                              /*!< 未使用 /  Unused (for now) */
315
316         RARITY freq_spell;              /*!< 魔法&特殊能力仕様頻度(1/n) /  Spell frequency */
317
318         BIT_FLAGS flags1;                       /* Flags 1 (general) */
319         #define RF1_UNIQUE              0x00000001  /*!< モンスター特性: ユニーク / Unique Monster */
320         #define RF1_QUESTOR             0x00000002  /*!< モンスター特性: クエストモンスター / Quest Monster */
321         #define RF1_MALE                0x00000004  /*!< モンスター特性: 男性 / Male gender */
322         #define RF1_FEMALE              0x00000008  /*!< モンスター特性: 女性 / Female gender */
323         #define RF1_CHAR_CLEAR          0x00000010  /*!< モンスター特性: シンボルが完全に透明 / Absorbs symbol */
324         #define RF1_SHAPECHANGER        0x00000020  /*!< モンスター特性: シンボルアルファベットがランダムになる / TY: shapechanger */
325         #define RF1_ATTR_CLEAR          0x00000040  /*!< モンスター特性: シンボルカラーが透明色になる(地形と同じ色になる) / Absorbs color */
326         #define RF1_ATTR_MULTI          0x00000080  /*!< モンスター特性: シンボルカラーがランダムに変化する(基本7色) / Changes color */
327         #define RF1_FORCE_DEPTH         0x00000100  /*!< モンスター特性: 指定階未満では生成されない / Start at "correct" depth */
328         #define RF1_FORCE_MAXHP         0x00000200  /*!< モンスター特性: 通常生成時必ずHPがダイス最大値になる / Start with max hitpoints */
329         #define RF1_FORCE_SLEEP         0x00000400  /*!< モンスター特性: 通常生成時必ず寝ている / Start out sleeping */
330         #define RF1_FORCE_EXTRA         0x00000800  /*!< モンスター特性: (未使用) / Start out something */
331         #define RF1_ATTR_SEMIRAND       0x00001000  /*!< モンスター特性: シンボルカラーがランダムに変化する(15色) / Color is determined semi-randomly */
332         #define RF1_FRIENDS             0x00002000  /*!< モンスター特性: 同種の友軍を用意している / Arrive with some friends */
333         #define RF1_ESCORT              0x00004000  /*!< モンスター特性: 護衛を用意している/ Arrive with an escort */
334         #define RF1_ESCORTS             0x00008000  /*!< モンスター特性: さらに大量の護衛を用意している / Arrive with some escorts */
335         #define RF1_NEVER_BLOW          0x00010000  /*!< モンスター特性: 打撃を一切行わない / Never make physical blow */
336         #define RF1_NEVER_MOVE          0x00020000  /*!< モンスター特性: 移動を一切行わない / Never make physical move */
337         #define RF1_RAND_25             0x00040000  /*!< モンスター特性: ランダムに移動する確率+25%/ Moves randomly (25%) */
338         #define RF1_RAND_50             0x00080000  /*!< モンスター特性: ランダムに移動する確率+50%/ Moves randomly (50%) */
339         #define RF1_ONLY_GOLD           0x00100000  /*!< モンスター特性: 財宝しか落とさない / Drop only gold */
340         #define RF1_ONLY_ITEM           0x00200000  /*!< モンスター特性: アイテムしか落とさない / Drop only items */
341         #define RF1_DROP_60             0x00400000  /*!< モンスター特性: 落とすアイテム数60%で+1/ Drop an item/gold (60%) */
342         #define RF1_DROP_90             0x00800000  /*!< モンスター特性: 落とすアイテム数90%で+1 / Drop an item/gold (90%) */
343         #define RF1_DROP_1D2            0x01000000  /*!< モンスター特性: 落とすアイテム数+1d2 / Drop 1d2 items/gold */
344         #define RF1_DROP_2D2            0x02000000  /*!< モンスター特性: 落とすアイテム数+2d2 / Drop 2d2 items/gold */
345         #define RF1_DROP_3D2            0x04000000  /*!< モンスター特性: 落とすアイテム数+3d2 / Drop 3d2 items/gold */
346         #define RF1_DROP_4D2            0x08000000  /*!< モンスター特性: 落とすアイテム数+4d2 / Drop 4d2 items/gold */
347         #define RF1_DROP_GOOD           0x10000000  /*!< モンスター特性: 必ず上質品をドロップする / Drop good items */
348         #define RF1_DROP_GREAT          0x20000000  /*!< モンスター特性: 必ず高級品をドロップする / Drop great items */
349         #define RF1_XXX2                0x40000000  /*!< モンスター特性: 未使用 / XXX */
350         #define RF1_XXX3                0x80000000  /*!< モンスター特性: 未使用 / XXX */
351
352         BIT_FLAGS flags2;                       /* Flags 2 (abilities) */
353         #define RF2_STUPID          0x00000001  /*!< モンスター特性: 愚かな行動を取る / Monster is stupid */
354         #define RF2_SMART           0x00000002  /*!< モンスター特性: 賢い行動を取る / Monster is smart */
355         #define RF2_CAN_SPEAK       0x00000004  /*!< モンスター特性: 台詞をしゃべる / TY: can speak */
356         #define RF2_REFLECTING      0x00000008  /*!< モンスター特性: 矢やボルト魔法を反射する / Reflects bolts */
357         #define RF2_INVISIBLE       0x00000010  /*!< モンスター特性: 透明視力がないと見えない / Monster avoids vision */
358         #define RF2_COLD_BLOOD      0x00000020  /*!< モンスター特性: 冷血動物である / Monster avoids infra */
359         #define RF2_EMPTY_MIND      0x00000040  /*!< モンスター特性: 知性を持たない(テレパシー回避) / Monster avoids telepathy */
360         #define RF2_WEIRD_MIND      0x00000080  /*!< モンスター特性: 異質な知性(テレパシーで感知づらい) / Monster avoids telepathy? */
361         #define RF2_MULTIPLY        0x00000100  /*!< モンスター特性: 増殖する / Monster reproduces */
362         #define RF2_REGENERATE      0x00000200  /*!< モンスター特性: 急激に回復する / Monster regenerates */
363         #define RF2_CHAR_MULTI      0x00000400  /*!< モンスター特性: 未使用 / (Not implemented) */
364         #define RF2_ATTR_ANY        0x00000800  /*!< モンスター特性: ATTR_MULTIの色数が増える / TY: Attr_any */
365         #define RF2_POWERFUL        0x00001000  /*!< モンスター特性: 強力に魔法をあやつる / Monster has strong breath */
366         #define RF2_ELDRITCH_HORROR 0x00002000  /*!< モンスター特性: 狂気を呼び起こす / Sanity-blasting horror    */
367         #define RF2_AURA_FIRE       0x00004000  /*!< モンスター特性: 火炎のオーラを持つ / Burns in melee */
368         #define RF2_AURA_ELEC       0x00008000  /*!< モンスター特性: 電撃のオーラを持つ / Shocks in melee */
369         #define RF2_OPEN_DOOR       0x00010000  /*!< モンスター特性: ドアを開けることができる / Monster can open doors */
370         #define RF2_BASH_DOOR       0x00020000  /*!< モンスター特性: ドアを破壊することができる / Monster can bash doors */
371         #define RF2_PASS_WALL       0x00040000  /*!< モンスター特性: 壁を抜けることができる / Monster can pass walls */
372         #define RF2_KILL_WALL       0x00080000  /*!< モンスター特性: 壁を破壊して進む / Monster can destroy walls */
373         #define RF2_MOVE_BODY       0x00100000  /*!< モンスター特性: 道中の弱いモンスターを押しのけることができる / Monster can move monsters */
374         #define RF2_KILL_BODY       0x00200000  /*!< モンスター特性: 道中の弱いモンスターを殺して進む / Monster can kill monsters */
375         #define RF2_TAKE_ITEM       0x00400000  /*!< モンスター特性: 道中のアイテムを拾う / Monster can pick up items */
376         #define RF2_KILL_ITEM       0x00800000  /*!< モンスター特性: 道中のアイテムを破壊する / Monster can crush items */
377         #define RF2_XXX1            0x01000000  /*!< モンスター特性: 未使用 / XXX */
378         #define RF2_XXX2            0x02000000  /*!< モンスター特性: 未使用 / XXX */
379         #define RF2_XXX3            0x04000000  /*!< モンスター特性: 未使用 / XXX */
380         #define RF2_XXX4            0x08000000  /*!< モンスター特性: 未使用 / XXX */
381         #define RF2_XXX5            0x10000000  /*!< モンスター特性: 未使用 / XXX */
382         #define RF2_XXX6            0x20000000  /*!< モンスター特性: 未使用 / XXX */
383         #define RF2_HUMAN           0x40000000  /*!< モンスター特性: 人間 / Human */
384         #define RF2_QUANTUM         0x80000000  /*!< モンスター特性: 量子的な振る舞いをする / Monster has quantum behavior */
385
386         BIT_FLAGS flags3;                       /* Flags 3 (race/resist) */
387         #define RF3_ORC             0x00000001  /*!< モンスター特性: オーク / Orc */
388         #define RF3_TROLL           0x00000002  /*!< モンスター特性: トロル / Troll */
389         #define RF3_GIANT           0x00000004  /*!< モンスター特性: 巨人 / Giant */
390         #define RF3_DRAGON          0x00000008  /*!< モンスター特性: ドラゴン / Dragon */
391         #define RF3_DEMON           0x00000010  /*!< モンスター特性: 悪魔 / Demon */
392         #define RF3_UNDEAD          0x00000020  /*!< モンスター特性: アンデッド / Undead */
393         #define RF3_EVIL            0x00000040  /*!< モンスター特性: 邪悪 / Evil */
394         #define RF3_ANIMAL          0x00000080  /*!< モンスター特性: 動物 / Animal */
395         #define RF3_AMBERITE        0x00000100  /*!< モンスター特性: アンバーの血族 / TY: Amberite */
396         #define RF3_GOOD            0x00000200  /*!< モンスター特性: 善良 / Good */
397         #define RF3_AURA_COLD       0x00000400  /*!< モンスター特性: 冷気オーラ / Freezes in melee */
398         #define RF3_NONLIVING       0x00000800  /*!< モンスター特性: 無生物 / TY: Non-Living (?) */
399         #define RF3_HURT_LITE       0x00001000  /*!< モンスター特性: 通常の光(GF_WEAK_LITE)でダメージを受ける / Hurt by lite */
400         #define RF3_HURT_ROCK       0x00002000  /*!< モンスター特性: 岩石溶解(GF_KILL_WALL)でダメージを受ける / Hurt by rock remover */
401         #define RF3_HURT_FIRE       0x00004000  /*!< モンスター特性: 火炎が弱点 / Hurt badly by fire */
402         #define RF3_HURT_COLD       0x00008000  /*!< モンスター特性: 冷気が弱点 / Hurt badly by cold */
403         #define RF3_ANGEL           0x00010000  /*!< モンスター特性: 天使 / ANGEL */
404         #define RF3_XXX17           0x00020000  /*!< モンスター特性: 未使用 / XXX */
405         #define RF3_XXX18           0x00040000  /*!< モンスター特性: 未使用 / XXX */
406         #define RF3_XXX19           0x00080000  /*!< モンスター特性: 未使用 / XXX */
407         #define RF3_XXX20           0x00100000  /*!< モンスター特性: 未使用 / XXX */
408         #define RF3_XXX21           0x00200000  /*!< モンスター特性: 未使用 / XXX */
409         #define RF3_XXX22           0x00400000  /*!< モンスター特性: 未使用 / XXX */
410         #define RF3_XXX23           0x00800000  /*!< モンスター特性: 未使用 / XXX */
411         #define RF3_XXX24           0x01000000  /*!< モンスター特性: 未使用 / XXX */
412         #define RF3_XXX25           0x02000000  /*!< モンスター特性: 未使用 / XXX */
413         #define RF3_XXX26           0x04000000  /*!< モンスター特性: 未使用 / XXX */
414         #define RF3_XXX27           0x08000000  /*!< モンスター特性: 未使用 / XXX */
415         #define RF3_NO_FEAR         0x10000000  /*!< モンスター特性: 恐怖しない / Cannot be scared */
416         #define RF3_NO_STUN         0x20000000  /*!< モンスター特性: 朦朧としない / Cannot be stunned */
417         #define RF3_NO_CONF         0x40000000  /*!< モンスター特性: 混乱しない / Cannot be confused and resist confusion */
418         #define RF3_NO_SLEEP        0x80000000  /*!< モンスター特性: 眠らない / Cannot be slept */
419
420         BIT_FLAGS flags4;                       /* Flags 4 (inate/breath) */
421         #define RF4_SHRIEK          0x00000001  /*!< モンスター能力: 叫ぶ / Shriek for help */
422         #define RF4_XXX1            0x00000002  /*!< モンスター能力: 未使用 / XXX */
423         #define RF4_DISPEL          0x00000004  /*!< モンスター能力: 魔力消去 / Dispel magic */
424         #define RF4_ROCKET          0x00000008  /*!< モンスター能力: ロケット / TY: Rocket */
425         #define RF4_SHOOT           0x00000010  /*!< モンスター能力: 射撃/ Fire missiles */
426         #define RF4_XXX2            0x00000020  /*!< モンスター能力: 未使用 / XXX */
427         #define RF4_XXX3            0x00000040  /*!< モンスター能力: 未使用 / XXX */
428         #define RF4_XXX4            0x00000080  /*!< モンスター能力: 未使用 / XXX */
429         #define RF4_BR_ACID         0x00000100  /*!< モンスター能力: 酸のブレス / Breathe Acid */
430         #define RF4_BR_ELEC         0x00000200  /*!< モンスター能力: 電撃のブレス / Breathe Elec */
431         #define RF4_BR_FIRE         0x00000400  /*!< モンスター能力: 火炎のブレス / Breathe Fire */
432         #define RF4_BR_COLD         0x00000800  /*!< モンスター能力: 冷気のブレス / Breathe Cold */
433         #define RF4_BR_POIS         0x00001000  /*!< モンスター能力: 毒のブレス / Breathe Poison */
434         #define RF4_BR_NETH         0x00002000  /*!< モンスター能力: 地獄のブレス / Breathe Nether */
435         #define RF4_BR_LITE         0x00004000  /*!< モンスター能力: 閃光のブレス / Breathe Lite */
436         #define RF4_BR_DARK         0x00008000  /*!< モンスター能力: 暗黒のブレス / Breathe Dark */
437         #define RF4_BR_CONF         0x00010000  /*!< モンスター能力: 混乱のブレス / Breathe Confusion */
438         #define RF4_BR_SOUN         0x00020000  /*!< モンスター能力: 轟音のブレス / Breathe Sound */
439         #define RF4_BR_CHAO         0x00040000  /*!< モンスター能力: カオスのブレス / Breathe Chaos */
440         #define RF4_BR_DISE         0x00080000  /*!< モンスター能力: 劣化のブレス / Breathe Disenchant */
441         #define RF4_BR_NEXU         0x00100000  /*!< モンスター能力: 因果混乱のブレス / Breathe Nexus */
442         #define RF4_BR_TIME         0x00200000  /*!< モンスター能力: 時間逆転のブレス / Breathe Time */
443         #define RF4_BR_INER         0x00400000  /*!< モンスター能力: 遅鈍のブレス / Breathe Inertia */
444         #define RF4_BR_GRAV         0x00800000  /*!< モンスター能力: 重力のブレス / Breathe Gravity */
445         #define RF4_BR_SHAR         0x01000000  /*!< モンスター能力: 破片のブレス / Breathe Shards */
446         #define RF4_BR_PLAS         0x02000000  /*!< モンスター能力: プラズマのブレス / Breathe Plasma */
447         #define RF4_BR_WALL         0x04000000  /*!< モンスター能力: フォースのブレス / Breathe Force */
448         #define RF4_BR_MANA         0x08000000  /*!< モンスター能力: 魔力のブレス / Breathe Mana */
449         #define RF4_BA_NUKE         0x10000000  /*!< モンスター能力: 放射能球 / TY: Nuke Ball */
450         #define RF4_BR_NUKE         0x20000000  /*!< モンスター能力: 放射性廃棄物のブレス / TY: Toxic Breath */
451         #define RF4_BA_CHAO         0x40000000  /*!< モンスター能力: ログルス球 / TY: Logrus Ball */
452         #define RF4_BR_DISI         0x80000000  /*!< モンスター能力: 分解のブレス / Breathe Disintegration */
453
454         BIT_FLAGS flags7;                       /* Flags 7 (movement related abilities) */
455         #define RF7_AQUATIC             0x00000001  /* Aquatic monster */
456         #define RF7_CAN_SWIM            0x00000002  /* Monster can swim */
457         #define RF7_CAN_FLY             0x00000004  /* Monster can fly */
458         #define RF7_FRIENDLY            0x00000008  /* Monster is friendly */
459         #define RF7_NAZGUL              0x00000010  /* Is a "Nazgul" unique */
460         #define RF7_UNIQUE2             0x00000020  /* Fake unique */
461         #define RF7_RIDING              0x00000040  /* Good for riding */
462         #define RF7_KAGE                0x00000080  /* Is kage */
463         #define RF7_HAS_LITE_1          0x00000100  /* Monster carries light */
464         #define RF7_SELF_LITE_1         0x00000200  /* Monster lights itself */
465         #define RF7_HAS_LITE_2          0x00000400  /* Monster carries light */
466         #define RF7_SELF_LITE_2         0x00000800  /* Monster lights itself */
467         #define RF7_GUARDIAN            0x00001000  /* Guardian of a dungeon */
468         #define RF7_CHAMELEON           0x00002000  /* Chameleon can change */
469         #define RF7_XXXX4XXX            0x00004000  /* Now Empty */
470         #define RF7_TANUKI              0x00008000  /* Tanuki disguise */
471         #define RF7_HAS_DARK_1          0x00010000  /* Monster carries darkness */
472         #define RF7_SELF_DARK_1         0x00020000  /* Monster darkens itself */
473         #define RF7_HAS_DARK_2          0x00040000  /* Monster carries darkness */
474         #define RF7_SELF_DARK_2         0x00080000  /* Monster darkens itself */
475
476         BIT_FLAGS flags8;                       /* Flags 8 (wilderness info) */
477         #define RF8_WILD_ONLY           0x00000001
478         #define RF8_WILD_TOWN           0x00000002
479         #define RF8_XXX8X02             0x00000004
480         #define RF8_WILD_SHORE          0x00000008
481         #define RF8_WILD_OCEAN          0x00000010
482         #define RF8_WILD_WASTE          0x00000020
483         #define RF8_WILD_WOOD           0x00000040
484         #define RF8_WILD_VOLCANO        0x00000080
485         #define RF8_XXX8X08             0x00000100
486         #define RF8_WILD_MOUNTAIN       0x00000200
487         #define RF8_WILD_GRASS          0x00000400
488         #define RF8_WILD_ALL            0x80000000
489
490         BIT_FLAGS flags9;                       /* Flags 9 (drops info) */
491         #define RF9_DROP_CORPSE         0x00000001
492         #define RF9_DROP_SKELETON       0x00000002
493         #define RF9_EAT_BLIND           0x00000004
494         #define RF9_EAT_CONF            0x00000008
495         #define RF9_EAT_MANA            0x00000010
496         #define RF9_EAT_NEXUS           0x00000020
497         #define RF9_EAT_SLEEP           0x00000040
498         #define RF9_EAT_BERSERKER       0x00000080
499         #define RF9_EAT_ACIDIC          0x00000100
500         #define RF9_EAT_SPEED           0x00000200
501         #define RF9_EAT_CURE            0x00000400
502         #define RF9_EAT_FIRE_RES        0x00000800
503         #define RF9_EAT_COLD_RES        0x00001000
504         #define RF9_EAT_ACID_RES        0x00002000
505         #define RF9_EAT_ELEC_RES        0x00004000
506         #define RF9_EAT_POIS_RES        0x00008000
507         #define RF9_EAT_INSANITY        0x00010000
508         #define RF9_EAT_DRAIN_EXP       0x00020000
509         #define RF9_EAT_POISONOUS       0x00040000
510         #define RF9_EAT_GIVE_STR        0x00080000
511         #define RF9_EAT_GIVE_INT        0x00100000
512         #define RF9_EAT_GIVE_WIS        0x00200000
513         #define RF9_EAT_GIVE_DEX        0x00400000
514         #define RF9_EAT_GIVE_CON        0x00800000
515         #define RF9_EAT_GIVE_CHR        0x01000000
516         #define RF9_EAT_LOSE_STR        0x02000000
517         #define RF9_EAT_LOSE_INT        0x04000000
518         #define RF9_EAT_LOSE_WIS        0x08000000
519         #define RF9_EAT_LOSE_DEX        0x10000000
520         #define RF9_EAT_LOSE_CON        0x20000000
521         #define RF9_EAT_LOSE_CHR        0x40000000
522         #define RF9_EAT_DRAIN_MANA      0x80000000
523
524         BIT_FLAGS flagsr;                       /* Flags R (resistances info) */
525         #define RFR_IM_ACID         0x00000001  /* Immunity acid */
526         #define RFR_IM_ELEC         0x00000002  /* Immunity elec */
527         #define RFR_IM_FIRE         0x00000004  /* Immunity fire */
528         #define RFR_IM_COLD         0x00000008  /* Immunity cold */
529         #define RFR_IM_POIS         0x00000010  /* Immunity poison */
530         #define RFR_RES_LITE        0x00000020  /* Resist lite */
531         #define RFR_RES_DARK        0x00000040  /* Resist dark */
532         #define RFR_RES_NETH        0x00000080  /* Resist nether */
533         #define RFR_RES_WATE        0x00000100  /* Resist water */
534         #define RFR_RES_PLAS        0x00000200  /* Resist plasma */
535         #define RFR_RES_SHAR        0x00000400  /* Resist shards */
536         #define RFR_RES_SOUN        0x00000800  /* Resist sound */
537         #define RFR_RES_CHAO        0x00001000  /* Resist chaos */
538         #define RFR_RES_NEXU        0x00002000  /* Resist nexus */
539         #define RFR_RES_DISE        0x00004000  /* Resist disenchantment */
540         #define RFR_RES_WALL        0x00008000  /* Resist force */
541         #define RFR_RES_INER        0x00010000  /* Resist inertia */
542         #define RFR_RES_TIME        0x00020000  /* Resist time */
543         #define RFR_RES_GRAV        0x00040000  /* Resist gravity */
544         #define RFR_RES_ALL         0x00080000  /* Resist all */
545         #define RFR_RES_TELE        0x00100000  /* Resist teleportation */
546         #define RFR_XXX21           0x00200000
547         #define RFR_XXX22           0x00400000
548         #define RFR_XXX23           0x00800000
549         #define RFR_XXX24           0x01000000
550         #define RFR_XXX25           0x02000000
551         #define RFR_XXX26           0x04000000
552         #define RFR_XXX27           0x08000000
553         #define RFR_XXX28           0x10000000
554         #define RFR_XXX29           0x20000000
555         #define RFR_XXX30           0x40000000
556         #define RFR_XXX31           0x80000000
557
558         BIT_FLAGS a_ability_flags1;     /* Activate Ability Flags 5 (normal spells) */
559         #define RF5_BA_ACID         0x00000001  /*!< モンスター能力: アシッド・ボール / Acid Ball */
560         #define RF5_BA_ELEC         0x00000002  /*!< モンスター能力: サンダー・ボール / Elec Ball */
561         #define RF5_BA_FIRE         0x00000004  /*!< モンスター能力: ファイア・ボール / Fire Ball */
562         #define RF5_BA_COLD         0x00000008  /*!< モンスター能力: アイス・ボール / Cold Ball */
563         #define RF5_BA_POIS         0x00000010  /*!< モンスター能力: 悪臭雲 / Poison Ball */
564         #define RF5_BA_NETH         0x00000020  /*!< モンスター能力: 地獄球 / Nether Ball */
565         #define RF5_BA_WATE         0x00000040  /*!< モンスター能力: ウォーター・ボール / Water Ball */
566         #define RF5_BA_MANA         0x00000080  /*!< モンスター能力: 魔力の嵐 / Mana Storm */
567         #define RF5_BA_DARK         0x00000100  /*!< モンスター能力: 暗黒の嵐 / Darkness Storm */
568         #define RF5_DRAIN_MANA      0x00000200  /*!< モンスター能力: 魔力吸収 / Drain Mana */
569         #define RF5_MIND_BLAST      0x00000400  /*!< モンスター能力: 精神攻撃 / Blast Mind */
570         #define RF5_BRAIN_SMASH     0x00000800  /*!< モンスター能力: 脳攻撃 / Smash Brain */
571         #define RF5_CAUSE_1         0x00001000  /*!< モンスター能力: 軽傷の呪い / Cause Light Wound */
572         #define RF5_CAUSE_2         0x00002000  /*!< モンスター能力: 重症の頃い / Cause Serious Wound */
573         #define RF5_CAUSE_3         0x00004000  /*!< モンスター能力: 致命傷の呪い / Cause Critical Wound */
574         #define RF5_CAUSE_4         0x00008000  /*!< モンスター能力: 秘孔を突く / Cause Mortal Wound */
575         #define RF5_BO_ACID         0x00010000  /*!< モンスター能力: アシッド・ボルト / Acid Bolt */
576         #define RF5_BO_ELEC         0x00020000  /*!< モンスター能力: サンダー・ボルト / Elec Bolt */
577         #define RF5_BO_FIRE         0x00040000  /*!< モンスター能力: ファイア・ボルト / Fire Bolt */
578         #define RF5_BO_COLD         0x00080000  /*!< モンスター能力: アイス・ボルト / Cold Bolt */
579         #define RF5_BA_LITE         0x00100000  /*!< モンスター能力: スター・バースト / StarBurst */
580         #define RF5_BO_NETH         0x00200000  /*!< モンスター能力: 地獄の矢 / Nether Bolt */
581         #define RF5_BO_WATE         0x00400000  /*!< モンスター能力: ウォーター・ボルト / Water Bolt */
582         #define RF5_BO_MANA         0x00800000  /*!< モンスター能力: 魔力の矢 / Mana Bolt */
583         #define RF5_BO_PLAS         0x01000000  /*!< モンスター能力: プラズマ・ボルト / Plasma Bolt */
584         #define RF5_BO_ICEE         0x02000000  /*!< モンスター能力: 極寒の矢 / Ice Bolt */
585         #define RF5_MISSILE         0x04000000  /*!< モンスター能力: マジック・ミサイルt / Magic Missile */
586         #define RF5_SCARE           0x08000000  /*!< モンスター能力: 恐慌 / Frighten Player */
587         #define RF5_BLIND           0x10000000  /*!< モンスター能力: 盲目 / Blind Player */
588         #define RF5_CONF            0x20000000  /*!< モンスター能力: 混乱 / Confuse Player */
589         #define RF5_SLOW            0x40000000  /*!< モンスター能力: 減速 / Slow Player */
590         #define RF5_HOLD            0x80000000  /*!< モンスター能力: 麻痺 / Paralyze Player */
591
592         BIT_FLAGS a_ability_flags2;     /* Activate Ability Flags 6 (special spells) */
593         #define RF6_HASTE           0x00000001  /* Speed self */
594         #define RF6_HAND_DOOM       0x00000002  /* Hand of Doom */
595         #define RF6_HEAL            0x00000004  /* Heal self */
596         #define RF6_INVULNER        0x00000008  /* INVULNERABILITY! */
597         #define RF6_BLINK           0x00000010  /* Teleport Short */
598         #define RF6_TPORT           0x00000020  /* Teleport Long */
599         #define RF6_WORLD           0x00000040  /* world */
600         #define RF6_SPECIAL         0x00000080  /* Special Attack */
601         #define RF6_TELE_TO         0x00000100  /* Move player to monster */
602         #define RF6_TELE_AWAY       0x00000200  /* Move player far away */
603         #define RF6_TELE_LEVEL      0x00000400  /* Move player vertically */
604         #define RF6_PSY_SPEAR       0x00000800  /* Psyco-spear */
605         #define RF6_DARKNESS        0x00001000  /* Create Darkness */
606         #define RF6_TRAPS           0x00002000  /* Create Traps */
607         #define RF6_FORGET          0x00004000  /* Cause amnesia */
608         #define RF6_RAISE_DEAD      0x00008000  /* Raise Dead */
609         #define RF6_S_KIN           0x00010000  /* Summon "kin" */
610         #define RF6_S_CYBER         0x00020000  /* Summon Cyberdemons! */
611         #define RF6_S_MONSTER       0x00040000  /* Summon Monster */
612         #define RF6_S_MONSTERS      0x00080000  /* Summon Monsters */
613         #define RF6_S_ANT           0x00100000  /* Summon Ants */
614         #define RF6_S_SPIDER        0x00200000  /* Summon Spiders */
615         #define RF6_S_HOUND         0x00400000  /* Summon Hounds */
616         #define RF6_S_HYDRA         0x00800000  /* Summon Hydras */
617         #define RF6_S_ANGEL         0x01000000  /* Summon Angel */
618         #define RF6_S_DEMON         0x02000000  /* Summon Demon */
619         #define RF6_S_UNDEAD        0x04000000  /* Summon Undead */
620         #define RF6_S_DRAGON        0x08000000  /* Summon Dragon */
621         #define RF6_S_HI_UNDEAD     0x10000000  /* Summon Greater Undead */
622         #define RF6_S_HI_DRAGON     0x20000000  /* Summon Ancient Dragon */
623         #define RF6_S_AMBERITES     0x40000000  /* Summon Amberites */
624         #define RF6_S_UNIQUE        0x80000000  /* Summon Unique Monster */
625
626         BIT_FLAGS a_ability_flags3;     /* Activate Ability Flags 7 (implementing) */
627         BIT_FLAGS a_ability_flags4;     /* Activate Ability Flags 8 (implementing) */
628
629         monster_blow blow[4];   /* Up to four blows per round */
630         MONRACE_IDX reinforce_id[6];
631         DICE_NUMBER reinforce_dd[6];
632         DICE_SID reinforce_ds[6];
633
634         ARTIFACT_IDX artifact_id[4];    /* 特定アーティファクトドロップID */
635         RARITY artifact_rarity[4];      /* 特定アーティファクトレア度 */
636         PERCENTAGE artifact_percent[4]; /* 特定アーティファクトドロップ率 */
637
638         PERCENTAGE arena_ratio;         /* アリーナの評価修正値(%基準 / 0=100%) / Arena */
639
640         MONRACE_IDX next_r_idx;
641         EXP next_exp;
642
643         DEPTH level;                    /* Level of creature */
644         RARITY rarity;                  /* Rarity of creature */
645
646         TERM_COLOR d_attr;              /* Default monster attribute */
647         SYMBOL_CODE d_char;                     /* Default monster character */
648
649         TERM_COLOR x_attr;              /* Desired monster attribute */
650         SYMBOL_CODE x_char;                     /* Desired monster character */
651
652
653         MONSTER_NUMBER max_num; /* Maximum population allowed per level */
654         MONSTER_NUMBER cur_num; /* Monster population on current level */
655
656         FLOOR_IDX floor_id;             /* Location of unique monster */
657
658
659         MONSTER_NUMBER r_sights;        /* Count sightings of this monster */
660         MONSTER_NUMBER r_deaths;        /* Count deaths from this monster */
661
662         MONSTER_NUMBER r_pkills;        /* Count visible monsters killed in this life */
663         MONSTER_NUMBER r_akills;        /* Count all monsters killed in this life */
664         MONSTER_NUMBER r_tkills;        /* Count monsters killed in all lives */
665
666         byte r_wake;                    /* Number of times woken up (?) */
667         byte r_ignore;                  /* Number of times ignored (?) */
668
669         byte r_xtra1;                   /* Something (unused) */
670         byte r_xtra2;                   /* Something (unused) */
671
672         ITEM_NUMBER r_drop_gold;        /*!< これまでに撃破時に落とした財宝の数 / Max number of gold dropped at once */
673         ITEM_NUMBER r_drop_item;        /*!< これまでに撃破時に落としたアイテムの数 / Max number of item dropped at once */
674
675         byte r_cast_spell;              /* Max number of other spells seen */
676
677         byte r_blows[4];                /* Number of times each blow type was seen */
678
679         u32b r_flags1;                  /* Observed racial flags */
680         u32b r_flags2;                  /* Observed racial flags */
681         u32b r_flags3;                  /* Observed racial flags */
682         u32b r_flags4;                  /* Observed racial flags */
683         u32b r_flags5;                  /* Observed racial flags */
684         u32b r_flags6;                  /* Observed racial flags */
685         /* u32b r_flags7; */    /* Observed racial flags */
686         u32b r_flagsr;                  /* Observed racial resistance flags */
687 };
688
689
690
691 /*
692  * Information about "vault generation"
693  */
694
695 typedef struct vault_type vault_type;
696
697 struct vault_type
698 {
699         STR_OFFSET name;        /* Name (offset) */
700         STR_OFFSET text;        /* Text (offset) */
701
702         ROOM_IDX typ;           /* Vault type */
703         PROB rat;                       /* Vault rating (unused) */
704         POSITION hgt;           /* Vault height */
705         POSITION wid;           /* Vault width */
706 };
707
708
709 /*
710  * Information about "skill"
711  */
712
713 typedef struct skill_table skill_table;
714
715 struct skill_table
716 {
717         SUB_EXP w_start[5][64];   /* start weapon exp */
718         SUB_EXP w_max[5][64];        /* max weapon exp */
719         SUB_EXP s_start[10];      /* start skill */
720         SUB_EXP s_max[10];           /* max skill */
721 };
722
723
724 /*
725  * A single "grid" in a Cave
726  *
727  * Note that several aspects of the code restrict the actual current_floor_ptr->grid_array
728  * to a max size of 256 by 256.  In partcular, locations are often
729  * saved as bytes, limiting each coordinate to the 0-255 range.
730  *
731  * The "o_idx" and "m_idx" fields are very interesting.  There are
732  * many places in the code where we need quick access to the actual
733  * monster or object(s) in a given grid.  The easiest way to
734  * do this is to simply keep the index of the monster and object
735  * (if any) with the grid, but this takes 198*66*4 bytes of memory.
736  * Several other methods come to mind, which require only half this
737  * amound of memory, but they all seem rather complicated, and would
738  * probably add enough code that the savings would be lost.  So for
739  * these reasons, we simply store an index into the "o_list" and
740  * "current_floor_ptr->m_list" arrays, using "zero" when no monster/object is present.
741  *
742  * Note that "o_idx" is the index of the top object in a stack of
743  * objects, using the "next_o_idx" field of objects (see below) to
744  * create the singly linked list of objects.  If "o_idx" is zero
745  * then there are no objects in the grid.
746  *
747  * Note the special fields for the "MONSTER_FLOW" code.
748  */
749
750 typedef struct grid_type grid_type;
751
752 struct grid_type
753 {
754         BIT_FLAGS info;         /* Hack -- current_floor_ptr->grid_array flags */
755
756         FEAT_IDX feat;          /* Hack -- feature type */
757         OBJECT_IDX o_idx;               /* Object in this grid */
758         MONSTER_IDX m_idx;              /* Monster in this grid */
759
760         /*! 地形の特別な情報を保存する / Special current_floor_ptr->grid_array info
761          * 具体的な使用一覧はクエスト行き階段の移行先クエストID、
762          * 各ダンジョン入口の移行先ダンジョンID、
763          * 
764          */
765         s16b special;
766
767         FEAT_IDX mimic;         /* Feature to mimic */
768
769         byte cost;              /* Hack -- cost of flowing */
770         byte dist;              /* Hack -- distance from player */
771         byte when;              /* Hack -- when cost was computed */
772 };
773
774
775
776 /*
777  * Simple structure to hold a map location
778  */
779 typedef struct coord coord;
780
781 struct coord
782 {
783         POSITION y;
784         POSITION x;
785 };
786
787
788
789 /*
790  * Object information, for a specific object.
791  *
792  * Note that a "discount" on an item is permanent and never goes away.
793  *
794  * Note that inscriptions are now handled via the "quark_str()" function
795  * applied to the "note" field, which will return NULL if "note" is zero.
796  *
797  * Note that "object" records are "copied" on a fairly regular basis,
798  * and care must be taken when handling such objects.
799  *
800  * Note that "object flags" must now be derived from the object kind,
801  * the artifact and ego-item indexes, and the two "xtra" fields.
802  *
803  * Each grid points to one (or zero) objects via the "o_idx"
804  * field (above).  Each object then points to one (or zero) objects
805  * via the "next_o_idx" field, forming a singly linked list, which
806  * in game terms, represents a "stack" of objects in the same grid.
807  *
808  * Each monster points to one (or zero) objects via the "hold_o_idx"
809  * field (below).  Each object then points to one (or zero) objects
810  * via the "next_o_idx" field, forming a singly linked list, which
811  * in game terms, represents a pile of objects held by the monster.
812  *
813  * The "held_m_idx" field is used to indicate which monster, if any,
814  * is holding the object.  Objects being held have "ix=0" and "iy=0".
815  */
816
817 typedef struct object_type object_type;
818
819 struct object_type
820 {
821         KIND_OBJECT_IDX k_idx;                  /* Kind index (zero if "dead") */
822
823         POSITION iy;                    /* Y-position on map, or zero */
824         POSITION ix;                    /* X-position on map, or zero */
825
826         OBJECT_TYPE_VALUE tval;                 /* Item type (from kind) */
827         OBJECT_SUBTYPE_VALUE sval;                      /* Item sub-type (from kind) */
828
829         PARAMETER_VALUE pval;                   /* Item extra-parameter */
830
831         DISCOUNT_RATE discount;         /* Discount (if any) */
832
833         ITEM_NUMBER number;     /* Number of items */
834
835         WEIGHT weight;          /* Item weight */
836
837         ARTIFACT_IDX name1;             /* Artifact type, if any */
838         EGO_IDX name2;                  /* Ego-Item type, if any */
839
840         XTRA8 xtra1;                    /* Extra info type (now unused) */
841         XTRA8 xtra2;                    /* Extra info activation index */
842         XTRA8 xtra3;                    /* Extra info for weaponsmith */
843         XTRA16 xtra4;                   /*!< 光源の残り寿命、あるいは捕らえたモンスターの現HP / Extra info fuel or captured monster's current HP */
844         XTRA16 xtra5;                   /*!< 捕らえたモンスターの最大HP / Extra info captured monster's max HP */
845
846         HIT_PROB to_h;                  /* Plusses to hit */
847         HIT_POINT to_d;                 /* Plusses to damage */
848         ARMOUR_CLASS to_a;                      /* Plusses to AC */
849
850         ARMOUR_CLASS ac;                        /* Normal AC */
851
852         DICE_NUMBER dd;
853         DICE_SID ds;            /* Damage dice/sides */
854
855         TIME_EFFECT timeout;    /* Timeout Counter */
856
857         byte ident;                     /* Special flags  */
858         byte marked;            /* Object is marked */
859
860         u16b inscription;       /* Inscription index */
861         u16b art_name;      /* Artifact name (random artifacts) */
862
863         byte feeling;          /* Game generated inscription number (eg, pseudo-id) */
864
865         BIT_FLAGS art_flags[TR_FLAG_SIZE];        /* Extra Flags for ego and artifacts */
866         BIT_FLAGS curse_flags;        /* Flags for curse */
867
868         OBJECT_IDX next_o_idx;  /* Next object in stack (if any) */
869         MONSTER_IDX held_m_idx; /* Monster holding us (if any) */
870
871         ARTIFACT_BIAS_IDX artifact_bias; /*!< ランダムアーティファクト生成時のバイアスID */
872 };
873
874
875
876 /*
877  * Monster information, for a specific monster.
878  * Note: fy, fx constrain dungeon size to 256x256
879  * The "hold_o_idx" field points to the first object of a stack
880  * of objects (if any) being carried by the monster (see above).
881  */
882
883 typedef struct monster_type monster_type;
884
885 struct monster_type
886 {
887         MONRACE_IDX r_idx;              /* Monster race index 0 = dead. */
888         MONRACE_IDX ap_r_idx;   /* Monster race appearance index */
889         byte sub_align;         /* Sub-alignment for a neutral monster */
890
891         POSITION fy;            /* Y location on map */
892         POSITION fx;            /* X location on map */
893
894         HIT_POINT hp;           /* Current Hit points */
895         HIT_POINT maxhp;                /* Max Hit points */
896         HIT_POINT max_maxhp;            /* Max Max Hit points */
897         HIT_POINT dealt_damage;         /* Sum of damages dealt by player */
898
899         TIME_EFFECT mtimed[MAX_MTIMED]; /* Timed status counter */
900
901         SPEED mspeed;           /* Monster "speed" */
902         ACTION_ENERGY energy_need;      /* Monster "energy" */
903
904         POSITION cdis;          /* Current dis from player */
905
906         BIT_FLAGS8 mflag;       /* Extra monster flags */
907         #define MFLAG_VIEW      0x01    /* Monster is in line of sight */
908         #define MFLAG_LOS       0x02    /* Monster is marked for project_all_los() */
909         #define MFLAG_XXX2      0x04    /* (unused) */
910         #define MFLAG_ETF       0x08    /* Monster is entering the field. */
911         #define MFLAG_BORN      0x10    /* Monster is still being born */
912         #define MFLAG_NICE      0x20    /* Monster is still being nice */
913
914         BIT_FLAGS8 mflag2;      /* Extra monster flags */
915         #define MFLAG2_KAGE      0x01    /* Monster is kage */
916         #define MFLAG2_NOPET     0x02    /* Cannot make monster pet */
917         #define MFLAG2_NOGENO    0x04    /* Cannot genocide */
918         #define MFLAG2_CHAMELEON 0x08    /* Monster is chameleon */
919         #define MFLAG2_NOFLOW    0x10    /* Monster is in no_flow_by_smell mode */
920         #define MFLAG2_SHOW      0x20    /* Monster is recently memorized */
921         #define MFLAG2_MARK      0x40    /* Monster is currently memorized */
922
923         bool ml;                /* Monster is "visible" */
924
925         OBJECT_IDX hold_o_idx;  /* Object being held (if any) */
926
927         POSITION target_y;              /* Can attack !los player */
928         POSITION target_x;              /* Can attack !los player */
929
930         STR_OFFSET nickname;            /* Monster's Nickname */
931
932         EXP exp;
933
934         /* TODO: クローン、ペット、有効化は意義が異なるので別変数に切り離すこと。save/loadのバージョン更新が面倒そうだけど */
935         BIT_FLAGS smart; /*!< Field for "smart_learn" - Some bit-flags for the "smart" field */
936         #define SM_RES_ACID             0x00000001 /*!< モンスターの学習フラグ: プレイヤーに酸耐性あり */
937         #define SM_RES_ELEC             0x00000002 /*!< モンスターの学習フラグ: プレイヤーに電撃耐性あり */
938         #define SM_RES_FIRE             0x00000004 /*!< モンスターの学習フラグ: プレイヤーに火炎耐性あり */
939         #define SM_RES_COLD             0x00000008 /*!< モンスターの学習フラグ: プレイヤーに冷気耐性あり */
940         #define SM_RES_POIS             0x00000010 /*!< モンスターの学習フラグ: プレイヤーに毒耐性あり */
941         #define SM_RES_NETH             0x00000020 /*!< モンスターの学習フラグ: プレイヤーに地獄耐性あり */
942         #define SM_RES_LITE             0x00000040 /*!< モンスターの学習フラグ: プレイヤーに閃光耐性あり */
943         #define SM_RES_DARK             0x00000080 /*!< モンスターの学習フラグ: プレイヤーに暗黒耐性あり */
944         #define SM_RES_FEAR             0x00000100 /*!< モンスターの学習フラグ: プレイヤーに恐怖耐性あり */
945         #define SM_RES_CONF             0x00000200 /*!< モンスターの学習フラグ: プレイヤーに混乱耐性あり */
946         #define SM_RES_CHAOS            0x00000400 /*!< モンスターの学習フラグ: プレイヤーにカオス耐性あり */
947         #define SM_RES_DISEN            0x00000800 /*!< モンスターの学習フラグ: プレイヤーに劣化耐性あり */
948         #define SM_RES_BLIND            0x00001000 /*!< モンスターの学習フラグ: プレイヤーに盲目耐性あり */
949         #define SM_RES_NEXUS            0x00002000 /*!< モンスターの学習フラグ: プレイヤーに因果混乱耐性あり */
950         #define SM_RES_SOUND            0x00004000 /*!< モンスターの学習フラグ: プレイヤーに轟音耐性あり */
951         #define SM_RES_SHARD            0x00008000 /*!< モンスターの学習フラグ: プレイヤーに破片耐性あり */
952         #define SM_OPP_ACID             0x00010000 /*!< モンスターの学習フラグ: プレイヤーに二重酸耐性あり */
953         #define SM_OPP_ELEC             0x00020000 /*!< モンスターの学習フラグ: プレイヤーに二重電撃耐性あり */
954         #define SM_OPP_FIRE             0x00040000 /*!< モンスターの学習フラグ: プレイヤーに二重火炎耐性あり */
955         #define SM_OPP_COLD             0x00080000 /*!< モンスターの学習フラグ: プレイヤーに二重冷気耐性あり */
956         #define SM_OPP_POIS             0x00100000 /*!< モンスターの学習フラグ: プレイヤーに二重毒耐性あり */
957         #define SM_OPP_XXX1             0x00200000 /*!< 未使用 / (unused) */
958         #define SM_CLONED               0x00400000 /*!< クローンである / Cloned */
959         #define SM_PET                  0x00800000 /*!< ペットである / Pet */
960         #define SM_IMM_ACID             0x01000000 /*!< モンスターの学習フラグ: プレイヤーに酸免疫あり */
961         #define SM_IMM_ELEC             0x02000000 /*!< モンスターの学習フラグ: プレイヤーに電撃免疫あり */
962         #define SM_IMM_FIRE             0x04000000 /*!< モンスターの学習フラグ: プレイヤーに火炎免疫あり */
963         #define SM_IMM_COLD             0x08000000 /*!< モンスターの学習フラグ: プレイヤーに冷気免疫あり */
964         #define SM_FRIENDLY             0x10000000 /*!< 友好的である / Friendly */
965         #define SM_IMM_REFLECT          0x20000000 /*!< モンスターの学習フラグ: プレイヤーに反射あり */
966         #define SM_IMM_FREE             0x40000000 /*!< モンスターの学習フラグ: プレイヤーに麻痺耐性あり */
967         #define SM_IMM_MANA             0x80000000 /*!< モンスターの学習フラグ: プレイヤーにMPがない */
968
969         MONSTER_IDX parent_m_idx;
970 };
971
972
973
974
975 /*
976  * An entry for the object/monster allocation functions
977  *
978  * Pass 1 is determined from allocation information
979  * Pass 2 is determined from allocation restriction
980  * Pass 3 is determined from allocation calculation
981  */
982
983 typedef struct alloc_entry alloc_entry;
984
985 struct alloc_entry
986 {
987         KIND_OBJECT_IDX index;          /* The actual index */
988
989         DEPTH level;            /* Base dungeon level */
990         PROB prob1;             /* Probability, pass 1 */
991         PROB prob2;             /* Probability, pass 2 */
992         PROB prob3;             /* Probability, pass 3 */
993
994         u16b total;             /* Unused for now */
995 };
996
997
998
999 /*
1000  * Available "options"
1001  *
1002  *      - Address of actual option variable (or NULL)
1003  *
1004  *      - Normal Value (TRUE or FALSE)
1005  *
1006  *      - Option Page Number (or zero)
1007  *
1008  *      - Savefile Set (or zero)
1009  *      - Savefile Bit in that set
1010  *
1011  *      - Textual name (or NULL)
1012  *      - Textual description
1013  */
1014
1015 typedef struct option_type option_type;
1016
1017 struct option_type
1018 {
1019         bool    *o_var;
1020
1021         byte    o_norm;
1022
1023         byte    o_page;
1024
1025         byte    o_set;
1026         byte    o_bit;
1027
1028         concptr o_text;
1029         concptr o_desc;
1030 };
1031
1032
1033 typedef struct quest_type quest_type;
1034
1035 /*!
1036  * @struct quest_type
1037  * @brief クエスト情報の構造体 / Structure for the "quests".
1038  */
1039
1040 struct quest_type
1041 {
1042         QUEST_STATUS status;          /*!< クエストの進行ステータス / Is the quest taken, completed, finished? */
1043         QUEST_TYPE type;              /*!< クエストの種別 / The quest type */
1044
1045         GAME_TEXT name[60];          /*!< クエスト名 / Quest name */
1046         DEPTH level;            /*!< 処理階層 / Dungeon level */
1047         MONRACE_IDX r_idx;      /*!< クエスト対象のモンスターID / Monster race */
1048
1049         MONSTER_NUMBER cur_num; /*!< 撃破したモンスターの数 / Number killed */
1050         MONSTER_NUMBER max_num; /*!< 求められるモンスターの撃破数 / Number required */
1051
1052         KIND_OBJECT_IDX k_idx;              /*!< クエスト対象のアイテムID / object index */
1053         MONSTER_NUMBER num_mon; /*!< QUEST_TYPE_KILL_NUMBER時の目標撃破数 number of monsters on level */
1054
1055         BIT_FLAGS flags;             /*!< クエストに関するフラグビット / quest flags */
1056         DUNGEON_IDX dungeon;           /*!< クエスト対象のダンジョンID / quest dungeon */
1057
1058         PLAYER_LEVEL complev;           /*!< クリア時プレイヤーレベル / player level (complete) */
1059         REAL_TIME comptime;          /*!< クリア時ゲーム時間 /  quest clear time*/
1060 };
1061
1062
1063 /*
1064  * A store owner
1065  */
1066 typedef struct owner_type owner_type;
1067
1068 struct owner_type
1069 {
1070         concptr owner_name;     /* Name */
1071         PRICE max_cost;         /* Purse limit */
1072         byte max_inflate;       /* Inflation (max) */
1073         byte min_inflate;       /* Inflation (min) */
1074         byte haggle_per;        /* Haggle unit */
1075         byte insult_max;        /* Insult limit */
1076         byte owner_race;        /* Owner race */
1077 };
1078
1079
1080
1081
1082 /*
1083  * A store, with an owner, various state flags, a current stock
1084  * of items, and a table of items that are often purchased.
1085  */
1086 typedef struct store_type store_type;
1087
1088 struct store_type
1089 {
1090         byte type;                              /* Store type */
1091
1092         byte owner;                             /* Owner index */
1093         byte extra;                             /* Unused for now */
1094
1095         s16b insult_cur;                /* Insult counter */
1096
1097         s16b good_buy;                  /* Number of "good" buys */
1098         s16b bad_buy;                   /* Number of "bad" buys */
1099
1100         s32b store_open;                /* Closed until this current_world_ptr->game_turn */
1101
1102         s32b last_visit;                /* Last visited on this current_world_ptr->game_turn */
1103
1104         s16b table_num;                 /* Table -- Number of entries */
1105         s16b table_size;                /* Table -- Total Size of Array */
1106         s16b *table;                    /* Table -- Legal item kinds */
1107
1108         s16b stock_num;                 /* Stock -- Number of entries */
1109         s16b stock_size;                /* Stock -- Total Size of Array */
1110         object_type *stock;             /* Stock -- Actual stock items */
1111 };
1112
1113
1114 /*
1115  * The "name" of spell 'N' is stored as spell_names[X][N],
1116  * where X is 0 for mage-spells and 1 for priest-spells.
1117  */
1118 typedef struct magic_type magic_type;
1119
1120 struct magic_type
1121 {
1122         PLAYER_LEVEL slevel;    /* Required level (to learn) */
1123         MANA_POINT smana;               /* Required mana (to cast) */
1124         PERCENTAGE sfail;               /* Minimum chance of failure */
1125         EXP sexp;                               /* Encoded experience bonus */
1126 };
1127
1128
1129 /*
1130  * Information about the player's "magic"
1131  *
1132  * Note that a player with a "spell_book" of "zero" is illiterate.
1133  */
1134
1135 typedef struct player_magic player_magic;
1136
1137 struct player_magic
1138 {
1139         OBJECT_TYPE_VALUE spell_book; /* Tval of spell books (if any) */
1140         int spell_xtra;         /* Something for later */
1141
1142         int spell_stat;         /* Stat for spells (if any)  */
1143         int spell_type;         /* Spell type (mage/priest) */
1144
1145         int spell_first;                /* Level of first spell */
1146         int spell_weight;               /* Weight that hurts spells */
1147
1148         magic_type info[MAX_MAGIC][32];    /* The available spells */
1149 };
1150
1151
1152
1153 /*
1154  * Player sex info
1155  */
1156
1157 typedef struct player_sex player_sex;
1158
1159 struct player_sex
1160 {
1161         concptr title;                  /* Type of sex */
1162         concptr winner;         /* Name of winner */
1163 #ifdef JP
1164         concptr E_title;                /* 英語性別 */
1165         concptr E_winner;               /* 英語性別 */
1166 #endif
1167 };
1168
1169
1170 /*
1171  * Player racial info
1172  */
1173
1174 typedef struct player_race player_race;
1175
1176 struct player_race
1177 {
1178         concptr title;                  /* Type of race */
1179
1180 #ifdef JP
1181         concptr E_title;                /* 英語種族 */
1182 #endif
1183         s16b r_adj[6];          /* Racial stat bonuses */
1184
1185         s16b r_dis;                     /* disarming */
1186         s16b r_dev;                     /* magic devices */
1187         s16b r_sav;                     /* saving throw */
1188         s16b r_stl;                     /* stealth */
1189         s16b r_srh;                     /* search ability */
1190         s16b r_fos;                     /* search frequency */
1191         s16b r_thn;                     /* combat (normal) */
1192         s16b r_thb;                     /* combat (shooting) */
1193
1194         byte r_mhp;                     /* Race hit-dice modifier */
1195         byte r_exp;                     /* Race experience factor */
1196
1197         byte b_age;                     /* base age */
1198         byte m_age;                     /* mod age */
1199
1200         byte m_b_ht;            /* base height (males) */
1201         byte m_m_ht;            /* mod height (males) */
1202         byte m_b_wt;            /* base weight (males) */
1203         byte m_m_wt;            /* mod weight (males) */
1204
1205         byte f_b_ht;            /* base height (females) */
1206         byte f_m_ht;            /* mod height (females)   */
1207         byte f_b_wt;            /* base weight (females) */
1208         byte f_m_wt;            /* mod weight (females) */
1209
1210         byte infra;                     /* Infra-vision range */
1211
1212         u32b choice;        /* Legal class choices */
1213 /*    byte choice_xtra;   */
1214 };
1215
1216
1217 /*
1218  * Player class info
1219  */
1220
1221 typedef struct player_class player_class;
1222
1223 struct player_class
1224 {
1225         concptr title;                  /* Type of class */
1226
1227 #ifdef JP
1228         concptr E_title;                /* 英語職業 */
1229 #endif
1230         s16b c_adj[6];          /* Class stat modifier */
1231
1232         s16b c_dis;                     /* class disarming */
1233         s16b c_dev;                     /* class magic devices */
1234         s16b c_sav;                     /* class saving throws */
1235         s16b c_stl;                     /* class stealth */
1236         s16b c_srh;                     /* class searching ability */
1237         s16b c_fos;                     /* class searching frequency */
1238         s16b c_thn;                     /* class to hit (normal) */
1239         s16b c_thb;                     /* class to hit (bows) */
1240
1241         s16b x_dis;                     /* extra disarming */
1242         s16b x_dev;                     /* extra magic devices */
1243         s16b x_sav;                     /* extra saving throws */
1244         s16b x_stl;                     /* extra stealth */
1245         s16b x_srh;                     /* extra searching ability */
1246         s16b x_fos;                     /* extra searching frequency */
1247         s16b x_thn;                     /* extra to hit (normal) */
1248         s16b x_thb;                     /* extra to hit (bows) */
1249
1250         s16b c_mhp;                     /* Class hit-dice adjustment */
1251         s16b c_exp;                     /* Class experience factor */
1252
1253         byte pet_upkeep_div; /* Pet upkeep divider */
1254 };
1255
1256
1257 typedef struct player_seikaku player_seikaku;
1258 struct player_seikaku
1259 {
1260         concptr title;                  /* Type of seikaku */
1261
1262 #ifdef JP
1263         concptr E_title;                /* 英語性格 */
1264 #endif
1265
1266         s16b a_adj[6];          /* seikaku stat bonuses */
1267
1268         s16b a_dis;                     /* seikaku disarming */
1269         s16b a_dev;                     /* seikaku magic devices */
1270         s16b a_sav;                     /* seikaku saving throw */
1271         s16b a_stl;                     /* seikaku stealth */
1272         s16b a_srh;                     /* seikaku search ability */
1273         s16b a_fos;                     /* seikaku search frequency */
1274         s16b a_thn;                     /* seikaku combat (normal) */
1275         s16b a_thb;                     /* seikaku combat (shooting) */
1276
1277         s16b a_mhp;                     /* Race hit-dice modifier */
1278
1279         byte no;                        /* の */
1280         byte sex;                       /* seibetu seigen */
1281 };
1282
1283
1284 /*
1285  * Most of the "player" information goes here.
1286  *
1287  * This stucture gives us a large collection of player variables.
1288  *
1289  * This structure contains several "blocks" of information.
1290  *   (1) the "permanent" info
1291  *   (2) the "variable" info
1292  *   (3) the "transient" info
1293  *
1294  * All of the "permanent" info, and most of the "variable" info,
1295  * is saved in the savefile.  The "transient" info is recomputed
1296  * whenever anything important changes.
1297  */
1298
1299 typedef struct player_type player_type;
1300
1301 struct player_type
1302 {
1303         POSITION oldpy;         /* Previous player location -KMW- */
1304         POSITION oldpx;         /* Previous player location -KMW- */
1305
1306         SEX_IDX psex;           /* Sex index */
1307         RACE_IDX prace;         /* Race index */
1308         CLASS_IDX pclass;       /* Class index */
1309         CHARACTER_IDX pseikaku; /* Seikaku index */
1310         REALM_IDX realm1;               /* First magic realm */
1311         REALM_IDX realm2;               /* Second magic realm */
1312         CHARACTER_IDX oops;             /* Unused */
1313
1314         DICE_SID hitdie;        /* Hit dice (sides) */
1315         u16b expfact;   /* Experience factor
1316                                         * Note: was byte, causing overflow for Amberite
1317                                         * characters (such as Amberite Paladins)
1318                                         */
1319
1320         s16b age;                       /* Characters age */
1321         s16b ht;                        /* Height */
1322         s16b wt;                        /* Weight */
1323         s16b sc;                        /* Social Class */
1324
1325         PRICE au;                       /* Current Gold */
1326
1327         EXP max_max_exp;        /* Max max experience (only to calculate score) */
1328         EXP max_exp;            /* Max experience */
1329         EXP exp;                        /* Cur experience */
1330         u32b exp_frac;          /* Cur exp frac (times 2^16) */
1331
1332         PLAYER_LEVEL lev;                       /* Level */
1333
1334         TOWN_IDX town_num;                      /* Current town number */
1335         s16b arena_number;              /* monster number in arena -KMW- */
1336         bool inside_arena;              /* Is character inside arena? */
1337         QUEST_IDX inside_quest;         /* Inside quest level */
1338         bool inside_battle;             /* Is character inside tougijou? */
1339
1340         DUNGEON_IDX dungeon_idx; /* current dungeon index */
1341         POSITION wilderness_x;  /* Coordinates in the wilderness */
1342         POSITION wilderness_y;
1343         bool wild_mode;
1344
1345         HIT_POINT mhp;                  /* Max hit pts */
1346         HIT_POINT chp;                  /* Cur hit pts */
1347         u32b chp_frac;          /* Cur hit frac (times 2^16) */
1348         PERCENTAGE mutant_regenerate_mod;
1349
1350         MANA_POINT msp;                 /* Max mana pts */
1351         MANA_POINT csp;                 /* Cur mana pts */
1352         u32b csp_frac;          /* Cur mana frac (times 2^16) */
1353
1354         s16b max_plv;           /* Max Player Level */
1355
1356         BASE_STATUS stat_max[6];        /* Current "maximal" stat values */
1357         BASE_STATUS stat_max_max[6];    /* Maximal "maximal" stat values */
1358         BASE_STATUS stat_cur[6];        /* Current "natural" stat values */
1359
1360         s16b learned_spells;
1361         s16b add_spells;
1362
1363         u32b count;
1364
1365         TIME_EFFECT fast;               /* Timed -- Fast */
1366         TIME_EFFECT slow;               /* Timed -- Slow */
1367         TIME_EFFECT blind;              /* Timed -- Blindness */
1368         TIME_EFFECT paralyzed;          /* Timed -- Paralysis */
1369         TIME_EFFECT confused;           /* Timed -- Confusion */
1370         TIME_EFFECT afraid;             /* Timed -- Fear */
1371         TIME_EFFECT image;              /* Timed -- Hallucination */
1372         TIME_EFFECT poisoned;           /* Timed -- Poisoned */
1373         TIME_EFFECT cut;                /* Timed -- Cut */
1374         TIME_EFFECT stun;               /* Timed -- Stun */
1375
1376         TIME_EFFECT protevil;           /* Timed -- Protection */
1377         TIME_EFFECT invuln;             /* Timed -- Invulnerable */
1378         TIME_EFFECT ult_res;            /* Timed -- Ultimate Resistance */
1379         TIME_EFFECT hero;               /* Timed -- Heroism */
1380         TIME_EFFECT shero;              /* Timed -- Super Heroism */
1381         TIME_EFFECT shield;             /* Timed -- Shield Spell */
1382         TIME_EFFECT blessed;            /* Timed -- Blessed */
1383         TIME_EFFECT tim_invis;          /* Timed -- See Invisible */
1384         TIME_EFFECT tim_infra;          /* Timed -- Infra Vision */
1385         TIME_EFFECT tsuyoshi;           /* Timed -- Tsuyoshi Special */
1386         TIME_EFFECT ele_attack; /* Timed -- Elemental Attack */
1387         TIME_EFFECT ele_immune; /* Timed -- Elemental Immune */
1388
1389         TIME_EFFECT oppose_acid;        /* Timed -- oppose acid */
1390         TIME_EFFECT oppose_elec;        /* Timed -- oppose lightning */
1391         TIME_EFFECT oppose_fire;        /* Timed -- oppose heat */
1392         TIME_EFFECT oppose_cold;        /* Timed -- oppose cold */
1393         TIME_EFFECT oppose_pois;        /* Timed -- oppose poison */
1394
1395         TIME_EFFECT tim_esp;       /* Timed ESP */
1396         TIME_EFFECT wraith_form;   /* Timed wraithform */
1397
1398         TIME_EFFECT resist_magic;  /* Timed Resist Magic (later) */
1399         TIME_EFFECT tim_regen;
1400         TIME_EFFECT kabenuke;
1401         TIME_EFFECT tim_stealth;
1402         TIME_EFFECT tim_levitation;
1403         TIME_EFFECT tim_sh_touki;
1404         TIME_EFFECT lightspeed;
1405         TIME_EFFECT tsubureru;
1406         TIME_EFFECT magicdef;
1407         TIME_EFFECT tim_res_nether;     /* Timed -- Nether resistance */
1408         TIME_EFFECT tim_res_time;       /* Timed -- Time resistance */
1409         MIMIC_RACE_IDX mimic_form;
1410         TIME_EFFECT tim_mimic;
1411         TIME_EFFECT tim_sh_fire;
1412         TIME_EFFECT tim_sh_holy;
1413         TIME_EFFECT tim_eyeeye;
1414
1415         /* for mirror master */
1416         TIME_EFFECT tim_reflect;       /* Timed -- Reflect */
1417         TIME_EFFECT multishadow;       /* Timed -- Multi-shadow */
1418         TIME_EFFECT dustrobe;          /* Timed -- Robe of dust */
1419
1420         bool timewalk;
1421         GAME_TURN resting;      /* Current counter for resting, if any */
1422
1423         PATRON_IDX chaos_patron;
1424
1425         BIT_FLAGS muta1; /*!< レイシャル型の変異 / "Activatable" mutations must be in MUT1_* */        
1426         #define MUT1_SPIT_ACID                  0x00000001L /*!< 突然変異: 酸の唾 */
1427         #define MUT1_BR_FIRE                    0x00000002L /*!< 突然変異: 炎のブレス */
1428         #define MUT1_HYPN_GAZE                  0x00000004L /*!< 突然変異: 催眠睨み */
1429         #define MUT1_TELEKINES                  0x00000008L /*!< 突然変異: 念動力 */
1430         #define MUT1_VTELEPORT                  0x00000010L /*!< 突然変異: テレポート / Voluntary teleport */
1431         #define MUT1_MIND_BLST                  0x00000020L /*!< 突然変異: 精神攻撃 */
1432         #define MUT1_RADIATION                  0x00000040L /*!< 突然変異: 放射能 */
1433         #define MUT1_VAMPIRISM                  0x00000080L /*!< 突然変異: 吸血 */
1434         #define MUT1_SMELL_MET                  0x00000100L /*!< 突然変異: 金属嗅覚 */
1435         #define MUT1_SMELL_MON                  0x00000200L /*!< 突然変異: 敵臭嗅覚 */
1436         #define MUT1_BLINK                      0x00000400L /*!< 突然変異: ショート・テレポート */
1437         #define MUT1_EAT_ROCK                   0x00000800L /*!< 突然変異: 岩喰い */
1438         #define MUT1_SWAP_POS                   0x00001000L /*!< 突然変異: 位置交換 */
1439         #define MUT1_SHRIEK                     0x00002000L /*!< 突然変異: 叫び */
1440         #define MUT1_ILLUMINE                   0x00004000L /*!< 突然変異: 照明 */
1441         #define MUT1_DET_CURSE                  0x00008000L /*!< 突然変異: 呪い感知 */
1442         #define MUT1_BERSERK                    0x00010000L /*!< 突然変異: 狂戦士化 */
1443         #define MUT1_POLYMORPH                  0x00020000L /*!< 突然変異: 変身 */
1444         #define MUT1_MIDAS_TCH                  0x00040000L /*!< 突然変異: ミダスの手 */
1445         #define MUT1_GROW_MOLD                  0x00080000L /*!< 突然変異: カビ発生 */
1446         #define MUT1_RESIST                     0x00100000L /*!< 突然変異: エレメント耐性 */
1447         #define MUT1_EARTHQUAKE                 0x00200000L /*!< 突然変異: 地震 */
1448         #define MUT1_EAT_MAGIC                  0x00400000L /*!< 突然変異: 魔力喰い */
1449         #define MUT1_WEIGH_MAG                  0x00800000L /*!< 突然変異: 魔力感知 */
1450         #define MUT1_STERILITY                  0x01000000L /*!< 突然変異: 増殖阻止 */
1451         #define MUT1_PANIC_HIT                  0x02000000L /*!< 突然変異: ヒットアンドアウェイ */
1452         #define MUT1_DAZZLE                     0x04000000L /*!< 突然変異: 眩惑 */
1453         #define MUT1_LASER_EYE                  0x08000000L /*!< 突然変異: レーザー・アイ */
1454         #define MUT1_RECALL                     0x10000000L /*!< 突然変異: 帰還 */
1455         #define MUT1_BANISH                     0x20000000L /*!< 突然変異: 邪悪消滅 */
1456         #define MUT1_COLD_TOUCH                 0x40000000L /*!< 突然変異: 凍結の手 */
1457         #define MUT1_LAUNCHER                   0x80000000L /*!< 突然変異: アイテム投げ */
1458
1459         BIT_FLAGS muta2; /*!< 常時効果つきの変異1 / Randomly activating mutations must be MUT2_* */
1460         #define MUT2_BERS_RAGE                  0x00000001L /*!< 突然変異: 狂戦士化の発作 */
1461         #define MUT2_COWARDICE                  0x00000002L /*!< 突然変異: 臆病 */
1462         #define MUT2_RTELEPORT                  0x00000004L /*!< 突然変異: ランダムテレポート / Random teleport, instability */
1463         #define MUT2_ALCOHOL                    0x00000008L /*!< 突然変異: アルコール分泌 */
1464         #define MUT2_HALLU                      0x00000010L /*!< 突然変異: 幻覚を引き起こす精神錯乱 */
1465         #define MUT2_FLATULENT                  0x00000020L /*!< 突然変異: 猛烈な屁 */
1466         #define MUT2_SCOR_TAIL                  0x00000040L /*!< 突然変異: サソリの尻尾 */
1467         #define MUT2_HORNS                      0x00000080L /*!< 突然変異: ツノ */
1468         #define MUT2_BEAK                       0x00000100L /*!< 突然変異: クチバシ */
1469         #define MUT2_ATT_DEMON                  0x00000200L /*!< 突然変異: デーモンを引き付ける */
1470         #define MUT2_PROD_MANA                  0x00000400L /*!< 突然変異: 制御できない魔力のエネルギー */
1471         #define MUT2_SPEED_FLUX                 0x00000800L /*!< 突然変異: ランダムな加減速 */
1472         #define MUT2_BANISH_ALL                 0x00001000L /*!< 突然変異: ランダムなモンスター消滅 */
1473         #define MUT2_EAT_LIGHT                  0x00002000L /*!< 突然変異: 光源喰い */
1474         #define MUT2_TRUNK                      0x00004000L /*!< 突然変異: 象の鼻 */
1475         #define MUT2_ATT_ANIMAL                 0x00008000L /*!< 突然変異: 動物を引き寄せる */
1476         #define MUT2_TENTACLES                  0x00010000L /*!< 突然変異: 邪悪な触手 */
1477         #define MUT2_RAW_CHAOS                  0x00020000L /*!< 突然変異: 純カオス */
1478         #define MUT2_NORMALITY                  0x00040000L /*!< 突然変異: ランダムな変異の消滅 */
1479         #define MUT2_WRAITH                     0x00080000L /*!< 突然変異: ランダムな幽体化 */
1480         #define MUT2_POLY_WOUND                 0x00100000L /*!< 突然変異: ランダムな傷の変化 */
1481         #define MUT2_WASTING                    0x00200000L /*!< 突然変異: 衰弱 */
1482         #define MUT2_ATT_DRAGON                 0x00400000L /*!< 突然変異: ドラゴンを引き寄せる */
1483         #define MUT2_WEIRD_MIND                 0x00800000L /*!< 突然変異: ランダムなテレパシー */
1484         #define MUT2_NAUSEA                     0x01000000L /*!< 突然変異: 落ち着きの無い胃 */
1485         #define MUT2_CHAOS_GIFT                 0x02000000L /*!< 突然変異: カオスパトロン */
1486         #define MUT2_WALK_SHAD                  0x04000000L /*!< 突然変異: ランダムな現実変容 */
1487         #define MUT2_WARNING                    0x08000000L /*!< 突然変異: 警告 */
1488         #define MUT2_INVULN                     0x10000000L /*!< 突然変異: ランダムな無敵化 */
1489         #define MUT2_SP_TO_HP                   0x20000000L /*!< 突然変異: ランダムなMPからHPへの変換 */
1490         #define MUT2_HP_TO_SP                   0x40000000L /*!< 突然変異: ランダムなHPからMPへの変換 */
1491         #define MUT2_DISARM                     0x80000000L /*!< 突然変異: ランダムな武器落とし */
1492
1493         BIT_FLAGS muta3; /*!< 常時効果つきの変異2 / Other mutations will be mainly in MUT3_* */
1494         #define MUT3_HYPER_STR                  0x00000001L /*!< 突然変異: 超人的な力 */
1495         #define MUT3_PUNY                       0x00000002L /*!< 突然変異: 虚弱 */
1496         #define MUT3_HYPER_INT                  0x00000004L /*!< 突然変異: 生体コンピュータ */
1497         #define MUT3_MORONIC                    0x00000008L /*!< 突然変異: 精神薄弱 */
1498         #define MUT3_RESILIENT                  0x00000010L /*!< 突然変異: 弾力のある体 */
1499         #define MUT3_XTRA_FAT                   0x00000020L /*!< 突然変異: 異常な肥満 */
1500         #define MUT3_ALBINO                     0x00000040L /*!< 突然変異: アルビノ */
1501         #define MUT3_FLESH_ROT                  0x00000080L /*!< 突然変異: 腐敗した肉体 */
1502         #define MUT3_SILLY_VOI                  0x00000100L /*!< 突然変異: 間抜けなキーキー声 */
1503         #define MUT3_BLANK_FAC                  0x00000200L /*!< 突然変異: のっぺらぼう */
1504         #define MUT3_ILL_NORM                   0x00000400L /*!< 突然変異: 幻影に覆われた体 */
1505         #define MUT3_XTRA_EYES                  0x00000800L /*!< 突然変異: 第三の目 */
1506         #define MUT3_MAGIC_RES                  0x00001000L /*!< 突然変異: 魔法防御 */
1507         #define MUT3_XTRA_NOIS                  0x00002000L /*!< 突然変異: 騒音 */
1508         #define MUT3_INFRAVIS                   0x00004000L /*!< 突然変異: 赤外線視力 */
1509         #define MUT3_XTRA_LEGS                  0x00008000L /*!< 突然変異: 追加の脚 */
1510         #define MUT3_SHORT_LEG                  0x00010000L /*!< 突然変異: 短い脚 */
1511         #define MUT3_ELEC_TOUC                  0x00020000L /*!< 突然変異: 電撃オーラ */
1512         #define MUT3_FIRE_BODY                  0x00040000L /*!< 突然変異: 火炎オーラ */
1513         #define MUT3_WART_SKIN                  0x00080000L /*!< 突然変異: イボ肌 */
1514         #define MUT3_SCALES                     0x00100000L /*!< 突然変異: 鱗肌 */
1515         #define MUT3_IRON_SKIN                  0x00200000L /*!< 突然変異: 鉄の肌 */
1516         #define MUT3_WINGS                      0x00400000L /*!< 突然変異: 翼 */
1517         #define MUT3_FEARLESS                   0x00800000L /*!< 突然変異: 恐れ知らず */
1518         #define MUT3_REGEN                      0x01000000L /*!< 突然変異: 急回復 */
1519         #define MUT3_ESP                        0x02000000L /*!< 突然変異: テレパシー */
1520         #define MUT3_LIMBER                     0x04000000L /*!< 突然変異: しなやかな肉体 */
1521         #define MUT3_ARTHRITIS                  0x08000000L /*!< 突然変異: 関節の痛み */
1522         #define MUT3_BAD_LUCK                   0x10000000L /*!< 突然変異: 黒いオーラ(不運) */
1523         #define MUT3_VULN_ELEM                  0x20000000L /*!< 突然変異: 元素攻撃弱点 */
1524         #define MUT3_MOTION                     0x40000000L /*!< 突然変異: 正確で力強い動作 */
1525         #define MUT3_GOOD_LUCK                  0x80000000L /*!< 突然変異: 白いオーラ(幸運) */
1526
1527         s16b virtues[8];
1528         s16b vir_types[8];
1529
1530         TIME_EFFECT word_recall;          /* Word of recall counter */
1531         TIME_EFFECT alter_reality;        /* Alter reality counter */
1532         DUNGEON_IDX recall_dungeon;      /* Dungeon set to be recalled */
1533
1534         ENERGY energy_need;       /* Energy needed for next move */
1535         ENERGY enchant_energy_need;       /* Energy needed for next upkeep effect        */
1536
1537         FEED food;                /* Current nutrition */
1538
1539         /*
1540          * p_ptr->special_attackによるプレイヤーの攻撃状態の定義 / Bit flags for the "p_ptr->special_attack" variable. -LM-
1541          *
1542          * Note:  The elemental and poison attacks should be managed using the
1543          * function "set_ele_attack", in spell2.c.  This provides for timeouts and
1544          * prevents the player from getting more than one at a time.
1545          */
1546         BIT_FLAGS special_attack;
1547         #define ATTACK_CONFUSE  0x00000001 /*!< プレイヤーのステータス:混乱打撃 */
1548         #define ATTACK_XXX1             0x00000002 /*!< プレイヤーのステータス:未使用1 */
1549         #define ATTACK_XXX2             0x00000004 /*!< プレイヤーのステータス:未使用2 */
1550         #define ATTACK_XXX3         0x00000008 /*!< プレイヤーのステータス:未使用3 */
1551         #define ATTACK_ACID             0x00000010 /*!< プレイヤーのステータス:魔法剣/溶解 */
1552         #define ATTACK_ELEC             0x00000020 /*!< プレイヤーのステータス:魔法剣/電撃 */
1553         #define ATTACK_FIRE             0x00000040 /*!< プレイヤーのステータス:魔法剣/火炎 */
1554         #define ATTACK_COLD             0x00000080 /*!< プレイヤーのステータス:魔法剣/冷凍 */
1555         #define ATTACK_POIS             0x00000100 /*!< プレイヤーのステータス:魔法剣/毒殺 */
1556         #define ATTACK_HOLY             0x00000200 /*!< プレイヤーのステータス:対邪?(未使用) */
1557         #define ATTACK_SUIKEN   0x00000400 /*!< プレイヤーのステータス:酔拳 */
1558
1559         /*
1560          * p_ptr->special_defenseによるプレイヤーの防御状態の定義 / Bit flags for the "p_ptr->special_defense" variable. -LM-
1561          */
1562         BIT_FLAGS special_defense;
1563         #define DEFENSE_ACID    0x00000001 /*!< プレイヤーのステータス:酸免疫 */
1564         #define DEFENSE_ELEC    0x00000002 /*!< プレイヤーのステータス:電撃免疫 */
1565         #define DEFENSE_FIRE    0x00000004 /*!< プレイヤーのステータス:火炎免疫 */
1566         #define DEFENSE_COLD    0x00000008 /*!< プレイヤーのステータス:冷気免疫 */
1567         #define DEFENSE_POIS    0x00000010 /*!< プレイヤーのステータス:毒免疫 */
1568         #define KAMAE_GENBU     0x00000020 /*!< プレイヤーのステータス:玄武の構え */
1569         #define KAMAE_BYAKKO    0x00000040 /*!< プレイヤーのステータス:白虎の構え */
1570         #define KAMAE_SEIRYU    0x00000080 /*!< プレイヤーのステータス:青竜の構え */
1571         #define KAMAE_SUZAKU    0x00000100 /*!< プレイヤーのステータス:朱雀の構え */
1572         #define KATA_IAI        0x00000200 /*!< プレイヤーのステータス:居合 */
1573         #define KATA_FUUJIN     0x00000400 /*!< プレイヤーのステータス:風塵 */
1574         #define KATA_KOUKIJIN   0x00000800 /*!< プレイヤーのステータス:降鬼陣 */
1575         #define KATA_MUSOU      0x00001000 /*!< プレイヤーのステータス:無想 */
1576         #define NINJA_KAWARIMI  0x00002000 /*!< プレイヤーのステータス:変わり身 */
1577         #define NINJA_S_STEALTH 0x00004000 /*!< プレイヤーのステータス:超隠密 */
1578         #define MAX_KAMAE 4 /*!< 修行僧の構え最大数 */
1579         #define KAMAE_MASK (KAMAE_GENBU | KAMAE_BYAKKO | KAMAE_SEIRYU | KAMAE_SUZAKU) /*!< 修行僧の構えビット配列 */
1580         #define MAX_KATA 4 /*!< 修行僧の型最大数 */
1581         #define KATA_MASK (KATA_IAI | KATA_FUUJIN | KATA_KOUKIJIN | KATA_MUSOU) /*!< 修行僧の型ビット配列 */
1582
1583         ACTION_IDX action;                /* Currently action */
1584         #define ACTION_NONE     0 /*!< 持続行動: なし */
1585         #define ACTION_SEARCH   1 /*!< 持続行動: 探索 */
1586         #define ACTION_REST     2 /*!< 持続行動: 休憩 */
1587         #define ACTION_LEARN    3 /*!< 持続行動: 青魔法ラーニング */
1588         #define ACTION_FISH     4 /*!< 持続行動: 釣り */
1589         #define ACTION_KAMAE    5 /*!< 持続行動: 修行僧の構え */
1590         #define ACTION_KATA     6 /*!< 持続行動: 剣術家の型 */
1591         #define ACTION_SING     7 /*!< 持続行動: 歌 */
1592         #define ACTION_HAYAGAKE 8 /*!< 持続行動: 早駆け */
1593         #define ACTION_SPELL    9 /*!< 持続行動: 呪術 */
1594
1595         BIT_FLAGS spell_learned1;         /* bit mask of spells learned */
1596         BIT_FLAGS spell_learned2;         /* bit mask of spells learned */
1597         BIT_FLAGS spell_worked1;          /* bit mask of spells tried and worked */
1598         BIT_FLAGS spell_worked2;          /* bit mask of spells tried and worked */
1599         BIT_FLAGS spell_forgotten1;       /* bit mask of spells learned but forgotten */
1600         BIT_FLAGS spell_forgotten2;       /* bit mask of spells learned but forgotten */
1601         SPELL_IDX spell_order[64];  /* order spells learned/remembered/forgotten */
1602
1603         SUB_EXP spell_exp[64];        /* Proficiency of spells */
1604         SUB_EXP weapon_exp[5][64];    /* Proficiency of weapons */
1605         SUB_EXP skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */
1606
1607         MAGIC_NUM1 magic_num1[108];     /*!< Array for non-spellbook type magic */
1608         MAGIC_NUM2 magic_num2[108];     /*!< 魔道具術師の取り込み済魔道具使用回数 / Flags for non-spellbook type magics */
1609
1610         SPELL_IDX mane_spell[MAX_MANE];
1611         HIT_POINT mane_dam[MAX_MANE];
1612         s16b mane_num;
1613
1614         s16b concent;      /* Sniper's concentration level */
1615
1616         HIT_POINT player_hp[PY_MAX_LEVEL];
1617         char died_from[80];       /* What killed the player */
1618         concptr last_message;        /* Last message on death or retirement */
1619         char history[4][60];      /* Textual "history" for the Player */
1620
1621         u16b total_winner;        /* Total winner */
1622         u16b panic_save;          /* Panic save */
1623
1624         u16b noscore;             /* Cheating flags */
1625
1626         bool wait_report_score;   /* Waiting to report score */
1627         bool is_dead;             /* Player is dead */
1628         bool now_damaged;
1629         bool ambush_flag;
1630
1631         bool wizard;              /* Player is in wizard mode */
1632
1633         MONSTER_IDX riding;              /* Riding on a monster of this index */
1634         byte knowledge;           /* Knowledge about yourself */
1635         BIT_FLAGS visit;               /* Visited towns */
1636
1637         RACE_IDX start_race;          /* Race at birth */
1638         BIT_FLAGS old_race1;           /* Record of race changes */
1639         BIT_FLAGS old_race2;           /* Record of race changes */
1640         s16b old_realm;           /* Record of realm changes */
1641
1642         s16b pet_follow_distance; /* Length of the imaginary "leash" for pets */
1643         s16b pet_extra_flags;     /* Various flags for controling pets */
1644
1645         s16b today_mon;           /* Wanted monster */
1646
1647         bool dtrap;               /* Whether you are on trap-safe grids */
1648         FLOOR_IDX floor_id;            /* Current floor location */ 
1649
1650         bool autopick_autoregister; /* auto register is in-use or not */
1651
1652         byte feeling;           /* Most recent dungeon feeling */
1653         s32b feeling_turn;      /* The current_world_ptr->game_turn of the last dungeon feeling */
1654
1655
1656         /*** Temporary fields ***/
1657
1658         bool playing;                   /* True if player is playing */
1659         bool leaving;                   /* True if player is leaving */
1660
1661         byte exit_bldg;                 /* Goal obtained in arena? -KMW- */
1662
1663         bool leaving_dungeon;   /* True if player is leaving the dungeon */
1664         bool teleport_town;
1665         bool enter_dungeon;     /* Just enter the dungeon */
1666
1667         IDX health_who; /* Health bar trackee */
1668
1669         MONRACE_IDX monster_race_idx;   /* Monster race trackee */
1670
1671         KIND_OBJECT_IDX object_kind_idx;        /* Object kind trackee */
1672
1673         s16b new_spells;        /* Number of spells available */
1674         s16b old_spells;
1675
1676         s16b old_food_aux;      /* Old value of food */
1677
1678         bool old_cumber_armor;
1679         bool old_cumber_glove;
1680         bool old_heavy_wield[2];
1681         bool old_heavy_shoot;
1682         bool old_icky_wield[2];
1683         bool old_riding_wield[2];
1684         bool old_riding_ryoute;
1685         bool old_monlite;
1686
1687         POSITION old_lite;              /* Old radius of lite (if any) */
1688
1689         bool cumber_armor;      /* Mana draining armor */
1690         bool cumber_glove;      /* Mana draining gloves */
1691         bool heavy_wield[2];    /* Heavy weapon */
1692         bool heavy_shoot;       /* Heavy shooter */
1693         bool icky_wield[2];     /* Icky weapon */
1694         bool riding_wield[2];   /* Riding weapon */
1695         bool riding_ryoute;     /* Riding weapon */
1696         bool monlite;
1697
1698         POSITION cur_lite;              /* Radius of lite (if any) */
1699
1700         BIT_FLAGS update;       /* Pending Updates */
1701                 #define PU_BONUS        0x00000001L     /*!< ステータス更新フラグ: 能力値修正 / Calculate bonuses */
1702                 #define PU_TORCH        0x00000002L     /*!< ステータス更新フラグ: 光源半径 / Calculate torch radius */
1703                 #define PU_HP           0x00000010L     /*!< ステータス更新フラグ: HP / Calculate chp and mhp */
1704                 #define PU_MANA         0x00000020L     /*!< ステータス更新フラグ: MP / Calculate csp and msp */
1705                 #define PU_SPELLS       0x00000040L     /*!< ステータス更新フラグ: 魔法学習数 / Calculate spells */
1706                 #define PU_COMBINE      0x00000100L     /*!< アイテム処理フラグ: アイテムの結合を要する / Combine the pack */
1707                 #define PU_REORDER      0x00000200L     /*!< アイテム処理フラグ: アイテムの並び替えを要する / Reorder the pack */
1708                 #define PU_AUTODESTROY  0x00000400L     /*!< アイテム処理フラグ: アイテムの自動破壊を要する / Auto-destroy marked item */
1709                 #define PU_UN_VIEW      0x00010000L     /*!< ステータス更新フラグ: 地形の視界外化 / Forget view */
1710                 #define PU_UN_LITE      0x00020000L     /*!< ステータス更新フラグ: 明暗範囲の視界外化 / Forget lite */
1711                 #define PU_VIEW         0x00100000L     /*!< ステータス更新フラグ: 視界 / Update view */
1712                 #define PU_LITE         0x00200000L     /*!< ステータス更新フラグ: 明暗範囲 / Update lite */
1713                 #define PU_MON_LITE     0x00400000L     /*!< ステータス更新フラグ: モンスターの光源範囲 / Monster illumination */
1714                 #define PU_DELAY_VIS    0x00800000L     /*!< ステータス更新フラグ: 視界の追加更新 / Mega-Hack -- Delayed visual update */
1715                 #define PU_MONSTERS     0x01000000L     /*!< ステータス更新フラグ: モンスターのステータス / Update monsters */
1716                 #define PU_DISTANCE     0x02000000L     /*!< ステータス更新フラグ: プレイヤーとモンスターの距離 / Update distances */
1717                 #define PU_FLOW         0x10000000L     /*!< ステータス更新フラグ: プレイヤーから各マスへの到達距離 / Update flow */
1718
1719         BIT_FLAGS redraw;       /* Normal Redraws */
1720         BIT_FLAGS window;       /* Window Redraws */
1721
1722         s16b stat_use[A_MAX];   /* Current modified stats */
1723         s16b stat_top[A_MAX];   /* Maximal modified stats */
1724
1725         bool sutemi;
1726         bool counter;
1727
1728         ALIGNMENT align; /* Good/evil/neutral */
1729         POSITION run_py;
1730         POSITION run_px;
1731         DIRECTION fishing_dir;
1732
1733
1734         /*** Extracted fields ***/
1735
1736         WEIGHT total_weight;    /*!< 所持品と装備品の計算総重量 / Total weight being carried */
1737
1738         s16b stat_add[A_MAX];   /* Modifiers to stat values */
1739         s16b stat_ind[A_MAX];   /* Indexes into stat tables */
1740
1741         bool immune_acid;       /* Immunity to acid */
1742         bool immune_elec;       /* Immunity to lightning */
1743         bool immune_fire;       /* Immunity to fire */
1744         bool immune_cold;       /* Immunity to cold */
1745
1746         bool resist_acid;       /* Resist acid */
1747         bool resist_elec;       /* Resist lightning */
1748         bool resist_fire;       /* Resist fire */
1749         bool resist_cold;       /* Resist cold */
1750         bool resist_pois;       /* Resist poison */
1751
1752         bool resist_conf;       /* Resist confusion */
1753         bool resist_sound;      /* Resist sound */
1754         bool resist_lite;       /* Resist light */
1755         bool resist_dark;       /* Resist darkness */
1756         bool resist_chaos;      /* Resist chaos */
1757         bool resist_disen;      /* Resist disenchant */
1758         bool resist_shard;      /* Resist shards */
1759         bool resist_nexus;      /* Resist nexus */
1760         bool resist_blind;      /* Resist blindness */
1761         bool resist_neth;       /* Resist nether */
1762         bool resist_fear;       /* Resist fear */
1763         bool resist_time;       /* Resist time */
1764         bool resist_water;      /* Resist water */
1765
1766         bool reflect;       /* Reflect 'bolt' attacks */
1767         bool sh_fire;       /* Fiery 'immolation' effect */
1768         bool sh_elec;       /* Electric 'immolation' effect */
1769         bool sh_cold;       /* Cold 'immolation' effect */
1770
1771         bool anti_magic;    /* Anti-magic */
1772         bool anti_tele;     /* Prevent teleportation */
1773
1774         bool sustain_str;       /* Keep strength */
1775         bool sustain_int;       /* Keep intelligence */
1776         bool sustain_wis;       /* Keep wisdom */
1777         bool sustain_dex;       /* Keep dexterity */
1778         bool sustain_con;       /* Keep constitution */
1779         bool sustain_chr;       /* Keep charisma */
1780
1781         BIT_FLAGS cursed;       /* Player is cursed */
1782
1783         bool can_swim;          /* No damage falling */
1784         bool levitation;                /* No damage falling */
1785         bool lite;              /* Permanent light */
1786         bool free_act;          /* Never paralyzed */
1787         bool see_inv;           /* Can see invisible */
1788         bool regenerate;        /* Regenerate hit pts */
1789         bool hold_exp;          /* Resist exp draining */
1790
1791         bool telepathy;         /* Telepathy */
1792         bool esp_animal;
1793         bool esp_undead;
1794         bool esp_demon;
1795         bool esp_orc;
1796         bool esp_troll;
1797         bool esp_giant;
1798         bool esp_dragon;
1799         bool esp_human;
1800         bool esp_evil;
1801         bool esp_good;
1802         bool esp_nonliving;
1803         bool esp_unique;
1804
1805         bool slow_digest;       /* Slower digestion */
1806         bool bless_blade;       /* Blessed blade */
1807         bool xtra_might;        /* Extra might bow */
1808         bool impact[2];         /* Earthquake blows */
1809         bool pass_wall;     /* Permanent wraithform */
1810         bool kill_wall;
1811         bool dec_mana;
1812         bool easy_spell;
1813         bool heavy_spell;
1814         bool warning;
1815         bool mighty_throw;
1816         bool see_nocto;         /* Noctovision */
1817
1818         DICE_NUMBER to_dd[2]; /* Extra dice/sides */
1819         DICE_SID to_ds[2];
1820
1821         HIT_PROB dis_to_h[2];   /*!< 判明している現在の表記上の近接武器命中修正値 /  Known bonus to hit (wield) */
1822         HIT_PROB dis_to_h_b;    /*!< 判明している現在の表記上の射撃武器命中修正値 / Known bonus to hit (bow) */
1823         HIT_POINT dis_to_d[2];  /*!< 判明している現在の表記上の近接武器ダメージ修正値 / Known bonus to dam (wield) */
1824         ARMOUR_CLASS dis_to_a;  /*!< 判明している現在の表記上の装備AC修正値 / Known bonus to ac */
1825         ARMOUR_CLASS dis_ac;    /*!< 判明している現在の表記上の装備AC基礎値 / Known base ac */
1826
1827         s16b to_h[2];           /* Bonus to hit (wield) */
1828         s16b to_h_b;            /* Bonus to hit (bow) */
1829         s16b to_h_m;            /* Bonus to hit (misc) */
1830         s16b to_d[2];           /* Bonus to dam (wield) */
1831         s16b to_d_m;            /* Bonus to dam (misc) */
1832         s16b to_a;                      /* Bonus to ac */
1833
1834         s16b to_m_chance;               /* Minusses to cast chance */
1835
1836         bool ryoute;
1837         bool migite;
1838         bool hidarite;
1839         bool no_flowed;
1840
1841         ARMOUR_CLASS ac;        /*!< 装備無しの基本AC / Base ac */
1842
1843         ACTION_SKILL_POWER see_infra;   /*!< 赤外線視能力の強さ /Infravision range */
1844         ACTION_SKILL_POWER skill_dis;   /*!< 行動技能値:解除能力 / Skill: Disarming */
1845         ACTION_SKILL_POWER skill_dev;   /*!< 行動技能値:魔道具使用 / Skill: Magic Devices */
1846         ACTION_SKILL_POWER skill_sav;   /*!< 行動技能値:魔法防御 / Skill: Saving throw */
1847         ACTION_SKILL_POWER skill_stl;   /*!< 行動技能値:隠密 / Skill: Stealth factor */
1848
1849         /*! 
1850          * 行動技能値:知覚 / Skill: Searching ability
1851          * この値はsearch()による地形の隠し要素発見処理などで混乱、盲目、幻覚、無光源などの
1852          * 状態異常がない限り、難易度修正などがないままそのままパーセンテージ値として使われる。
1853          * 100以上ならば必ず全てのトラップなどを見つけることが出来る。
1854          */
1855         ACTION_SKILL_POWER skill_srh;
1856
1857         ACTION_SKILL_POWER skill_fos;   /*!< 行動技能値:探索 / Skill: Searching frequency */
1858         ACTION_SKILL_POWER skill_thn;   /*!< 行動技能値:打撃命中能力 / Skill: To hit (normal) */
1859         ACTION_SKILL_POWER skill_thb;   /*!< 行動技能値:射撃命中能力 / Skill: To hit (shooting) */
1860         ACTION_SKILL_POWER skill_tht;   /*!< 行動技能値:投射命中能力 / Skill: To hit (throwing) */
1861         ACTION_SKILL_POWER skill_dig;   /*!< 行動技能値:掘削 / Skill: Digging */
1862
1863         s16b num_blow[2];       /* Number of blows */
1864         s16b num_fire;          /* Number of shots */
1865
1866         byte tval_xtra;         /* Correct xtra tval */
1867         byte tval_ammo;         /* Correct ammo tval */
1868
1869         byte pspeed;            /* Current speed */
1870
1871         ENERGY energy_use;      /* Energy use this current_world_ptr->game_turn */
1872
1873         POSITION y;     /* Player location in dungeon */
1874         POSITION x;     /* Player location in dungeon */
1875         GAME_TEXT name[32]; /*!< 現在のプレイヤー名 / Current player's character name */
1876 };
1877
1878
1879 /*
1880  * A structure to hold "rolled" information
1881  */
1882 typedef struct birther birther;
1883
1884 struct birther
1885 {
1886         SEX_IDX psex;           /* Sex index */
1887         RACE_IDX prace;         /* Race index */
1888         CLASS_IDX pclass;       /* Class index */
1889         CHARACTER_IDX pseikaku; /* Seikaku index */
1890         REALM_IDX realm1;       /* First magic realm */
1891         REALM_IDX realm2;       /* Second magic realm */
1892
1893         s16b age;
1894         s16b ht;
1895         s16b wt;
1896         s16b sc;
1897
1898         PRICE au; /*!< 初期の所持金 */
1899
1900         BASE_STATUS stat_max[6];        /* Current "maximal" stat values */
1901         BASE_STATUS stat_max_max[6];    /* Maximal "maximal" stat values */
1902         HIT_POINT player_hp[PY_MAX_LEVEL];
1903
1904         PATRON_IDX chaos_patron;
1905
1906         s16b vir_types[8];
1907
1908         char history[4][60];
1909
1910         bool quick_ok;
1911 };
1912
1913
1914 /* For Monk martial arts */
1915
1916 typedef struct martial_arts martial_arts;
1917
1918 struct martial_arts
1919 {
1920         concptr desc;       /* A verbose attack description */
1921         PLAYER_LEVEL min_level;  /* Minimum level to use */
1922         int chance;     /* Chance of 'success' */
1923         int dd;         /* Damage dice */
1924         int ds;         /* Damage sides */
1925         int effect;     /* Special effects */
1926 };
1927
1928 typedef struct kamae kamae;
1929
1930 struct kamae
1931 {
1932         concptr desc;       /* A verbose kamae description */
1933         PLAYER_LEVEL min_level;  /* Minimum level to use */
1934         concptr info;
1935 };
1936
1937 /* Mindcrafters */
1938 typedef struct mind_type mind_type;
1939 struct mind_type
1940 {
1941         PLAYER_LEVEL min_lev;
1942         MANA_POINT mana_cost;
1943         PERCENTAGE fail;
1944         concptr name;
1945 };
1946
1947 typedef struct mind_power mind_power;
1948 struct mind_power
1949 {
1950         mind_type info[MAX_MIND_POWERS];
1951 };
1952
1953 /* Imitator */
1954
1955 typedef struct monster_power monster_power;
1956 struct monster_power
1957 {
1958         PLAYER_LEVEL level;
1959         MANA_POINT smana;
1960         PERCENTAGE fail;
1961         int     manedam;
1962         int     manefail;
1963         int     use_stat;
1964         concptr    name;
1965 };
1966
1967
1968 /*
1969  * A structure to describe a building.
1970  * From Kamband
1971  */
1972 typedef struct building_type building_type;
1973
1974 struct building_type
1975 {
1976         GAME_TEXT name[20];                  /* proprietor name */
1977         GAME_TEXT owner_name[20];            /* proprietor name */
1978         GAME_TEXT owner_race[20];            /* proprietor race */
1979
1980         GAME_TEXT act_names[8][30];          /* action names */
1981         PRICE member_costs[8];           /* Costs for class members of building */
1982         PRICE other_costs[8];               /* Costs for nonguild members */
1983         char letters[8];                /* action letters */
1984         BACT_IDX actions[8];                /* action codes */
1985         BACT_RESTRICT_IDX action_restr[8];           /* action restrictions */
1986
1987         CLASS_IDX member_class[MAX_CLASS];   /* which classes are part of guild */
1988         RACE_IDX member_race[MAX_RACES];    /* which classes are part of guild */
1989         REALM_IDX member_realm[MAX_MAGIC+1]; /* which realms are part of guild */
1990 };
1991
1992
1993 /* Border */
1994 typedef struct border_type border_type;
1995 struct border_type
1996 {
1997         s16b north[MAX_WID];
1998         s16b south[MAX_WID];
1999         s16b east[MAX_HGT];
2000         s16b west[MAX_HGT];
2001         s16b north_west;
2002         s16b north_east;
2003         s16b south_west;
2004         s16b south_east;
2005 };
2006
2007 /*
2008  * A structure describing a town with
2009  * stores and buildings
2010  */
2011 typedef struct town_type town_type;
2012 struct town_type
2013 {
2014         GAME_TEXT name[32];
2015         u32b seed;      /* Seed for RNG */
2016         store_type *store;    /* The stores [MAX_STORES] */
2017         byte numstores;
2018 };
2019
2020 /*
2021  * Sort-array element
2022  */
2023 typedef struct tag_type tag_type;
2024
2025 struct tag_type
2026 {
2027         int tag;
2028         int index;
2029 };
2030
2031 typedef bool (*monsterrace_hook_type)(MONRACE_IDX r_idx);
2032
2033
2034 /*
2035  * This seems like a pretty standard "typedef"
2036  */
2037 typedef int (*inven_func)(object_type *);
2038
2039
2040 /*
2041  * Semi-Portable High Score List Entry (128 bytes) -- BEN
2042  *
2043  * All fields listed below are null terminated ascii strings.
2044  *
2045  * In addition, the "number" fields are right justified, and
2046  * space padded, to the full available length (minus the "null").
2047  *
2048  * Note that "string comparisons" are thus valid on "pts".
2049  */
2050
2051 typedef struct high_score high_score;
2052
2053 struct high_score
2054 {
2055         GAME_TEXT what[8];              /* Version info (string) */
2056         GAME_TEXT pts[10];              /* Total Score (number) */
2057         GAME_TEXT gold[10];             /* Total Gold (number) */
2058         GAME_TEXT turns[10];            /* Turns Taken (number) */
2059         GAME_TEXT day[10];              /* Time stamp (string) */
2060         GAME_TEXT who[16];              /* Player Name (string) */
2061         GAME_TEXT uid[8];               /* Player UID (number) */
2062         GAME_TEXT sex[2];               /* Player Sex (string) */
2063         GAME_TEXT p_r[3];               /* Player Race (number) */
2064         GAME_TEXT p_c[3];               /* Player Class (number) */
2065         GAME_TEXT p_a[3];               /* Player Seikaku (number) */
2066
2067         GAME_TEXT cur_lev[4];           /* Current Player Level (number) */
2068         GAME_TEXT cur_dun[4];           /* Current Dungeon Level (number) */
2069         GAME_TEXT max_lev[4];           /* Max Player Level (number) */
2070         GAME_TEXT max_dun[4];           /* Max Dungeon Level (number) */
2071
2072         GAME_TEXT how[40];              /* Method of death (string) */
2073 };
2074
2075
2076 typedef struct
2077 {
2078         FEAT_IDX feat;    /* Feature tile */
2079         PERCENTAGE percent; /* Chance of type */
2080 }
2081 feat_prob;
2082
2083
2084 /* A structure for the != dungeon types */
2085 typedef struct dungeon_type dungeon_type;
2086 struct dungeon_type {
2087
2088         STR_OFFSET name; /* Name */
2089         STR_OFFSET text; /* Description */
2090
2091         POSITION dy;
2092         POSITION dx;
2093
2094         feat_prob floor[DUNGEON_FEAT_PROB_NUM]; /* Floor probability */
2095         feat_prob fill[DUNGEON_FEAT_PROB_NUM];  /* Cave wall probability */
2096         FEAT_IDX outer_wall;                        /* Outer wall tile */
2097         FEAT_IDX inner_wall;                        /* Inner wall tile */
2098         FEAT_IDX stream1;                           /* stream tile */
2099         FEAT_IDX stream2;                           /* stream tile */
2100
2101         DEPTH mindepth;         /* Minimal depth */
2102         DEPTH maxdepth;         /* Maximal depth */
2103         PLAYER_LEVEL min_plev;         /* Minimal plev needed to enter -- it's an anti-cheating mesure */
2104         BIT_FLAGS16 pit;
2105         BIT_FLAGS16 nest;
2106         BIT_FLAGS8 mode; /* Mode of combinaison of the monster flags */
2107
2108         int min_m_alloc_level;  /* Minimal number of monsters per level */
2109         int max_m_alloc_chance; /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
2110
2111         BIT_FLAGS flags1;               /* Flags 1 */
2112
2113         BIT_FLAGS mflags1;              /* The monster flags that are allowed */
2114         BIT_FLAGS mflags2;
2115         BIT_FLAGS mflags3;
2116         BIT_FLAGS mflags4;
2117         BIT_FLAGS mflags7;
2118         BIT_FLAGS mflags8;
2119         BIT_FLAGS mflags9;
2120         BIT_FLAGS mflagsr;
2121
2122         BIT_FLAGS m_a_ability_flags1;
2123         BIT_FLAGS m_a_ability_flags2;
2124         BIT_FLAGS m_a_ability_flags3;
2125         BIT_FLAGS m_a_ability_flags4;
2126
2127         char r_char[5];         /* Monster race allowed */
2128         KIND_OBJECT_IDX final_object;   /* The object you'll find at the bottom */
2129         ARTIFACT_IDX final_artifact;    /* The artifact you'll find at the bottom */
2130         MONRACE_IDX final_guardian;     /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
2131
2132         PROB special_div;       /* % of monsters affected by the flags/races allowed, to add some variety */
2133         int tunnel_percent;
2134         int obj_great;
2135         int obj_good;
2136 };
2137
2138
2139 /*!
2140  * @struct autopick_type
2141  * @brief 自動拾い/破壊設定データの構造体 / A structure type for entry of auto-picker/destroyer
2142  */
2143 typedef struct {
2144         concptr name;          /*!< 自動拾い/破壊定義の名称一致基準 / Items which have 'name' as part of its name match */
2145         concptr insc;          /*!< 対象となったアイテムに自動で刻む内容 / Items will be auto-inscribed as 'insc' */
2146         BIT_FLAGS flag[2];       /*!< キーワードに関する汎用的な条件フラグ / Misc. keyword to be matched */
2147         byte action;        /*!< 対象のアイテムを拾う/破壊/放置するかの指定フラグ / Auto-pickup or Destroy or Leave items */
2148         byte dice;          /*!< 武器のダイス値基準値 / Weapons which have more than 'dice' dice match */
2149         byte bonus;         /*!< アイテムのボーナス基準値 / Items which have more than 'bonus' magical bonus match */
2150 } autopick_type;
2151
2152
2153 /*
2154  *  A structure type for the saved floor
2155  */
2156 typedef struct 
2157 {
2158         FLOOR_IDX floor_id;        /* No recycle until 65536 IDs are all used */
2159         s16b savefile_id;     /* ID for savefile (from 0 to MAX_SAVED_FLOOR) */
2160         DEPTH dun_level;
2161         s32b last_visit;      /* Time count of last visit. 0 for new floor. */
2162         u32b visit_mark;      /* Older has always smaller mark. */
2163         FLOOR_IDX upper_floor_id;  /* a floor connected with level teleportation */
2164         FLOOR_IDX lower_floor_id;  /* a floor connected with level tel. and trap door */
2165 } saved_floor_type;
2166
2167
2168 /*
2169  *  A structure type for terrain template of saving dungeon floor
2170  */
2171 typedef struct
2172 {
2173         BIT_FLAGS info;
2174         FEAT_IDX feat;
2175         FEAT_IDX mimic;
2176         s16b special;
2177         u16b occurrence;
2178 } cave_template_type;
2179
2180
2181 /*!
2182  * @struct arena_type
2183  * @brief 闘技場のモンスターエントリー構造体 / A structure type for arena entry
2184  */
2185 typedef struct
2186 {
2187         MONRACE_IDX r_idx; /*!< 闘技場のモンスター種族ID(0ならば表彰式) / Monster (0 means victory prizing) */
2188         OBJECT_TYPE_VALUE tval;  /*!< モンスター打倒後に得られるアイテムの大カテゴリID / tval of prize (0 means no prize) */
2189         OBJECT_SUBTYPE_VALUE sval;  /*!< モンスター打倒後に得られるアイテムの小カテゴリID / sval of prize */
2190 } arena_type;
2191
2192
2193
2194
2195 #ifdef TRAVEL
2196 /*
2197  *  A structure type for travel command
2198  */
2199 typedef struct {
2200         int run; /* Remaining grid number */
2201         int cost[MAX_HGT][MAX_WID];
2202         POSITION x; /* Target X */
2203         POSITION y; /* Target Y */
2204         DIRECTION dir; /* Running direction */
2205 } travel_type;
2206 #endif
2207
2208 typedef struct {
2209         concptr flag;
2210         byte index;
2211         byte level;
2212         s32b value;
2213         struct {
2214                 int constant;
2215                 DICE_NUMBER dice;
2216         } timeout;
2217         concptr desc;
2218 } activation_type;
2219
2220 typedef struct {
2221         int flag;
2222         int type;
2223         concptr name;
2224 } dragonbreath_type;
2225
2226 typedef struct {
2227         grid_type *grid_array[MAX_HGT];
2228         DEPTH dun_level;                /*!< 現在の実ダンジョン階層base_levelの参照元となる / Current dungeon level */
2229         DEPTH base_level;               /*!< 基本生成レベル、後述のobject_level, monster_levelの参照元となる / Base dungeon level */
2230         DEPTH object_level;             /*!< アイテムの生成レベル、current_floor_ptr->base_levelを起点に一時変更する時に参照 / Current object creation level */
2231         DEPTH monster_level;    /*!< モンスターの生成レベル、current_floor_ptr->base_levelを起点に一時変更する時に参照 / Current monster creation level */
2232         POSITION width;                 /* Current dungeon width */
2233         POSITION height;                /* Current dungeon height */
2234         MONSTER_NUMBER num_repro; /*!< Current reproducer count */
2235
2236         GAME_TURN generated_turn; /* Turn when level began */
2237
2238         object_type *o_list; /*!< The array of dungeon items [current_floor_ptr->max_o_idx] */
2239         OBJECT_IDX max_o_idx; /*!< Maximum number of objects in the level */
2240
2241         monster_type *m_list; /*!< The array of dungeon monsters [current_floor_ptr->max_m_idx] */
2242         MONSTER_IDX max_m_idx; /*!< Maximum number of monsters in the level */
2243
2244         s16b *mproc_list[MAX_MTIMED]; /*!< The array to process dungeon monsters[max_m_idx] */
2245         s16b mproc_max[MAX_MTIMED]; /*!< Number of monsters to be processed */
2246
2247         POSITION_IDX lite_n; //!< Array of grids lit by player lite (see "current_floor_ptr->grid_array.c")
2248         POSITION lite_y[LITE_MAX];
2249         POSITION lite_x[LITE_MAX];
2250
2251         POSITION_IDX mon_lite_n; //!< Array of grids lit by player lite (see "current_floor_ptr->grid_array.c")
2252         POSITION mon_lite_y[MON_LITE_MAX];
2253         POSITION mon_lite_x[MON_LITE_MAX];
2254
2255         POSITION_IDX view_n; //!< Array of grids viewable to the player (see "grid_array")
2256         POSITION view_y[VIEW_MAX];
2257         POSITION view_x[VIEW_MAX];
2258
2259         POSITION_IDX redraw_n; //!< Array of grids for delayed visual updating (see "current_floor_ptr->grid_array.c")
2260         POSITION redraw_y[REDRAW_MAX];
2261         POSITION redraw_x[REDRAW_MAX];
2262
2263 } floor_type;
2264
2265 typedef struct {
2266         POSITION max_wild_x; /*!< Maximum size of the wilderness */
2267         POSITION max_wild_y; /*!< Maximum size of the wilderness */
2268         GAME_TURN game_turn;                    /*!< 画面表示上のゲーム時間基準となるターン / Current game turn */
2269         GAME_TURN game_turn_limit;              /*!< game_turnの最大値 / Limit of game_turn */
2270         GAME_TURN dungeon_turn;                 /*!< NASTY生成の計算に関わる内部ターン値 / Game current_world_ptr->game_turn in dungeon */
2271         GAME_TURN dungeon_turn_limit;   /*!< dungeon_turnの最大値 / Limit of game_turn in dungeon */
2272         MONSTER_IDX timewalk_m_idx;     /*!< 現在時間停止を行っているモンスターのID */
2273
2274         MONRACE_IDX bounty_r_idx[MAX_KUBI];
2275
2276         u32b play_time; /*!< 実プレイ時間 */
2277 } world_type;