OSDN Git Service

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