OSDN Git Service

[Refactor] #37353 owner_type 構造体を store.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 "object.h"
51
52 //#include "player-skill.h"
53
54
55 /*
56  * Information about "ego-items".
57  */
58
59 typedef struct ego_item_type ego_item_type;
60
61 struct ego_item_type
62 {
63         STR_OFFSET name;                        /* Name (offset) */
64         STR_OFFSET text;                        /* Text (offset) */
65
66         INVENTORY_IDX slot;             /*!< 装備部位 / Standard slot value */
67         PRICE rating;           /*!< ベースアイテムからの価値加速 / Rating boost */
68
69         DEPTH level;                    /* Minimum level */
70         RARITY rarity;          /* Object rarity */
71
72         HIT_PROB max_to_h;              /* Maximum to-hit bonus */
73         HIT_POINT max_to_d;             /* Maximum to-dam bonus */
74         ARMOUR_CLASS max_to_a;          /* Maximum to-ac bonus */
75
76         PARAMETER_VALUE max_pval;               /* Maximum pval */
77
78         PRICE cost;                     /* Ego-item "cost" */
79
80         BIT_FLAGS flags[TR_FLAG_SIZE];  /* Ego-Item Flags */
81         BIT_FLAGS gen_flags;            /* flags for generate */
82
83         IDX act_idx;            /* Activative ability index */
84 };
85
86
87
88
89 /*
90  * Monster blow structure
91  *
92  *      - Method (RBM_*)
93  *      - Effect (RBE_*)
94  *      - Damage Dice
95  *      - Damage Sides
96  */
97
98 typedef struct monster_blow monster_blow;
99
100 struct monster_blow
101 {
102         BLOW_METHOD method;
103         BLOW_EFFECT effect;
104         DICE_NUMBER d_dice;
105         DICE_SID d_side;
106 };
107
108
109 typedef struct mbe_info_type mbe_info_type;
110
111 struct mbe_info_type
112 {
113         int power;        /* The attack "power" */
114         int explode_type; /* Explosion effect */
115 };
116
117
118 /*
119  * An entry for the object/monster allocation functions
120  *
121  * Pass 1 is determined from allocation information
122  * Pass 2 is determined from allocation restriction
123  * Pass 3 is determined from allocation calculation
124  */
125
126 typedef struct alloc_entry alloc_entry;
127
128 struct alloc_entry
129 {
130         KIND_OBJECT_IDX index;          /* The actual index */
131
132         DEPTH level;            /* Base dungeon level */
133         PROB prob1;             /* Probability, pass 1 */
134         PROB prob2;             /* Probability, pass 2 */
135         PROB prob3;             /* Probability, pass 3 */
136
137         u16b total;             /* Unused for now */
138 };
139
140
141
142 /*
143  * A store, with an owner, various state flags, a current stock
144  * of items, and a table of items that are often purchased.
145  */
146 typedef struct store_type store_type;
147
148 struct store_type
149 {
150         byte type;                              /* Store type */
151
152         byte owner;                             /* Owner index */
153         byte extra;                             /* Unused for now */
154
155         s16b insult_cur;                /* Insult counter */
156
157         s16b good_buy;                  /* Number of "good" buys */
158         s16b bad_buy;                   /* Number of "bad" buys */
159
160         s32b store_open;                /* Closed until this current_world_ptr->game_turn */
161
162         s32b last_visit;                /* Last visited on this current_world_ptr->game_turn */
163
164         s16b table_num;                 /* Table -- Number of entries */
165         s16b table_size;                /* Table -- Total Size of Array */
166         s16b *table;                    /* Table -- Legal item kinds */
167
168         s16b stock_num;                 /* Stock -- Number of entries */
169         s16b stock_size;                /* Stock -- Total Size of Array */
170         object_type *stock;             /* Stock -- Actual stock items */
171 };
172
173
174 /*
175  * The "name" of spell 'N' is stored as spell_names[X][N],
176  * where X is 0 for mage-spells and 1 for priest-spells.
177  */
178 typedef struct magic_type magic_type;
179
180 struct magic_type
181 {
182         PLAYER_LEVEL slevel;    /* Required level (to learn) */
183         MANA_POINT smana;               /* Required mana (to cast) */
184         PERCENTAGE sfail;               /* Minimum chance of failure */
185         EXP sexp;                               /* Encoded experience bonus */
186 };
187
188
189 /*
190  * Player sex info
191  */
192
193 typedef struct player_sex player_sex;
194
195 struct player_sex
196 {
197         concptr title;                  /* Type of sex */
198         concptr winner;         /* Name of winner */
199 #ifdef JP
200         concptr E_title;                /* 英語性別 */
201         concptr E_winner;               /* 英語性別 */
202 #endif
203 };
204
205
206 /*
207  * Player racial info
208  */
209
210 typedef struct player_race player_race;
211
212 struct player_race
213 {
214         concptr title;                  /* Type of race */
215
216 #ifdef JP
217         concptr E_title;                /* 英語種族 */
218 #endif
219         s16b r_adj[6];          /* Racial stat bonuses */
220
221         s16b r_dis;                     /* disarming */
222         s16b r_dev;                     /* magic devices */
223         s16b r_sav;                     /* saving throw */
224         s16b r_stl;                     /* stealth */
225         s16b r_srh;                     /* search ability */
226         s16b r_fos;                     /* search frequency */
227         s16b r_thn;                     /* combat (normal) */
228         s16b r_thb;                     /* combat (shooting) */
229
230         byte r_mhp;                     /* Race hit-dice modifier */
231         byte r_exp;                     /* Race experience factor */
232
233         byte b_age;                     /* base age */
234         byte m_age;                     /* mod age */
235
236         byte m_b_ht;            /* base height (males) */
237         byte m_m_ht;            /* mod height (males) */
238         byte m_b_wt;            /* base weight (males) */
239         byte m_m_wt;            /* mod weight (males) */
240
241         byte f_b_ht;            /* base height (females) */
242         byte f_m_ht;            /* mod height (females)   */
243         byte f_b_wt;            /* base weight (females) */
244         byte f_m_wt;            /* mod weight (females) */
245
246         byte infra;                     /* Infra-vision range */
247
248         u32b choice;        /* Legal class choices */
249 /*    byte choice_xtra;   */
250 };
251
252
253 typedef struct player_seikaku player_seikaku;
254 struct player_seikaku
255 {
256         concptr title;                  /* Type of seikaku */
257
258 #ifdef JP
259         concptr E_title;                /* 英語性格 */
260 #endif
261
262         s16b a_adj[6];          /* seikaku stat bonuses */
263
264         s16b a_dis;                     /* seikaku disarming */
265         s16b a_dev;                     /* seikaku magic devices */
266         s16b a_sav;                     /* seikaku saving throw */
267         s16b a_stl;                     /* seikaku stealth */
268         s16b a_srh;                     /* seikaku search ability */
269         s16b a_fos;                     /* seikaku search frequency */
270         s16b a_thn;                     /* seikaku combat (normal) */
271         s16b a_thb;                     /* seikaku combat (shooting) */
272
273         s16b a_mhp;                     /* Race hit-dice modifier */
274
275         byte no;                        /* の */
276         byte sex;                       /* seibetu seigen */
277 };
278
279
280 /*
281  * Most of the "player" information goes here.
282  *
283  * This stucture gives us a large collection of player variables.
284  *
285  * This structure contains several "blocks" of information.
286  *   (1) the "permanent" info
287  *   (2) the "variable" info
288  *   (3) the "transient" info
289  *
290  * All of the "permanent" info, and most of the "variable" info,
291  * is saved in the savefile.  The "transient" info is recomputed
292  * whenever anything important changes.
293  */
294
295 typedef struct player_type player_type;
296
297 struct player_type
298 {
299         POSITION oldpy;         /* Previous player location -KMW- */
300         POSITION oldpx;         /* Previous player location -KMW- */
301
302         SEX_IDX psex;           /* Sex index */
303         RACE_IDX prace;         /* Race index */
304         CLASS_IDX pclass;       /* Class index */
305         CHARACTER_IDX pseikaku; /* Seikaku index */
306         REALM_IDX realm1;               /* First magic realm */
307         REALM_IDX realm2;               /* Second magic realm */
308         CHARACTER_IDX oops;             /* Unused */
309
310         DICE_SID hitdie;        /* Hit dice (sides) */
311         u16b expfact;   /* Experience factor
312                                         * Note: was byte, causing overflow for Amberite
313                                         * characters (such as Amberite Paladins)
314                                         */
315
316         s16b age;                       /* Characters age */
317         s16b ht;                        /* Height */
318         s16b wt;                        /* Weight */
319         s16b sc;                        /* Social Class */
320
321         PRICE au;                       /* Current Gold */
322
323         EXP max_max_exp;        /* Max max experience (only to calculate score) */
324         EXP max_exp;            /* Max experience */
325         EXP exp;                        /* Cur experience */
326         u32b exp_frac;          /* Cur exp frac (times 2^16) */
327
328         PLAYER_LEVEL lev;                       /* Level */
329
330         TOWN_IDX town_num;                      /* Current town number */
331         s16b arena_number;              /* monster number in arena -KMW- */
332         bool inside_arena;              /* Is character inside arena? */
333         QUEST_IDX inside_quest;         /* Inside quest level */
334         bool inside_battle;             /* Is character inside tougijou? */
335
336         DUNGEON_IDX dungeon_idx; /* current dungeon index */
337         POSITION wilderness_x;  /* Coordinates in the wilderness */
338         POSITION wilderness_y;
339         bool wild_mode;
340
341         HIT_POINT mhp;                  /* Max hit pts */
342         HIT_POINT chp;                  /* Cur hit pts */
343         u32b chp_frac;          /* Cur hit frac (times 2^16) */
344         PERCENTAGE mutant_regenerate_mod;
345
346         MANA_POINT msp;                 /* Max mana pts */
347         MANA_POINT csp;                 /* Cur mana pts */
348         u32b csp_frac;          /* Cur mana frac (times 2^16) */
349
350         s16b max_plv;           /* Max Player Level */
351
352         BASE_STATUS stat_max[6];        /* Current "maximal" stat values */
353         BASE_STATUS stat_max_max[6];    /* Maximal "maximal" stat values */
354         BASE_STATUS stat_cur[6];        /* Current "natural" stat values */
355
356         s16b learned_spells;
357         s16b add_spells;
358
359         u32b count;
360
361         TIME_EFFECT fast;               /* Timed -- Fast */
362         TIME_EFFECT slow;               /* Timed -- Slow */
363         TIME_EFFECT blind;              /* Timed -- Blindness */
364         TIME_EFFECT paralyzed;          /* Timed -- Paralysis */
365         TIME_EFFECT confused;           /* Timed -- Confusion */
366         TIME_EFFECT afraid;             /* Timed -- Fear */
367         TIME_EFFECT image;              /* Timed -- Hallucination */
368         TIME_EFFECT poisoned;           /* Timed -- Poisoned */
369         TIME_EFFECT cut;                /* Timed -- Cut */
370         TIME_EFFECT stun;               /* Timed -- Stun */
371
372         TIME_EFFECT protevil;           /* Timed -- Protection */
373         TIME_EFFECT invuln;             /* Timed -- Invulnerable */
374         TIME_EFFECT ult_res;            /* Timed -- Ultimate Resistance */
375         TIME_EFFECT hero;               /* Timed -- Heroism */
376         TIME_EFFECT shero;              /* Timed -- Super Heroism */
377         TIME_EFFECT shield;             /* Timed -- Shield Spell */
378         TIME_EFFECT blessed;            /* Timed -- Blessed */
379         TIME_EFFECT tim_invis;          /* Timed -- See Invisible */
380         TIME_EFFECT tim_infra;          /* Timed -- Infra Vision */
381         TIME_EFFECT tsuyoshi;           /* Timed -- Tsuyoshi Special */
382         TIME_EFFECT ele_attack; /* Timed -- Elemental Attack */
383         TIME_EFFECT ele_immune; /* Timed -- Elemental Immune */
384
385         TIME_EFFECT oppose_acid;        /* Timed -- oppose acid */
386         TIME_EFFECT oppose_elec;        /* Timed -- oppose lightning */
387         TIME_EFFECT oppose_fire;        /* Timed -- oppose heat */
388         TIME_EFFECT oppose_cold;        /* Timed -- oppose cold */
389         TIME_EFFECT oppose_pois;        /* Timed -- oppose poison */
390
391         TIME_EFFECT tim_esp;       /* Timed ESP */
392         TIME_EFFECT wraith_form;   /* Timed wraithform */
393
394         TIME_EFFECT resist_magic;  /* Timed Resist Magic (later) */
395         TIME_EFFECT tim_regen;
396         TIME_EFFECT kabenuke;
397         TIME_EFFECT tim_stealth;
398         TIME_EFFECT tim_levitation;
399         TIME_EFFECT tim_sh_touki;
400         TIME_EFFECT lightspeed;
401         TIME_EFFECT tsubureru;
402         TIME_EFFECT magicdef;
403         TIME_EFFECT tim_res_nether;     /* Timed -- Nether resistance */
404         TIME_EFFECT tim_res_time;       /* Timed -- Time resistance */
405         MIMIC_RACE_IDX mimic_form;
406         TIME_EFFECT tim_mimic;
407         TIME_EFFECT tim_sh_fire;
408         TIME_EFFECT tim_sh_holy;
409         TIME_EFFECT tim_eyeeye;
410
411         /* for mirror master */
412         TIME_EFFECT tim_reflect;       /* Timed -- Reflect */
413         TIME_EFFECT multishadow;       /* Timed -- Multi-shadow */
414         TIME_EFFECT dustrobe;          /* Timed -- Robe of dust */
415
416         bool timewalk;
417         GAME_TURN resting;      /* Current counter for resting, if any */
418
419         PATRON_IDX chaos_patron;
420
421         BIT_FLAGS muta1; /*!< レイシャル型の変異 / "Activatable" mutations must be in MUT1_* */        
422         #define MUT1_SPIT_ACID                  0x00000001L /*!< 突然変異: 酸の唾 */
423         #define MUT1_BR_FIRE                    0x00000002L /*!< 突然変異: 炎のブレス */
424         #define MUT1_HYPN_GAZE                  0x00000004L /*!< 突然変異: 催眠睨み */
425         #define MUT1_TELEKINES                  0x00000008L /*!< 突然変異: 念動力 */
426         #define MUT1_VTELEPORT                  0x00000010L /*!< 突然変異: テレポート / Voluntary teleport */
427         #define MUT1_MIND_BLST                  0x00000020L /*!< 突然変異: 精神攻撃 */
428         #define MUT1_RADIATION                  0x00000040L /*!< 突然変異: 放射能 */
429         #define MUT1_VAMPIRISM                  0x00000080L /*!< 突然変異: 吸血 */
430         #define MUT1_SMELL_MET                  0x00000100L /*!< 突然変異: 金属嗅覚 */
431         #define MUT1_SMELL_MON                  0x00000200L /*!< 突然変異: 敵臭嗅覚 */
432         #define MUT1_BLINK                      0x00000400L /*!< 突然変異: ショート・テレポート */
433         #define MUT1_EAT_ROCK                   0x00000800L /*!< 突然変異: 岩喰い */
434         #define MUT1_SWAP_POS                   0x00001000L /*!< 突然変異: 位置交換 */
435         #define MUT1_SHRIEK                     0x00002000L /*!< 突然変異: 叫び */
436         #define MUT1_ILLUMINE                   0x00004000L /*!< 突然変異: 照明 */
437         #define MUT1_DET_CURSE                  0x00008000L /*!< 突然変異: 呪い感知 */
438         #define MUT1_BERSERK                    0x00010000L /*!< 突然変異: 狂戦士化 */
439         #define MUT1_POLYMORPH                  0x00020000L /*!< 突然変異: 変身 */
440         #define MUT1_MIDAS_TCH                  0x00040000L /*!< 突然変異: ミダスの手 */
441         #define MUT1_GROW_MOLD                  0x00080000L /*!< 突然変異: カビ発生 */
442         #define MUT1_RESIST                     0x00100000L /*!< 突然変異: エレメント耐性 */
443         #define MUT1_EARTHQUAKE                 0x00200000L /*!< 突然変異: 地震 */
444         #define MUT1_EAT_MAGIC                  0x00400000L /*!< 突然変異: 魔力喰い */
445         #define MUT1_WEIGH_MAG                  0x00800000L /*!< 突然変異: 魔力感知 */
446         #define MUT1_STERILITY                  0x01000000L /*!< 突然変異: 増殖阻止 */
447         #define MUT1_PANIC_HIT                  0x02000000L /*!< 突然変異: ヒットアンドアウェイ */
448         #define MUT1_DAZZLE                     0x04000000L /*!< 突然変異: 眩惑 */
449         #define MUT1_LASER_EYE                  0x08000000L /*!< 突然変異: レーザー・アイ */
450         #define MUT1_RECALL                     0x10000000L /*!< 突然変異: 帰還 */
451         #define MUT1_BANISH                     0x20000000L /*!< 突然変異: 邪悪消滅 */
452         #define MUT1_COLD_TOUCH                 0x40000000L /*!< 突然変異: 凍結の手 */
453         #define MUT1_LAUNCHER                   0x80000000L /*!< 突然変異: アイテム投げ */
454
455         BIT_FLAGS muta2; /*!< 常時効果つきの変異1 / Randomly activating mutations must be MUT2_* */
456         #define MUT2_BERS_RAGE                  0x00000001L /*!< 突然変異: 狂戦士化の発作 */
457         #define MUT2_COWARDICE                  0x00000002L /*!< 突然変異: 臆病 */
458         #define MUT2_RTELEPORT                  0x00000004L /*!< 突然変異: ランダムテレポート / Random teleport, instability */
459         #define MUT2_ALCOHOL                    0x00000008L /*!< 突然変異: アルコール分泌 */
460         #define MUT2_HALLU                      0x00000010L /*!< 突然変異: 幻覚を引き起こす精神錯乱 */
461         #define MUT2_FLATULENT                  0x00000020L /*!< 突然変異: 猛烈な屁 */
462         #define MUT2_SCOR_TAIL                  0x00000040L /*!< 突然変異: サソリの尻尾 */
463         #define MUT2_HORNS                      0x00000080L /*!< 突然変異: ツノ */
464         #define MUT2_BEAK                       0x00000100L /*!< 突然変異: クチバシ */
465         #define MUT2_ATT_DEMON                  0x00000200L /*!< 突然変異: デーモンを引き付ける */
466         #define MUT2_PROD_MANA                  0x00000400L /*!< 突然変異: 制御できない魔力のエネルギー */
467         #define MUT2_SPEED_FLUX                 0x00000800L /*!< 突然変異: ランダムな加減速 */
468         #define MUT2_BANISH_ALL                 0x00001000L /*!< 突然変異: ランダムなモンスター消滅 */
469         #define MUT2_EAT_LIGHT                  0x00002000L /*!< 突然変異: 光源喰い */
470         #define MUT2_TRUNK                      0x00004000L /*!< 突然変異: 象の鼻 */
471         #define MUT2_ATT_ANIMAL                 0x00008000L /*!< 突然変異: 動物を引き寄せる */
472         #define MUT2_TENTACLES                  0x00010000L /*!< 突然変異: 邪悪な触手 */
473         #define MUT2_RAW_CHAOS                  0x00020000L /*!< 突然変異: 純カオス */
474         #define MUT2_NORMALITY                  0x00040000L /*!< 突然変異: ランダムな変異の消滅 */
475         #define MUT2_WRAITH                     0x00080000L /*!< 突然変異: ランダムな幽体化 */
476         #define MUT2_POLY_WOUND                 0x00100000L /*!< 突然変異: ランダムな傷の変化 */
477         #define MUT2_WASTING                    0x00200000L /*!< 突然変異: 衰弱 */
478         #define MUT2_ATT_DRAGON                 0x00400000L /*!< 突然変異: ドラゴンを引き寄せる */
479         #define MUT2_WEIRD_MIND                 0x00800000L /*!< 突然変異: ランダムなテレパシー */
480         #define MUT2_NAUSEA                     0x01000000L /*!< 突然変異: 落ち着きの無い胃 */
481         #define MUT2_CHAOS_GIFT                 0x02000000L /*!< 突然変異: カオスパトロン */
482         #define MUT2_WALK_SHAD                  0x04000000L /*!< 突然変異: ランダムな現実変容 */
483         #define MUT2_WARNING                    0x08000000L /*!< 突然変異: 警告 */
484         #define MUT2_INVULN                     0x10000000L /*!< 突然変異: ランダムな無敵化 */
485         #define MUT2_SP_TO_HP                   0x20000000L /*!< 突然変異: ランダムなMPからHPへの変換 */
486         #define MUT2_HP_TO_SP                   0x40000000L /*!< 突然変異: ランダムなHPからMPへの変換 */
487         #define MUT2_DISARM                     0x80000000L /*!< 突然変異: ランダムな武器落とし */
488
489         BIT_FLAGS muta3; /*!< 常時効果つきの変異2 / Other mutations will be mainly in MUT3_* */
490         #define MUT3_HYPER_STR                  0x00000001L /*!< 突然変異: 超人的な力 */
491         #define MUT3_PUNY                       0x00000002L /*!< 突然変異: 虚弱 */
492         #define MUT3_HYPER_INT                  0x00000004L /*!< 突然変異: 生体コンピュータ */
493         #define MUT3_MORONIC                    0x00000008L /*!< 突然変異: 精神薄弱 */
494         #define MUT3_RESILIENT                  0x00000010L /*!< 突然変異: 弾力のある体 */
495         #define MUT3_XTRA_FAT                   0x00000020L /*!< 突然変異: 異常な肥満 */
496         #define MUT3_ALBINO                     0x00000040L /*!< 突然変異: アルビノ */
497         #define MUT3_FLESH_ROT                  0x00000080L /*!< 突然変異: 腐敗した肉体 */
498         #define MUT3_SILLY_VOI                  0x00000100L /*!< 突然変異: 間抜けなキーキー声 */
499         #define MUT3_BLANK_FAC                  0x00000200L /*!< 突然変異: のっぺらぼう */
500         #define MUT3_ILL_NORM                   0x00000400L /*!< 突然変異: 幻影に覆われた体 */
501         #define MUT3_XTRA_EYES                  0x00000800L /*!< 突然変異: 第三の目 */
502         #define MUT3_MAGIC_RES                  0x00001000L /*!< 突然変異: 魔法防御 */
503         #define MUT3_XTRA_NOIS                  0x00002000L /*!< 突然変異: 騒音 */
504         #define MUT3_INFRAVIS                   0x00004000L /*!< 突然変異: 赤外線視力 */
505         #define MUT3_XTRA_LEGS                  0x00008000L /*!< 突然変異: 追加の脚 */
506         #define MUT3_SHORT_LEG                  0x00010000L /*!< 突然変異: 短い脚 */
507         #define MUT3_ELEC_TOUC                  0x00020000L /*!< 突然変異: 電撃オーラ */
508         #define MUT3_FIRE_BODY                  0x00040000L /*!< 突然変異: 火炎オーラ */
509         #define MUT3_WART_SKIN                  0x00080000L /*!< 突然変異: イボ肌 */
510         #define MUT3_SCALES                     0x00100000L /*!< 突然変異: 鱗肌 */
511         #define MUT3_IRON_SKIN                  0x00200000L /*!< 突然変異: 鉄の肌 */
512         #define MUT3_WINGS                      0x00400000L /*!< 突然変異: 翼 */
513         #define MUT3_FEARLESS                   0x00800000L /*!< 突然変異: 恐れ知らず */
514         #define MUT3_REGEN                      0x01000000L /*!< 突然変異: 急回復 */
515         #define MUT3_ESP                        0x02000000L /*!< 突然変異: テレパシー */
516         #define MUT3_LIMBER                     0x04000000L /*!< 突然変異: しなやかな肉体 */
517         #define MUT3_ARTHRITIS                  0x08000000L /*!< 突然変異: 関節の痛み */
518         #define MUT3_BAD_LUCK                   0x10000000L /*!< 突然変異: 黒いオーラ(不運) */
519         #define MUT3_VULN_ELEM                  0x20000000L /*!< 突然変異: 元素攻撃弱点 */
520         #define MUT3_MOTION                     0x40000000L /*!< 突然変異: 正確で力強い動作 */
521         #define MUT3_GOOD_LUCK                  0x80000000L /*!< 突然変異: 白いオーラ(幸運) */
522
523         s16b virtues[8];
524         s16b vir_types[8];
525
526         TIME_EFFECT word_recall;          /* Word of recall counter */
527         TIME_EFFECT alter_reality;        /* Alter reality counter */
528         DUNGEON_IDX recall_dungeon;      /* Dungeon set to be recalled */
529
530         ENERGY energy_need;       /* Energy needed for next move */
531         ENERGY enchant_energy_need;       /* Energy needed for next upkeep effect        */
532
533         FEED food;                /* Current nutrition */
534
535         /*
536          * p_ptr->special_attackによるプレイヤーの攻撃状態の定義 / Bit flags for the "p_ptr->special_attack" variable. -LM-
537          *
538          * Note:  The elemental and poison attacks should be managed using the
539          * function "set_ele_attack", in spell2.c.  This provides for timeouts and
540          * prevents the player from getting more than one at a time.
541          */
542         BIT_FLAGS special_attack;
543         #define ATTACK_CONFUSE  0x00000001 /*!< プレイヤーのステータス:混乱打撃 */
544         #define ATTACK_XXX1             0x00000002 /*!< プレイヤーのステータス:未使用1 */
545         #define ATTACK_XXX2             0x00000004 /*!< プレイヤーのステータス:未使用2 */
546         #define ATTACK_XXX3         0x00000008 /*!< プレイヤーのステータス:未使用3 */
547         #define ATTACK_ACID             0x00000010 /*!< プレイヤーのステータス:魔法剣/溶解 */
548         #define ATTACK_ELEC             0x00000020 /*!< プレイヤーのステータス:魔法剣/電撃 */
549         #define ATTACK_FIRE             0x00000040 /*!< プレイヤーのステータス:魔法剣/火炎 */
550         #define ATTACK_COLD             0x00000080 /*!< プレイヤーのステータス:魔法剣/冷凍 */
551         #define ATTACK_POIS             0x00000100 /*!< プレイヤーのステータス:魔法剣/毒殺 */
552         #define ATTACK_HOLY             0x00000200 /*!< プレイヤーのステータス:対邪?(未使用) */
553         #define ATTACK_SUIKEN   0x00000400 /*!< プレイヤーのステータス:酔拳 */
554
555         /*
556          * p_ptr->special_defenseによるプレイヤーの防御状態の定義 / Bit flags for the "p_ptr->special_defense" variable. -LM-
557          */
558         BIT_FLAGS special_defense;
559         #define DEFENSE_ACID    0x00000001 /*!< プレイヤーのステータス:酸免疫 */
560         #define DEFENSE_ELEC    0x00000002 /*!< プレイヤーのステータス:電撃免疫 */
561         #define DEFENSE_FIRE    0x00000004 /*!< プレイヤーのステータス:火炎免疫 */
562         #define DEFENSE_COLD    0x00000008 /*!< プレイヤーのステータス:冷気免疫 */
563         #define DEFENSE_POIS    0x00000010 /*!< プレイヤーのステータス:毒免疫 */
564         #define KAMAE_GENBU     0x00000020 /*!< プレイヤーのステータス:玄武の構え */
565         #define KAMAE_BYAKKO    0x00000040 /*!< プレイヤーのステータス:白虎の構え */
566         #define KAMAE_SEIRYU    0x00000080 /*!< プレイヤーのステータス:青竜の構え */
567         #define KAMAE_SUZAKU    0x00000100 /*!< プレイヤーのステータス:朱雀の構え */
568         #define KATA_IAI        0x00000200 /*!< プレイヤーのステータス:居合 */
569         #define KATA_FUUJIN     0x00000400 /*!< プレイヤーのステータス:風塵 */
570         #define KATA_KOUKIJIN   0x00000800 /*!< プレイヤーのステータス:降鬼陣 */
571         #define KATA_MUSOU      0x00001000 /*!< プレイヤーのステータス:無想 */
572         #define NINJA_KAWARIMI  0x00002000 /*!< プレイヤーのステータス:変わり身 */
573         #define NINJA_S_STEALTH 0x00004000 /*!< プレイヤーのステータス:超隠密 */
574         #define MAX_KAMAE 4 /*!< 修行僧の構え最大数 */
575         #define KAMAE_MASK (KAMAE_GENBU | KAMAE_BYAKKO | KAMAE_SEIRYU | KAMAE_SUZAKU) /*!< 修行僧の構えビット配列 */
576         #define MAX_KATA 4 /*!< 修行僧の型最大数 */
577         #define KATA_MASK (KATA_IAI | KATA_FUUJIN | KATA_KOUKIJIN | KATA_MUSOU) /*!< 修行僧の型ビット配列 */
578
579         ACTION_IDX action;                /* Currently action */
580         #define ACTION_NONE     0 /*!< 持続行動: なし */
581         #define ACTION_SEARCH   1 /*!< 持続行動: 探索 */
582         #define ACTION_REST     2 /*!< 持続行動: 休憩 */
583         #define ACTION_LEARN    3 /*!< 持続行動: 青魔法ラーニング */
584         #define ACTION_FISH     4 /*!< 持続行動: 釣り */
585         #define ACTION_KAMAE    5 /*!< 持続行動: 修行僧の構え */
586         #define ACTION_KATA     6 /*!< 持続行動: 剣術家の型 */
587         #define ACTION_SING     7 /*!< 持続行動: 歌 */
588         #define ACTION_HAYAGAKE 8 /*!< 持続行動: 早駆け */
589         #define ACTION_SPELL    9 /*!< 持続行動: 呪術 */
590
591         BIT_FLAGS spell_learned1;         /* bit mask of spells learned */
592         BIT_FLAGS spell_learned2;         /* bit mask of spells learned */
593         BIT_FLAGS spell_worked1;          /* bit mask of spells tried and worked */
594         BIT_FLAGS spell_worked2;          /* bit mask of spells tried and worked */
595         BIT_FLAGS spell_forgotten1;       /* bit mask of spells learned but forgotten */
596         BIT_FLAGS spell_forgotten2;       /* bit mask of spells learned but forgotten */
597         SPELL_IDX spell_order[64];  /* order spells learned/remembered/forgotten */
598
599         SUB_EXP spell_exp[64];        /* Proficiency of spells */
600         SUB_EXP weapon_exp[5][64];    /* Proficiency of weapons */
601         SUB_EXP skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */
602
603         MAGIC_NUM1 magic_num1[108];     /*!< Array for non-spellbook type magic */
604         MAGIC_NUM2 magic_num2[108];     /*!< 魔道具術師の取り込み済魔道具使用回数 / Flags for non-spellbook type magics */
605
606         SPELL_IDX mane_spell[MAX_MANE];
607         HIT_POINT mane_dam[MAX_MANE];
608         s16b mane_num;
609
610         s16b concent;      /* Sniper's concentration level */
611
612         HIT_POINT player_hp[PY_MAX_LEVEL];
613         char died_from[80];       /* What killed the player */
614         concptr last_message;        /* Last message on death or retirement */
615         char history[4][60];      /* Textual "history" for the Player */
616
617         u16b total_winner;        /* Total winner */
618         u16b panic_save;          /* Panic save */
619
620         u16b noscore;             /* Cheating flags */
621
622         bool wait_report_score;   /* Waiting to report score */
623         bool is_dead;             /* Player is dead */
624         bool now_damaged;
625         bool ambush_flag;
626
627         bool wizard;              /* Player is in wizard mode */
628
629         MONSTER_IDX riding;              /* Riding on a monster of this index */
630         byte knowledge;           /* Knowledge about yourself */
631         BIT_FLAGS visit;               /* Visited towns */
632
633         RACE_IDX start_race;          /* Race at birth */
634         BIT_FLAGS old_race1;           /* Record of race changes */
635         BIT_FLAGS old_race2;           /* Record of race changes */
636         s16b old_realm;           /* Record of realm changes */
637
638         s16b pet_follow_distance; /* Length of the imaginary "leash" for pets */
639         s16b pet_extra_flags;     /* Various flags for controling pets */
640
641         s16b today_mon;           /* Wanted monster */
642
643         bool dtrap;               /* Whether you are on trap-safe grids */
644         FLOOR_IDX floor_id;            /* Current floor location */ 
645
646         bool autopick_autoregister; /* auto register is in-use or not */
647
648         byte feeling;           /* Most recent dungeon feeling */
649         s32b feeling_turn;      /* The current_world_ptr->game_turn of the last dungeon feeling */
650
651         object_type *inventory_list; /* The player's p_ptr->inventory_list [INVEN_TOTAL] */
652         s16b inven_cnt; /* Number of items in inventory */
653         s16b equip_cnt; /* Number of items in equipment */
654
655                                                         /*** Temporary fields ***/
656
657         bool playing;                   /* True if player is playing */
658         bool leaving;                   /* True if player is leaving */
659
660         bool monk_armour_aux;
661         bool monk_notify_aux;
662
663         byte leave_bldg;
664         byte exit_bldg;                 /* Goal obtained in arena? -KMW- */
665
666         bool leaving_dungeon;   /* True if player is leaving the dungeon */
667         bool teleport_town;
668         bool enter_dungeon;     /* Just enter the dungeon */
669
670         IDX health_who; /* Health bar trackee */
671
672         MONRACE_IDX monster_race_idx;   /* Monster race trackee */
673
674         KIND_OBJECT_IDX object_kind_idx;        /* Object kind trackee */
675
676         s16b new_spells;        /* Number of spells available */
677         s16b old_spells;
678
679         s16b old_food_aux;      /* Old value of food */
680
681         bool old_cumber_armor;
682         bool old_cumber_glove;
683         bool old_heavy_wield[2];
684         bool old_heavy_shoot;
685         bool old_icky_wield[2];
686         bool old_riding_wield[2];
687         bool old_riding_ryoute;
688         bool old_monlite;
689
690         POSITION old_lite;              /* Old radius of lite (if any) */
691
692         bool cumber_armor;      /* Mana draining armor */
693         bool cumber_glove;      /* Mana draining gloves */
694         bool heavy_wield[2];    /* Heavy weapon */
695         bool heavy_shoot;       /* Heavy shooter */
696         bool icky_wield[2];     /* Icky weapon */
697         bool riding_wield[2];   /* Riding weapon */
698         bool riding_ryoute;     /* Riding weapon */
699         bool monlite;
700
701         POSITION cur_lite;              /* Radius of lite (if any) */
702
703         BIT_FLAGS update;       /* Pending Updates */
704                 #define PU_BONUS        0x00000001L     /*!< ステータス更新フラグ: 能力値修正 / Calculate bonuses */
705                 #define PU_TORCH        0x00000002L     /*!< ステータス更新フラグ: 光源半径 / Calculate torch radius */
706                 #define PU_HP           0x00000010L     /*!< ステータス更新フラグ: HP / Calculate chp and mhp */
707                 #define PU_MANA         0x00000020L     /*!< ステータス更新フラグ: MP / Calculate csp and msp */
708                 #define PU_SPELLS       0x00000040L     /*!< ステータス更新フラグ: 魔法学習数 / Calculate spells */
709                 #define PU_COMBINE      0x00000100L     /*!< アイテム処理フラグ: アイテムの結合を要する / Combine the pack */
710                 #define PU_REORDER      0x00000200L     /*!< アイテム処理フラグ: アイテムの並び替えを要する / Reorder the pack */
711                 #define PU_AUTODESTROY  0x00000400L     /*!< アイテム処理フラグ: アイテムの自動破壊を要する / Auto-destroy marked item */
712                 #define PU_UN_VIEW      0x00010000L     /*!< ステータス更新フラグ: 地形の視界外化 / Forget view */
713                 #define PU_UN_LITE      0x00020000L     /*!< ステータス更新フラグ: 明暗範囲の視界外化 / Forget lite */
714                 #define PU_VIEW         0x00100000L     /*!< ステータス更新フラグ: 視界 / Update view */
715                 #define PU_LITE         0x00200000L     /*!< ステータス更新フラグ: 明暗範囲 / Update lite */
716                 #define PU_MON_LITE     0x00400000L     /*!< ステータス更新フラグ: モンスターの光源範囲 / Monster illumination */
717                 #define PU_DELAY_VIS    0x00800000L     /*!< ステータス更新フラグ: 視界の追加更新 / Mega-Hack -- Delayed visual update */
718                 #define PU_MONSTERS     0x01000000L     /*!< ステータス更新フラグ: モンスターのステータス / Update monsters */
719                 #define PU_DISTANCE     0x02000000L     /*!< ステータス更新フラグ: プレイヤーとモンスターの距離 / Update distances */
720                 #define PU_FLOW         0x10000000L     /*!< ステータス更新フラグ: プレイヤーから各マスへの到達距離 / Update flow */
721
722         BIT_FLAGS redraw;       /* Normal Redraws */
723         BIT_FLAGS window;       /* Window Redraws */
724
725         s16b stat_use[A_MAX];   /* Current modified stats */
726         s16b stat_top[A_MAX];   /* Maximal modified stats */
727
728         bool sutemi;
729         bool counter;
730
731         ALIGNMENT align; /* Good/evil/neutral */
732         POSITION run_py;
733         POSITION run_px;
734         DIRECTION fishing_dir;
735
736
737         /*** Extracted fields ***/
738
739         WEIGHT total_weight;    /*!< 所持品と装備品の計算総重量 / Total weight being carried */
740
741         s16b stat_add[A_MAX];   /* Modifiers to stat values */
742         s16b stat_ind[A_MAX];   /* Indexes into stat tables */
743
744         bool hack_mutation;
745
746         bool immune_acid;       /* Immunity to acid */
747         bool immune_elec;       /* Immunity to lightning */
748         bool immune_fire;       /* Immunity to fire */
749         bool immune_cold;       /* Immunity to cold */
750
751         bool resist_acid;       /* Resist acid */
752         bool resist_elec;       /* Resist lightning */
753         bool resist_fire;       /* Resist fire */
754         bool resist_cold;       /* Resist cold */
755         bool resist_pois;       /* Resist poison */
756
757         bool resist_conf;       /* Resist confusion */
758         bool resist_sound;      /* Resist sound */
759         bool resist_lite;       /* Resist light */
760         bool resist_dark;       /* Resist darkness */
761         bool resist_chaos;      /* Resist chaos */
762         bool resist_disen;      /* Resist disenchant */
763         bool resist_shard;      /* Resist shards */
764         bool resist_nexus;      /* Resist nexus */
765         bool resist_blind;      /* Resist blindness */
766         bool resist_neth;       /* Resist nether */
767         bool resist_fear;       /* Resist fear */
768         bool resist_time;       /* Resist time */
769         bool resist_water;      /* Resist water */
770
771         bool reflect;       /* Reflect 'bolt' attacks */
772         bool sh_fire;       /* Fiery 'immolation' effect */
773         bool sh_elec;       /* Electric 'immolation' effect */
774         bool sh_cold;       /* Cold 'immolation' effect */
775
776         bool anti_magic;    /* Anti-magic */
777         bool anti_tele;     /* Prevent teleportation */
778
779         bool sustain_str;       /* Keep strength */
780         bool sustain_int;       /* Keep intelligence */
781         bool sustain_wis;       /* Keep wisdom */
782         bool sustain_dex;       /* Keep dexterity */
783         bool sustain_con;       /* Keep constitution */
784         bool sustain_chr;       /* Keep charisma */
785
786         BIT_FLAGS cursed;       /* Player is cursed */
787
788         bool can_swim;          /* No damage falling */
789         bool levitation;                /* No damage falling */
790         bool lite;              /* Permanent light */
791         bool free_act;          /* Never paralyzed */
792         bool see_inv;           /* Can see invisible */
793         bool regenerate;        /* Regenerate hit pts */
794         bool hold_exp;          /* Resist exp draining */
795
796         bool telepathy;         /* Telepathy */
797         bool esp_animal;
798         bool esp_undead;
799         bool esp_demon;
800         bool esp_orc;
801         bool esp_troll;
802         bool esp_giant;
803         bool esp_dragon;
804         bool esp_human;
805         bool esp_evil;
806         bool esp_good;
807         bool esp_nonliving;
808         bool esp_unique;
809
810         bool slow_digest;       /* Slower digestion */
811         bool bless_blade;       /* Blessed blade */
812         bool xtra_might;        /* Extra might bow */
813         bool impact[2];         /* Earthquake blows */
814         bool pass_wall;     /* Permanent wraithform */
815         bool kill_wall;
816         bool dec_mana;
817         bool easy_spell;
818         bool heavy_spell;
819         bool warning;
820         bool mighty_throw;
821         bool see_nocto;         /* Noctovision */
822
823         DICE_NUMBER to_dd[2]; /* Extra dice/sides */
824         DICE_SID to_ds[2];
825
826         HIT_PROB dis_to_h[2];   /*!< 判明している現在の表記上の近接武器命中修正値 /  Known bonus to hit (wield) */
827         HIT_PROB dis_to_h_b;    /*!< 判明している現在の表記上の射撃武器命中修正値 / Known bonus to hit (bow) */
828         HIT_POINT dis_to_d[2];  /*!< 判明している現在の表記上の近接武器ダメージ修正値 / Known bonus to dam (wield) */
829         ARMOUR_CLASS dis_to_a;  /*!< 判明している現在の表記上の装備AC修正値 / Known bonus to ac */
830         ARMOUR_CLASS dis_ac;    /*!< 判明している現在の表記上の装備AC基礎値 / Known base ac */
831
832         s16b to_h[2];           /* Bonus to hit (wield) */
833         s16b to_h_b;            /* Bonus to hit (bow) */
834         s16b to_h_m;            /* Bonus to hit (misc) */
835         s16b to_d[2];           /* Bonus to dam (wield) */
836         s16b to_d_m;            /* Bonus to dam (misc) */
837         s16b to_a;                      /* Bonus to ac */
838
839         s16b to_m_chance;               /* Minusses to cast chance */
840
841         bool ryoute;
842         bool migite;
843         bool hidarite;
844         bool no_flowed;
845
846         ARMOUR_CLASS ac;        /*!< 装備無しの基本AC / Base ac */
847
848         ACTION_SKILL_POWER see_infra;   /*!< 赤外線視能力の強さ /Infravision range */
849         ACTION_SKILL_POWER skill_dis;   /*!< 行動技能値:解除能力 / Skill: Disarming */
850         ACTION_SKILL_POWER skill_dev;   /*!< 行動技能値:魔道具使用 / Skill: Magic Devices */
851         ACTION_SKILL_POWER skill_sav;   /*!< 行動技能値:魔法防御 / Skill: Saving throw */
852         ACTION_SKILL_POWER skill_stl;   /*!< 行動技能値:隠密 / Skill: Stealth factor */
853
854         /*! 
855          * 行動技能値:知覚 / Skill: Searching ability
856          * この値はsearch()による地形の隠し要素発見処理などで混乱、盲目、幻覚、無光源などの
857          * 状態異常がない限り、難易度修正などがないままそのままパーセンテージ値として使われる。
858          * 100以上ならば必ず全てのトラップなどを見つけることが出来る。
859          */
860         ACTION_SKILL_POWER skill_srh;
861
862         ACTION_SKILL_POWER skill_fos;   /*!< 行動技能値:探索 / Skill: Searching frequency */
863         ACTION_SKILL_POWER skill_thn;   /*!< 行動技能値:打撃命中能力 / Skill: To hit (normal) */
864         ACTION_SKILL_POWER skill_thb;   /*!< 行動技能値:射撃命中能力 / Skill: To hit (shooting) */
865         ACTION_SKILL_POWER skill_tht;   /*!< 行動技能値:投射命中能力 / Skill: To hit (throwing) */
866         ACTION_SKILL_POWER skill_dig;   /*!< 行動技能値:掘削 / Skill: Digging */
867
868         s16b num_blow[2];       /* Number of blows */
869         s16b num_fire;          /* Number of shots */
870
871         byte tval_xtra;         /* Correct xtra tval */
872         byte tval_ammo;         /* Correct ammo tval */
873
874         byte pspeed;            /* Current speed */
875
876         ENERGY energy_use;      /* Energy use this current_world_ptr->game_turn */
877
878         POSITION y;     /* Player location in dungeon */
879         POSITION x;     /* Player location in dungeon */
880         GAME_TEXT name[32]; /*!< 現在のプレイヤー名 / Current player's character name */
881 };
882
883
884 /*
885  * A structure to hold "rolled" information
886  */
887 typedef struct birther birther;
888
889 struct birther
890 {
891         SEX_IDX psex;           /* Sex index */
892         RACE_IDX prace;         /* Race index */
893         CLASS_IDX pclass;       /* Class index */
894         CHARACTER_IDX pseikaku; /* Seikaku index */
895         REALM_IDX realm1;       /* First magic realm */
896         REALM_IDX realm2;       /* Second magic realm */
897
898         s16b age;
899         s16b ht;
900         s16b wt;
901         s16b sc;
902
903         PRICE au; /*!< 初期の所持金 */
904
905         BASE_STATUS stat_max[6];        /* Current "maximal" stat values */
906         BASE_STATUS stat_max_max[6];    /* Maximal "maximal" stat values */
907         HIT_POINT player_hp[PY_MAX_LEVEL];
908
909         PATRON_IDX chaos_patron;
910
911         s16b vir_types[8];
912
913         char history[4][60];
914
915         bool quick_ok;
916 };
917
918
919 /* For Monk martial arts */
920
921 typedef struct martial_arts martial_arts;
922
923 struct martial_arts
924 {
925         concptr desc;       /* A verbose attack description */
926         PLAYER_LEVEL min_level;  /* Minimum level to use */
927         int chance;     /* Chance of 'success' */
928         int dd;         /* Damage dice */
929         int ds;         /* Damage sides */
930         int effect;     /* Special effects */
931 };
932
933 typedef struct kamae kamae;
934
935 struct kamae
936 {
937         concptr desc;       /* A verbose kamae description */
938         PLAYER_LEVEL min_level;  /* Minimum level to use */
939         concptr info;
940 };
941
942
943 /* Imitator */
944
945 typedef struct monster_power monster_power;
946 struct monster_power
947 {
948         PLAYER_LEVEL level;
949         MANA_POINT smana;
950         PERCENTAGE fail;
951         int     manedam;
952         int     manefail;
953         int     use_stat;
954         concptr    name;
955 };
956
957
958 /*
959  * A structure describing a town with
960  * stores and buildings
961  */
962 typedef struct town_type town_type;
963 struct town_type
964 {
965         GAME_TEXT name[32];
966         u32b seed;      /* Seed for RNG */
967         store_type *store;    /* The stores [MAX_STORES] */
968         byte numstores;
969 };
970
971 /*
972  * Sort-array element
973  */
974 typedef struct tag_type tag_type;
975
976 struct tag_type
977 {
978         int tag;
979         int index;
980 };
981
982 typedef bool (*monsterrace_hook_type)(MONRACE_IDX r_idx);
983
984
985 /*
986  * This seems like a pretty standard "typedef"
987  */
988 typedef int (*inven_func)(object_type *);
989
990
991 typedef struct
992 {
993         FEAT_IDX feat;    /* Feature tile */
994         PERCENTAGE percent; /* Chance of type */
995 }
996 feat_prob;
997
998
999 /*!
1000  * @struct autopick_type
1001  * @brief 自動拾い/破壊設定データの構造体 / A structure type for entry of auto-picker/destroyer
1002  */
1003 typedef struct {
1004         concptr name;          /*!< 自動拾い/破壊定義の名称一致基準 / Items which have 'name' as part of its name match */
1005         concptr insc;          /*!< 対象となったアイテムに自動で刻む内容 / Items will be auto-inscribed as 'insc' */
1006         BIT_FLAGS flag[2];       /*!< キーワードに関する汎用的な条件フラグ / Misc. keyword to be matched */
1007         byte action;        /*!< 対象のアイテムを拾う/破壊/放置するかの指定フラグ / Auto-pickup or Destroy or Leave items */
1008         byte dice;          /*!< 武器のダイス値基準値 / Weapons which have more than 'dice' dice match */
1009         byte bonus;         /*!< アイテムのボーナス基準値 / Items which have more than 'bonus' magical bonus match */
1010 } autopick_type;
1011
1012
1013 /*
1014  *  A structure type for terrain template of saving dungeon floor
1015  */
1016 typedef struct
1017 {
1018         BIT_FLAGS info;
1019         FEAT_IDX feat;
1020         FEAT_IDX mimic;
1021         s16b special;
1022         u16b occurrence;
1023 } cave_template_type;
1024
1025
1026 #ifdef TRAVEL
1027 /*
1028  *  A structure type for travel command
1029  */
1030 typedef struct {
1031         int run; /* Remaining grid number */
1032         int cost[MAX_HGT][MAX_WID];
1033         POSITION x; /* Target X */
1034         POSITION y; /* Target Y */
1035         DIRECTION dir; /* Running direction */
1036 } travel_type;
1037 #endif
1038
1039 typedef struct {
1040         int flag;
1041         int type;
1042         concptr name;
1043 } dragonbreath_type;