5 * @brief グローバルな構造体の定義 / global type declarations
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.
16 * このファイルはangband.hでのみインクルードすること。
17 * This file should ONLY be included by "angband.h"
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.
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.
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.
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.
50 //#include "player-skill.h"
54 * Information about "ego-items".
57 typedef struct ego_item_type ego_item_type;
61 STR_OFFSET name; /* Name (offset) */
62 STR_OFFSET text; /* Text (offset) */
64 INVENTORY_IDX slot; /*!< 装備部位 / Standard slot value */
65 PRICE rating; /*!< ベースアイテムからの価値加速 / Rating boost */
67 DEPTH level; /* Minimum level */
68 RARITY rarity; /* Object rarity */
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 */
74 PARAMETER_VALUE max_pval; /* Maximum pval */
76 PRICE cost; /* Ego-item "cost" */
78 BIT_FLAGS flags[TR_FLAG_SIZE]; /* Ego-Item Flags */
79 BIT_FLAGS gen_flags; /* flags for generate */
81 IDX act_idx; /* Activative ability index */
88 * Monster blow structure
96 typedef struct monster_blow monster_blow;
107 typedef struct mbe_info_type mbe_info_type;
111 int power; /* The attack "power" */
112 int explode_type; /* Explosion effect */
117 * Object information, for a specific object.
119 * Note that a "discount" on an item is permanent and never goes away.
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.
124 * Note that "object" records are "copied" on a fairly regular basis,
125 * and care must be taken when handling such objects.
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.
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.
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.
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".
144 typedef struct object_type object_type;
148 KIND_OBJECT_IDX k_idx; /* Kind index (zero if "dead") */
150 POSITION iy; /* Y-position on map, or zero */
151 POSITION ix; /* X-position on map, or zero */
153 OBJECT_TYPE_VALUE tval; /* Item type (from kind) */
154 OBJECT_SUBTYPE_VALUE sval; /* Item sub-type (from kind) */
156 PARAMETER_VALUE pval; /* Item extra-parameter */
158 DISCOUNT_RATE discount; /* Discount (if any) */
160 ITEM_NUMBER number; /* Number of items */
162 WEIGHT weight; /* Item weight */
164 ARTIFACT_IDX name1; /* Artifact type, if any */
165 EGO_IDX name2; /* Ego-Item type, if any */
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 */
173 HIT_PROB to_h; /* Plusses to hit */
174 HIT_POINT to_d; /* Plusses to damage */
175 ARMOUR_CLASS to_a; /* Plusses to AC */
177 ARMOUR_CLASS ac; /* Normal AC */
180 DICE_SID ds; /* Damage dice/sides */
182 TIME_EFFECT timeout; /* Timeout Counter */
184 byte ident; /* Special flags */
185 byte marked; /* Object is marked */
187 u16b inscription; /* Inscription index */
188 u16b art_name; /* Artifact name (random artifacts) */
190 byte feeling; /* Game generated inscription number (eg, pseudo-id) */
192 BIT_FLAGS art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
193 BIT_FLAGS curse_flags; /* Flags for curse */
195 OBJECT_IDX next_o_idx; /* Next object in stack (if any) */
196 MONSTER_IDX held_m_idx; /* Monster holding us (if any) */
198 ARTIFACT_BIAS_IDX artifact_bias; /*!< ランダムアーティファクト生成時のバイアスID */
204 * An entry for the object/monster allocation functions
206 * Pass 1 is determined from allocation information
207 * Pass 2 is determined from allocation restriction
208 * Pass 3 is determined from allocation calculation
211 typedef struct alloc_entry alloc_entry;
215 KIND_OBJECT_IDX index; /* The actual index */
217 DEPTH level; /* Base dungeon level */
218 PROB prob1; /* Probability, pass 1 */
219 PROB prob2; /* Probability, pass 2 */
220 PROB prob3; /* Probability, pass 3 */
222 u16b total; /* Unused for now */
229 typedef struct owner_type owner_type;
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 */
246 * A store, with an owner, various state flags, a current stock
247 * of items, and a table of items that are often purchased.
249 typedef struct store_type store_type;
253 byte type; /* Store type */
255 byte owner; /* Owner index */
256 byte extra; /* Unused for now */
258 s16b insult_cur; /* Insult counter */
260 s16b good_buy; /* Number of "good" buys */
261 s16b bad_buy; /* Number of "bad" buys */
263 s32b store_open; /* Closed until this current_world_ptr->game_turn */
265 s32b last_visit; /* Last visited on this current_world_ptr->game_turn */
267 s16b table_num; /* Table -- Number of entries */
268 s16b table_size; /* Table -- Total Size of Array */
269 s16b *table; /* Table -- Legal item kinds */
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 */
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.
281 typedef struct magic_type magic_type;
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 */
296 typedef struct player_sex player_sex;
300 concptr title; /* Type of sex */
301 concptr winner; /* Name of winner */
303 concptr E_title; /* 英語性別 */
304 concptr E_winner; /* 英語性別 */
313 typedef struct player_race player_race;
317 concptr title; /* Type of race */
320 concptr E_title; /* 英語種族 */
322 s16b r_adj[6]; /* Racial stat bonuses */
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) */
333 byte r_mhp; /* Race hit-dice modifier */
334 byte r_exp; /* Race experience factor */
336 byte b_age; /* base age */
337 byte m_age; /* mod age */
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) */
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) */
349 byte infra; /* Infra-vision range */
351 u32b choice; /* Legal class choices */
352 /* byte choice_xtra; */
356 typedef struct player_seikaku player_seikaku;
357 struct player_seikaku
359 concptr title; /* Type of seikaku */
362 concptr E_title; /* 英語性格 */
365 s16b a_adj[6]; /* seikaku stat bonuses */
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) */
376 s16b a_mhp; /* Race hit-dice modifier */
379 byte sex; /* seibetu seigen */
384 * Most of the "player" information goes here.
386 * This stucture gives us a large collection of player variables.
388 * This structure contains several "blocks" of information.
389 * (1) the "permanent" info
390 * (2) the "variable" info
391 * (3) the "transient" info
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.
398 typedef struct player_type player_type;
402 POSITION oldpy; /* Previous player location -KMW- */
403 POSITION oldpx; /* Previous player location -KMW- */
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 */
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)
419 s16b age; /* Characters age */
420 s16b ht; /* Height */
421 s16b wt; /* Weight */
422 s16b sc; /* Social Class */
424 PRICE au; /* Current Gold */
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) */
431 PLAYER_LEVEL lev; /* Level */
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? */
439 DUNGEON_IDX dungeon_idx; /* current dungeon index */
440 POSITION wilderness_x; /* Coordinates in the wilderness */
441 POSITION wilderness_y;
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;
449 MANA_POINT msp; /* Max mana pts */
450 MANA_POINT csp; /* Cur mana pts */
451 u32b csp_frac; /* Cur mana frac (times 2^16) */
453 s16b max_plv; /* Max Player Level */
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 */
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 */
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 */
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 */
494 TIME_EFFECT tim_esp; /* Timed ESP */
495 TIME_EFFECT wraith_form; /* Timed wraithform */
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;
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 */
520 GAME_TURN resting; /* Current counter for resting, if any */
522 PATRON_IDX chaos_patron;
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 /*!< 突然変異: アイテム投げ */
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 /*!< 突然変異: ランダムな武器落とし */
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 /*!< 突然変異: 白いオーラ(幸運) */
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 */
633 ENERGY energy_need; /* Energy needed for next move */
634 ENERGY enchant_energy_need; /* Energy needed for next upkeep effect */
636 FEED food; /* Current nutrition */
639 * p_ptr->special_attackによるプレイヤーの攻撃状態の定義 / Bit flags for the "p_ptr->special_attack" variable. -LM-
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.
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 /*!< プレイヤーのステータス:酔拳 */
659 * p_ptr->special_defenseによるプレイヤーの防御状態の定義 / Bit flags for the "p_ptr->special_defense" variable. -LM-
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) /*!< 修行僧の型ビット配列 */
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 /*!< 持続行動: 呪術 */
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 */
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 */
706 MAGIC_NUM1 magic_num1[108]; /*!< Array for non-spellbook type magic */
707 MAGIC_NUM2 magic_num2[108]; /*!< 魔道具術師の取り込み済魔道具使用回数 / Flags for non-spellbook type magics */
709 SPELL_IDX mane_spell[MAX_MANE];
710 HIT_POINT mane_dam[MAX_MANE];
713 s16b concent; /* Sniper's concentration level */
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 */
720 u16b total_winner; /* Total winner */
721 u16b panic_save; /* Panic save */
723 u16b noscore; /* Cheating flags */
725 bool wait_report_score; /* Waiting to report score */
726 bool is_dead; /* Player is dead */
730 bool wizard; /* Player is in wizard mode */
732 MONSTER_IDX riding; /* Riding on a monster of this index */
733 byte knowledge; /* Knowledge about yourself */
734 BIT_FLAGS visit; /* Visited towns */
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 */
741 s16b pet_follow_distance; /* Length of the imaginary "leash" for pets */
742 s16b pet_extra_flags; /* Various flags for controling pets */
744 s16b today_mon; /* Wanted monster */
746 bool dtrap; /* Whether you are on trap-safe grids */
747 FLOOR_IDX floor_id; /* Current floor location */
749 bool autopick_autoregister; /* auto register is in-use or not */
751 byte feeling; /* Most recent dungeon feeling */
752 s32b feeling_turn; /* The current_world_ptr->game_turn of the last dungeon feeling */
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 */
758 /*** Temporary fields ***/
760 bool playing; /* True if player is playing */
761 bool leaving; /* True if player is leaving */
763 bool monk_armour_aux;
764 bool monk_notify_aux;
767 byte exit_bldg; /* Goal obtained in arena? -KMW- */
769 bool leaving_dungeon; /* True if player is leaving the dungeon */
771 bool enter_dungeon; /* Just enter the dungeon */
773 IDX health_who; /* Health bar trackee */
775 MONRACE_IDX monster_race_idx; /* Monster race trackee */
777 KIND_OBJECT_IDX object_kind_idx; /* Object kind trackee */
779 s16b new_spells; /* Number of spells available */
782 s16b old_food_aux; /* Old value of food */
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;
793 POSITION old_lite; /* Old radius of lite (if any) */
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 */
804 POSITION cur_lite; /* Radius of lite (if any) */
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 */
825 BIT_FLAGS redraw; /* Normal Redraws */
826 BIT_FLAGS window; /* Window Redraws */
828 s16b stat_use[A_MAX]; /* Current modified stats */
829 s16b stat_top[A_MAX]; /* Maximal modified stats */
834 ALIGNMENT align; /* Good/evil/neutral */
837 DIRECTION fishing_dir;
840 /*** Extracted fields ***/
842 WEIGHT total_weight; /*!< 所持品と装備品の計算総重量 / Total weight being carried */
844 s16b stat_add[A_MAX]; /* Modifiers to stat values */
845 s16b stat_ind[A_MAX]; /* Indexes into stat tables */
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 */
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 */
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 */
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 */
879 bool anti_magic; /* Anti-magic */
880 bool anti_tele; /* Prevent teleportation */
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 */
889 BIT_FLAGS cursed; /* Player is cursed */
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 */
899 bool telepathy; /* Telepathy */
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 */
924 bool see_nocto; /* Noctovision */
926 DICE_NUMBER to_dd[2]; /* Extra dice/sides */
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 */
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 */
942 s16b to_m_chance; /* Minusses to cast chance */
949 ARMOUR_CLASS ac; /*!< 装備無しの基本AC / Base ac */
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 */
958 * 行動技能値:知覚 / Skill: Searching ability
959 * この値はsearch()による地形の隠し要素発見処理などで混乱、盲目、幻覚、無光源などの
960 * 状態異常がない限り、難易度修正などがないままそのままパーセンテージ値として使われる。
961 * 100以上ならば必ず全てのトラップなどを見つけることが出来る。
963 ACTION_SKILL_POWER skill_srh;
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 */
971 s16b num_blow[2]; /* Number of blows */
972 s16b num_fire; /* Number of shots */
974 byte tval_xtra; /* Correct xtra tval */
975 byte tval_ammo; /* Correct ammo tval */
977 byte pspeed; /* Current speed */
979 ENERGY energy_use; /* Energy use this current_world_ptr->game_turn */
981 POSITION y; /* Player location in dungeon */
982 POSITION x; /* Player location in dungeon */
983 GAME_TEXT name[32]; /*!< 現在のプレイヤー名 / Current player's character name */
988 * A structure to hold "rolled" information
990 typedef struct birther birther;
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 */
1006 PRICE au; /*!< 初期の所持金 */
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];
1012 PATRON_IDX chaos_patron;
1016 char history[4][60];
1022 /* For Monk martial arts */
1024 typedef struct martial_arts martial_arts;
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 */
1036 typedef struct kamae kamae;
1040 concptr desc; /* A verbose kamae description */
1041 PLAYER_LEVEL min_level; /* Minimum level to use */
1048 typedef struct monster_power monster_power;
1049 struct monster_power
1062 * A structure describing a town with
1063 * stores and buildings
1065 typedef struct town_type town_type;
1069 u32b seed; /* Seed for RNG */
1070 store_type *store; /* The stores [MAX_STORES] */
1075 * Sort-array element
1077 typedef struct tag_type tag_type;
1085 typedef bool (*monsterrace_hook_type)(MONRACE_IDX r_idx);
1089 * This seems like a pretty standard "typedef"
1091 typedef int (*inven_func)(object_type *);
1096 FEAT_IDX feat; /* Feature tile */
1097 PERCENTAGE percent; /* Chance of type */
1103 * @struct autopick_type
1104 * @brief 自動拾い/破壊設定データの構造体 / A structure type for entry of auto-picker/destroyer
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 */
1117 * A structure type for terrain template of saving dungeon floor
1126 } cave_template_type;
1131 * A structure type for travel command
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 */
1146 } dragonbreath_type;