OSDN Git Service

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