-/* File: types.h */
-
-/*
+/*!
+ * @file types.h
+ * @brief グローバルな構造体の定義 / global type declarations
+ * @date 2014/08/10
+ * @author
+ * <pre>
* Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
- *
* This software may be copied and distributed for educational, research,
* and not for profit purposes provided that this copyright and statement
* are included in all such copies. Other copyrights may also apply.
- */
-
-/* Purpose: global type declarations */
-
-
-/*
+ * </pre>
+ * @details
+ * <pre>
+ * このファイルはangband.hでのみインクルードすること。
* This file should ONLY be included by "angband.h"
- */
-
-/*
+ *
* Note that "char" may or may not be signed, and that "signed char"
* may or may not work on all machines. So always use "s16b" or "s32b"
* for signed values. Also, note that unsigned values cause math problems
* in "header_type", and the "m_idx" and "o_idx" fields in "cave_type". All
* of these could be removed, but this would, in general, slow down the game
* and increase the complexity of the code.
+ * </pre>
*/
-
-
-
-/*
- * Feature state structure
- *
- * - Action (FF_*)
- * - Result (FEAT_*)
+/*!
+ * @struct feature_state
+ * @brief 地形状態変化指定構造体 / Feature state structure
*/
typedef struct feature_state feature_state;
struct feature_state
{
- byte action;
- s16b result;
+ FF_FLAGS_IDX action; /*!< 変化条件をFF_*のIDで指定 / Action (FF_*) */
+ STR_OFFSET result_tag; /*!< 変化先ID / Result (f_info ID) */
+ FEAT_IDX result; /*!< 変化先ID / Result (f_info ID) */
};
-/*
- * Information about terrain "features"
+/*!
+ * @struct feature_type
+ * @brief 地形情報の構造体 / Information about terrain "features"
*/
typedef struct feature_type feature_type;
struct feature_type
{
- u32b name; /* Name (offset) */
- u32b text; /* Text (offset) */
- s16b tag; /* Tag (offset) */
+ STR_OFFSET name; /*!< 地形名参照のためのネームバッファオフセット値 / Name (offset) */
+ STR_OFFSET text; /*!< 地形説明参照のためのネームバッファオフセット値 / Text (offset) */
+ STR_OFFSET tag; /*!< 地形特性タグ参照のためのネームバッファオフセット値 / Tag (offset) */
+
+ STR_OFFSET mimic_tag;
+ STR_OFFSET destroyed_tag;
- s16b mimic; /* Feature to mimic */
+ FEAT_IDX mimic; /*!< 未確定時の外形地形ID / Feature to mimic */
+ FEAT_IDX destroyed; /*!< *破壊*に巻き込まれた時の地形移行先(未実装?) / Default destroyed state */
- u32b flags[FF_FLAG_SIZE]; /* Flags */
+ BIT_FLAGS flags[FF_FLAG_SIZE]; /*!< 地形の基本特性ビット配列 / Flags */
- u16b priority; /* Map priority */
- s16b destroyed; /* Default destroyed state */
+ FEAT_PRIORITY priority; /*!< 縮小表示で省略する際の表示優先度 / Map priority */
- feature_state state[MAX_FEAT_STATES];
+ feature_state state[MAX_FEAT_STATES]; /*!< feature_state テーブル */
- byte power;
+ FEAT_SUBTYPE subtype; /*!< 副特性値 */
+ FEAT_POWER power; /*!< 地形強度 */
- byte d_attr[F_LIT_MAX]; /* Default feature attribute */
- byte d_char[F_LIT_MAX]; /* Default feature character */
+ TERM_COLOR d_attr[F_LIT_MAX]; /*!< デフォルトの地形シンボルカラー / Default feature attribute */
+ SYMBOL_CODE d_char[F_LIT_MAX]; /*!< デフォルトの地形シンボルアルファベット / Default feature character */
- byte x_attr[F_LIT_MAX]; /* Desired feature attribute */
- byte x_char[F_LIT_MAX]; /* Desired feature character */
+ TERM_COLOR x_attr[F_LIT_MAX]; /*!< 設定変更後の地形シンボルカラー / Desired feature attribute */
+ SYMBOL_CODE x_char[F_LIT_MAX]; /*!< 設定変更後の地形シンボルアルファベット / Desired feature character */
};
-/*
- * Information about object "kinds", including player knowledge.
- *
+/*!
+ * @struct object_kind
+ * @brief ベースアイテム情報の構造体 / Information about object "kinds", including player knowledge.
+ * @details
+ * ゲーム進行用のセーブファイル上では aware と tried のみ保存対象とすること。と英文ではあるが実際はもっとある様子である。 /
* Only "aware" and "tried" are saved in the savefile
*/
struct object_kind
{
- u32b name; /* Name (offset) */
- u32b text; /* Text (offset) */
- u32b flavor_name; /* Flavor name (offset) */
-
- byte tval; /* Object type */
- byte sval; /* Object sub type */
+ STR_OFFSET name; /*!< ベースアイテム名参照のためのネームバッファオフセット値 / Name (offset) */
+ STR_OFFSET text; /*!< 解説テキスト参照のためのネームバッファオフセット値 / Text (offset) */
+ STR_OFFSET flavor_name; /*!< 未確定名参照のためのネームバッファオフセット値 / Flavor name (offset) */
- s16b pval; /* Object extra info */
+ OBJECT_TYPE_VALUE tval; /*!< ベースアイテム種別の大項目値 Object type */
+ OBJECT_SUBTYPE_VALUE sval; /*!< ベースアイテム種別の小項目値 Object sub type */
- s16b to_h; /* Bonus to hit */
- s16b to_d; /* Bonus to damage */
- s16b to_a; /* Bonus to armor */
+ PARAMETER_VALUE pval; /*!< ベースアイテムのpval(能力修正共通値) Object extra info */
- s16b ac; /* Base armor */
+ HIT_PROB to_h; /*!< ベースアイテムの命中修正値 / Bonus to hit */
+ HIT_POINT to_d; /*!< ベースアイテムのダメージ修正値 / Bonus to damage */
+ ARMOUR_CLASS to_a; /*!< ベースアイテムのAC修正値 / Bonus to armor */
- byte dd, ds; /* Damage dice/sides */
+ ARMOUR_CLASS ac; /*!< ベースアイテムのAC基本値 / Base armor */
- s16b weight; /* Weight */
+ DICE_NUMBER dd;
+ DICE_SID ds; /*!< ダメージダイスの数と大きさ / Damage dice/sides */
- s32b cost; /* Object "base cost" */
+ WEIGHT weight; /*!< ベースアイテムの重量 / Weight */
- u32b flags[TR_FLAG_SIZE]; /* Flags */
+ PRICE cost; /*!< ベースアイテムの基本価値 / Object "base cost" */
- u32b gen_flags; /* flags for generate */
+ BIT_FLAGS flags[TR_FLAG_SIZE]; /*!< ベースアイテムの基本特性ビット配列 / Flags */
- byte locale[4]; /* Allocation level(s) */
- byte chance[4]; /* Allocation chance(s) */
+ BIT_FLAGS gen_flags; /*!< ベースアイテムの生成特性ビット配列 / flags for generate */
- byte level; /* Level */
- byte extra; /* Something */
+ DEPTH locale[4]; /*!< ベースアイテムの生成階テーブル / Allocation level(s) */
+ PROB chance[4]; /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */
+ DEPTH level; /*!< ベースアイテムの基本生成階 / Level */
+ BIT_FLAGS8 extra; /*!< その他色々のビットフラグ配列 / Something */
- byte d_attr; /* Default object attribute */
- byte d_char; /* Default object character */
+ TERM_COLOR d_attr; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
+ SYMBOL_CODE d_char; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */
+ TERM_COLOR x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */
+ SYMBOL_CODE x_char; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */
- byte x_attr; /* Desired object attribute */
- byte x_char; /* Desired object character */
+ IDX flavor; /*!< 調査中(TODO) / Special object flavor (or zero) */
+ bool easy_know; /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */
- s16b flavor; /* Special object flavor (or zero) */
+ bool aware; /*!< ベースアイテムが鑑定済かどうか / The player is "aware" of the item's effects */
- bool easy_know; /* This object is always known (if aware) */
+ bool tried; /*!< ベースアイテムを未鑑定のまま試したことがあるか / The player has "tried" one of the items */
-
- bool aware; /* The player is "aware" of the item's effects */
-
- bool tried; /* The player has "tried" one of the items */
+ ACTIVATION_IDX act_idx; /*!< 発動能力のID / Activative ability index */
};
-/*
- * Information about "artifacts".
- *
- * Note that the save-file only writes "cur_num" to the savefile.
- *
- * Note that "max_num" is always "1" (if that artifact "exists")
- */
-
typedef struct artifact_type artifact_type;
+/*!
+ * @struct artifact_type
+ * @brief 固定アーティファクト情報の構造体 / Artifact structure.
+ * @details
+ * @note
+ * the save-file only writes "cur_num" to the savefile.
+ * "max_num" is always "1" (if that artifact "exists")
+ */
struct artifact_type
{
- u32b name; /* Name (offset) */
- u32b text; /* Text (offset) */
+ STR_OFFSET name; /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
+ STR_OFFSET text; /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
+
+ OBJECT_TYPE_VALUE tval; /*!< ベースアイテム大項目ID / Artifact type */
+ OBJECT_SUBTYPE_VALUE sval; /*!< ベースアイテム小項目ID / Artifact sub type */
- byte tval; /* Artifact type */
- byte sval; /* Artifact sub type */
+ PARAMETER_VALUE pval; /*!< pval修正値 / Artifact extra info */
- s16b pval; /* Artifact extra info */
+ HIT_PROB to_h; /*!< 命中ボーナス値 / Bonus to hit */
+ HIT_POINT to_d; /*!< ダメージボーナス値 / Bonus to damage */
+ ARMOUR_CLASS to_a; /*!< ACボーナス値 / Bonus to armor */
- s16b to_h; /* Bonus to hit */
- s16b to_d; /* Bonus to damage */
- s16b to_a; /* Bonus to armor */
+ ARMOUR_CLASS ac; /*!< 上書きベースAC値 / Base armor */
- s16b ac; /* Base armor */
+ DICE_NUMBER dd;
+ DICE_SID ds; /*!< ダイス値 / Damage when hits */
- byte dd, ds; /* Damage when hits */
+ WEIGHT weight; /*!< 重量 / Weight */
- s16b weight; /* Weight */
+ PRICE cost; /*!< 基本価格 / Artifact "cost" */
- s32b cost; /* Artifact "cost" */
+ BIT_FLAGS flags[TR_FLAG_SIZE]; /*! アイテムフラグ / Artifact Flags */
- u32b flags[TR_FLAG_SIZE]; /* Artifact Flags */
+ BIT_FLAGS gen_flags; /*! アイテム生成フラグ / flags for generate */
- u32b gen_flags; /* flags for generate */
+ DEPTH level; /*! 基本生成階 / Artifact level */
+ RARITY rarity; /*! レアリティ / Artifact rarity */
- byte level; /* Artifact level */
- byte rarity; /* Artifact rarity */
+ byte cur_num; /*! 現在の生成数 / Number created (0 or 1) */
+ byte max_num; /*! (未使用)最大生成数 / Unused (should be "1") */
- byte cur_num; /* Number created (0 or 1) */
- byte max_num; /* Unused (should be "1") */
+ FLOOR_IDX floor_id; /*! アイテムを落としたフロアのID / Leaved on this location last time */
- s16b floor_id; /* Leaved on this location last time */
+ byte act_idx; /*! 発動能力ID / Activative ability index */
};
struct ego_item_type
{
- u32b name; /* Name (offset) */
- u32b text; /* Text (offset) */
+ STR_OFFSET name; /* Name (offset) */
+ STR_OFFSET text; /* Text (offset) */
- byte slot; /* Standard slot value */
- byte rating; /* Rating boost */
+ INVENTORY_IDX slot; /*!< 装備部位 / Standard slot value */
+ PRICE rating; /*!< ベースアイテムからの価値加速 / Rating boost */
- byte level; /* Minimum level */
- byte rarity; /* Object rarity */
+ DEPTH level; /* Minimum level */
+ RARITY rarity; /* Object rarity */
- byte max_to_h; /* Maximum to-hit bonus */
- byte max_to_d; /* Maximum to-dam bonus */
- byte max_to_a; /* Maximum to-ac bonus */
+ HIT_PROB max_to_h; /* Maximum to-hit bonus */
+ HIT_POINT max_to_d; /* Maximum to-dam bonus */
+ ARMOUR_CLASS max_to_a; /* Maximum to-ac bonus */
- byte max_pval; /* Maximum pval */
+ PARAMETER_VALUE max_pval; /* Maximum pval */
- s32b cost; /* Ego-item "cost" */
+ PRICE cost; /* Ego-item "cost" */
- u32b flags[TR_FLAG_SIZE]; /* Ego-Item Flags */
+ BIT_FLAGS flags[TR_FLAG_SIZE]; /* Ego-Item Flags */
+ BIT_FLAGS gen_flags; /* flags for generate */
- u32b gen_flags; /* flags for generate */
+ IDX act_idx; /* Activative ability index */
};
struct monster_blow
{
- byte method;
- byte effect;
- byte d_dice;
- byte d_side;
+ BLOW_METHOD method;
+ BLOW_EFFECT effect;
+ DICE_NUMBER d_dice;
+ DICE_SID d_side;
};
struct monster_race
{
- u32b name; /* Name (offset) */
+ STR_OFFSET name; /*!< 名前データのオフセット(日本語) / Name offset(Japanese) */
#ifdef JP
- u32b E_name; /* ±Ñ¸ì̾ (offset) */
+ STR_OFFSET E_name; /*!< 名前データのオフセット(英語) / Name offset(English) */
#endif
- u32b text; /* Text (offset) */
+ STR_OFFSET text; /*!< 思い出テキストのオフセット / Lore text offset */
- byte hdice; /* Creatures hit dice count */
- byte hside; /* Creatures hit dice sides */
+ DICE_NUMBER hdice; /*!< HPのダイス数 / Creatures hit dice count */
+ DICE_SID hside; /*!< HPのダイス面数 / Creatures hit dice sides */
- s16b ac; /* Armour Class */
+ ARMOUR_CLASS ac; /*!< アーマークラス / Armour Class */
- s16b sleep; /* Inactive counter (base) */
- byte aaf; /* Area affect radius (1-100) */
- byte speed; /* Speed (normally 110) */
+ SLEEP_DEGREE sleep; /*!< 睡眠値 / Inactive counter (base) */
+ POSITION aaf; /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
+ SPEED speed; /*!< 加速(110で+0) / Speed (normally 110) */
- s32b mexp; /* Exp value for kill */
+ EXP mexp; /*!< 殺害時基本経験値 / Exp value for kill */
- s16b extra; /* Unused (for now) */
+ BIT_FLAGS16 extra; /*!< 未使用 / Unused (for now) */
- byte freq_spell; /* Spell frequency */
+ RARITY freq_spell; /*!< 魔法&特殊能力仕様頻度(1/n) / Spell frequency */
- u32b flags1; /* Flags 1 (general) */
- u32b flags2; /* Flags 2 (abilities) */
- u32b flags3; /* Flags 3 (race/resist) */
- u32b flags4; /* Flags 4 (inate/breath) */
- u32b flags5; /* Flags 5 (normal spells) */
- u32b flags6; /* Flags 6 (special spells) */
- u32b flags7; /* Flags 7 (movement related abilities) */
- u32b flags8; /* Flags 8 (wilderness info) */
- u32b flags9; /* Flags 9 (drops info) */
- u32b flagsr; /* Flags R (resistances info) */
+ BIT_FLAGS flags1; /* Flags 1 (general) */
+ BIT_FLAGS flags2; /* Flags 2 (abilities) */
+ BIT_FLAGS flags3; /* Flags 3 (race/resist) */
+ BIT_FLAGS flags4; /* Flags 4 (inate/breath) */
+ BIT_FLAGS flags7; /* Flags 7 (movement related abilities) */
+ BIT_FLAGS flags8; /* Flags 8 (wilderness info) */
+ BIT_FLAGS flags9; /* Flags 9 (drops info) */
+ BIT_FLAGS flagsr; /* Flags R (resistances info) */
- monster_blow blow[4]; /* Up to four blows per round */
+ BIT_FLAGS a_ability_flags1; /* Activate Ability Flags 5 (normal spells) */
+ BIT_FLAGS a_ability_flags2; /* Activate Ability Flags 6 (special spells) */
+ BIT_FLAGS a_ability_flags3; /* Activate Ability Flags 7 (implementing) */
+ BIT_FLAGS a_ability_flags4; /* Activate Ability Flags 8 (implementing) */
- s16b next_r_idx;
- u32b next_exp;
+ monster_blow blow[4]; /* Up to four blows per round */
+ MONRACE_IDX reinforce_id[6];
+ DICE_NUMBER reinforce_dd[6];
+ DICE_SID reinforce_ds[6];
- byte level; /* Level of creature */
- byte rarity; /* Rarity of creature */
+ ARTIFACT_IDX artifact_id[4]; /* 特定アーティファクトドロップID */
+ RARITY artifact_rarity[4]; /* 特定アーティファクトレア度 */
+ PERCENTAGE artifact_percent[4]; /* 特定アーティファクトドロップ率 */
+ PERCENTAGE arena_ratio; /* アリーナの評価修正値(%基準 / 0=100%) / Arena */
- byte d_attr; /* Default monster attribute */
- byte d_char; /* Default monster character */
+ MONRACE_IDX next_r_idx;
+ EXP next_exp;
+ DEPTH level; /* Level of creature */
+ RARITY rarity; /* Rarity of creature */
- byte x_attr; /* Desired monster attribute */
- byte x_char; /* Desired monster character */
+ TERM_COLOR d_attr; /* Default monster attribute */
+ SYMBOL_CODE d_char; /* Default monster character */
+ TERM_COLOR x_attr; /* Desired monster attribute */
+ SYMBOL_CODE x_char; /* Desired monster character */
- byte max_num; /* Maximum population allowed per level */
- byte cur_num; /* Monster population on current level */
+ MONSTER_NUMBER max_num; /* Maximum population allowed per level */
+ MONSTER_NUMBER cur_num; /* Monster population on current level */
- s16b floor_id; /* Location of unique monster */
+ FLOOR_IDX floor_id; /* Location of unique monster */
- s16b r_sights; /* Count sightings of this monster */
- s16b r_deaths; /* Count deaths from this monster */
+ MONSTER_NUMBER r_sights; /* Count sightings of this monster */
+ MONSTER_NUMBER r_deaths; /* Count deaths from this monster */
- s16b r_pkills; /* Count monsters killed in this life */
- s16b r_tkills; /* Count monsters killed in all lives */
+ MONSTER_NUMBER r_pkills; /* Count visible monsters killed in this life */
+ MONSTER_NUMBER r_akills; /* Count all monsters killed in this life */
+ MONSTER_NUMBER r_tkills; /* Count monsters killed in all lives */
byte r_wake; /* Number of times woken up (?) */
byte r_ignore; /* Number of times ignored (?) */
byte r_xtra1; /* Something (unused) */
byte r_xtra2; /* Something (unused) */
- byte r_drop_gold; /* Max number of gold dropped at once */
- byte r_drop_item; /* Max number of item dropped at once */
+ ITEM_NUMBER r_drop_gold; /*!< これまでに撃破時に落とした財宝の数 / Max number of gold dropped at once */
+ ITEM_NUMBER r_drop_item; /*!< これまでに撃破時に落としたアイテムの数 / Max number of item dropped at once */
byte r_cast_spell; /* Max number of other spells seen */
u32b r_flags4; /* Observed racial flags */
u32b r_flags5; /* Observed racial flags */
u32b r_flags6; /* Observed racial flags */
- /* u32b r_flags7; */ /* Observed racial flags */
+ /* u32b r_flags7; */ /* Observed racial flags */
u32b r_flagsr; /* Observed racial resistance flags */
};
struct vault_type
{
- u32b name; /* Name (offset) */
- u32b text; /* Text (offset) */
-
- byte typ; /* Vault type */
+ STR_OFFSET name; /* Name (offset) */
+ STR_OFFSET text; /* Text (offset) */
- byte rat; /* Vault rating */
-
- byte hgt; /* Vault height */
- byte wid; /* Vault width */
+ ROOM_IDX typ; /* Vault type */
+ PROB rat; /* Vault rating (unused) */
+ POSITION hgt; /* Vault height */
+ POSITION wid; /* Vault width */
};
struct skill_table
{
- s16b w_start[5][64]; /* start weapon exp */
- s16b w_max[5][64]; /* max weapon exp */
- s16b s_start[10]; /* start skill */
- s16b s_max[10]; /* max skill */
+ SUB_EXP w_start[5][64]; /* start weapon exp */
+ SUB_EXP w_max[5][64]; /* max weapon exp */
+ SUB_EXP s_start[10]; /* start skill */
+ SUB_EXP s_max[10]; /* max skill */
};
struct cave_type
{
- u16b info; /* Hack -- cave flags */
-
- s16b feat; /* Hack -- feature type */
-
- s16b o_idx; /* Object in this grid */
+ BIT_FLAGS info; /* Hack -- cave flags */
- s16b m_idx; /* Monster in this grid */
+ FEAT_IDX feat; /* Hack -- feature type */
+ OBJECT_IDX o_idx; /* Object in this grid */
+ MONSTER_IDX m_idx; /* Monster in this grid */
- s16b special; /* Special cave info */
+ /*! 地形の特別な情報を保存する / Special cave info
+ * 具体的な使用一覧はクエスト行き階段の移行先クエストID、
+ * 各ダンジョン入口の移行先ダンジョンID、
+ *
+ */
+ s16b special;
- s16b mimic; /* Feature to mimic */
+ FEAT_IDX mimic; /* Feature to mimic */
byte cost; /* Hack -- cost of flowing */
byte dist; /* Hack -- distance from player */
struct coord
{
- byte y;
- byte x;
+ POSITION y;
+ POSITION x;
};
struct object_type
{
- s16b k_idx; /* Kind index (zero if "dead") */
+ KIND_OBJECT_IDX k_idx; /* Kind index (zero if "dead") */
- byte iy; /* Y-position on map, or zero */
- byte ix; /* X-position on map, or zero */
+ POSITION iy; /* Y-position on map, or zero */
+ POSITION ix; /* X-position on map, or zero */
- byte tval; /* Item type (from kind) */
- byte sval; /* Item sub-type (from kind) */
+ OBJECT_TYPE_VALUE tval; /* Item type (from kind) */
+ OBJECT_SUBTYPE_VALUE sval; /* Item sub-type (from kind) */
- s16b pval; /* Item extra-parameter */
+ PARAMETER_VALUE pval; /* Item extra-parameter */
- byte discount; /* Discount (if any) */
+ DISCOUNT_RATE discount; /* Discount (if any) */
- byte number; /* Number of items */
+ ITEM_NUMBER number; /* Number of items */
- s16b weight; /* Item weight */
+ WEIGHT weight; /* Item weight */
- byte name1; /* Artifact type, if any */
- byte name2; /* Ego-Item type, if any */
+ ARTIFACT_IDX name1; /* Artifact type, if any */
+ EGO_IDX name2; /* Ego-Item type, if any */
- byte xtra1; /* Extra info type (now unused) */
- byte xtra2; /* Extra info index */
- byte xtra3; /* Extra info */
- s16b xtra4; /* Extra info */
- s16b xtra5; /* Extra info */
+ XTRA8 xtra1; /* Extra info type (now unused) */
+ XTRA8 xtra2; /* Extra info activation index */
+ XTRA8 xtra3; /* Extra info for weaponsmith */
+ XTRA16 xtra4; /*!< 光源の残り寿命、あるいは捕らえたモンスターの現HP / Extra info fuel or captured monster's current HP */
+ XTRA16 xtra5; /*!< 捕らえたモンスターの最大HP / Extra info captured monster's max HP */
- s16b to_h; /* Plusses to hit */
- s16b to_d; /* Plusses to damage */
- s16b to_a; /* Plusses to AC */
+ HIT_PROB to_h; /* Plusses to hit */
+ HIT_POINT to_d; /* Plusses to damage */
+ ARMOUR_CLASS to_a; /* Plusses to AC */
- s16b ac; /* Normal AC */
+ ARMOUR_CLASS ac; /* Normal AC */
- byte dd, ds; /* Damage dice/sides */
+ DICE_NUMBER dd;
+ DICE_SID ds; /* Damage dice/sides */
- s16b timeout; /* Timeout Counter */
+ TIME_EFFECT timeout; /* Timeout Counter */
byte ident; /* Special flags */
-
byte marked; /* Object is marked */
u16b inscription; /* Inscription index */
byte feeling; /* Game generated inscription number (eg, pseudo-id) */
- u32b art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
-
- u32b curse_flags; /* Flags for curse */
+ BIT_FLAGS art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
+ BIT_FLAGS curse_flags; /* Flags for curse */
- s16b next_o_idx; /* Next object in stack (if any) */
+ OBJECT_IDX next_o_idx; /* Next object in stack (if any) */
+ MONSTER_IDX held_m_idx; /* Monster holding us (if any) */
- s16b held_m_idx; /* Monster holding us (if any) */
+ ARTIFACT_BIAS_IDX artifact_bias; /*!< ランダムアーティファクト生成時のバイアスID */
};
/*
* Monster information, for a specific monster.
- *
* Note: fy, fx constrain dungeon size to 256x256
- *
* The "hold_o_idx" field points to the first object of a stack
* of objects (if any) being carried by the monster (see above).
*/
struct monster_type
{
- s16b r_idx; /* Monster race index */
- s16b ap_r_idx; /* Monster race appearance index */
+ MONRACE_IDX r_idx; /* Monster race index */
+ MONRACE_IDX ap_r_idx; /* Monster race appearance index */
byte sub_align; /* Sub-alignment for a neutral monster */
- byte fy; /* Y location on map */
- byte fx; /* X location on map */
+ POSITION fy; /* Y location on map */
+ POSITION fx; /* X location on map */
- s16b hp; /* Current Hit points */
- s16b maxhp; /* Max Hit points */
- s16b max_maxhp; /* Max Max Hit points */
+ HIT_POINT hp; /* Current Hit points */
+ HIT_POINT maxhp; /* Max Hit points */
+ HIT_POINT max_maxhp; /* Max Max Hit points */
+ HIT_POINT dealt_damage; /* Sum of damages dealt by player */
- s16b mtimed[MAX_MTIMED]; /* Timed status counter */
- s16b mproc_idx[MAX_MTIMED];
+ TIME_EFFECT mtimed[MAX_MTIMED]; /* Timed status counter */
- byte mspeed; /* Monster "speed" */
- s16b energy_need; /* Monster "energy" */
+ SPEED mspeed; /* Monster "speed" */
+ ACTION_ENERGY energy_need; /* Monster "energy" */
- byte cdis; /* Current dis from player */
+ POSITION cdis; /* Current dis from player */
- byte mflag; /* Extra monster flags */
- byte mflag2; /* Extra monster flags */
+ BIT_FLAGS8 mflag; /* Extra monster flags */
+ BIT_FLAGS8 mflag2; /* Extra monster flags */
bool ml; /* Monster is "visible" */
- s16b hold_o_idx; /* Object being held (if any) */
-
- s16b target_y; /* Can attack !los player */
- s16b target_x; /* Can attack !los player */
-
- u16b nickname; /* Monster's Nickname */
-
- u32b exp;
-
- u32b smart; /* Field for "smart_learn" */
-
- s16b parent_m_idx;
+ OBJECT_IDX hold_o_idx; /* Object being held (if any) */
+
+ POSITION target_y; /* Can attack !los player */
+ POSITION target_x; /* Can attack !los player */
+
+ STR_OFFSET nickname; /* Monster's Nickname */
+
+ EXP exp;
+
+ /* TODO: クローン、ペット、有効化は意義が異なるので別変数に切り離すこと。save/loadのバージョン更新が面倒そうだけど */
+ BIT_FLAGS smart; /*!< Field for "smart_learn" - Some bit-flags for the "smart" field */
+ #define SM_RES_ACID 0x00000001 /*!< モンスターの学習フラグ: プレイヤーに酸耐性あり */
+ #define SM_RES_ELEC 0x00000002 /*!< モンスターの学習フラグ: プレイヤーに電撃耐性あり */
+ #define SM_RES_FIRE 0x00000004 /*!< モンスターの学習フラグ: プレイヤーに火炎耐性あり */
+ #define SM_RES_COLD 0x00000008 /*!< モンスターの学習フラグ: プレイヤーに冷気耐性あり */
+ #define SM_RES_POIS 0x00000010 /*!< モンスターの学習フラグ: プレイヤーに毒耐性あり */
+ #define SM_RES_NETH 0x00000020 /*!< モンスターの学習フラグ: プレイヤーに地獄耐性あり */
+ #define SM_RES_LITE 0x00000040 /*!< モンスターの学習フラグ: プレイヤーに閃光耐性あり */
+ #define SM_RES_DARK 0x00000080 /*!< モンスターの学習フラグ: プレイヤーに暗黒耐性あり */
+ #define SM_RES_FEAR 0x00000100 /*!< モンスターの学習フラグ: プレイヤーに恐怖耐性あり */
+ #define SM_RES_CONF 0x00000200 /*!< モンスターの学習フラグ: プレイヤーに混乱耐性あり */
+ #define SM_RES_CHAOS 0x00000400 /*!< モンスターの学習フラグ: プレイヤーにカオス耐性あり */
+ #define SM_RES_DISEN 0x00000800 /*!< モンスターの学習フラグ: プレイヤーに劣化耐性あり */
+ #define SM_RES_BLIND 0x00001000 /*!< モンスターの学習フラグ: プレイヤーに盲目耐性あり */
+ #define SM_RES_NEXUS 0x00002000 /*!< モンスターの学習フラグ: プレイヤーに因果混乱耐性あり */
+ #define SM_RES_SOUND 0x00004000 /*!< モンスターの学習フラグ: プレイヤーに轟音耐性あり */
+ #define SM_RES_SHARD 0x00008000 /*!< モンスターの学習フラグ: プレイヤーに破片耐性あり */
+ #define SM_OPP_ACID 0x00010000 /*!< モンスターの学習フラグ: プレイヤーに二重酸耐性あり */
+ #define SM_OPP_ELEC 0x00020000 /*!< モンスターの学習フラグ: プレイヤーに二重電撃耐性あり */
+ #define SM_OPP_FIRE 0x00040000 /*!< モンスターの学習フラグ: プレイヤーに二重火炎耐性あり */
+ #define SM_OPP_COLD 0x00080000 /*!< モンスターの学習フラグ: プレイヤーに二重冷気耐性あり */
+ #define SM_OPP_POIS 0x00100000 /*!< モンスターの学習フラグ: プレイヤーに二重毒耐性あり */
+ #define SM_OPP_XXX1 0x00200000 /*!< 未使用 / (unused) */
+ #define SM_CLONED 0x00400000 /*!< クローンである / Cloned */
+ #define SM_PET 0x00800000 /*!< ペットである / Pet */
+ #define SM_IMM_ACID 0x01000000 /*!< モンスターの学習フラグ: プレイヤーに酸免疫あり */
+ #define SM_IMM_ELEC 0x02000000 /*!< モンスターの学習フラグ: プレイヤーに電撃免疫あり */
+ #define SM_IMM_FIRE 0x04000000 /*!< モンスターの学習フラグ: プレイヤーに火炎免疫あり */
+ #define SM_IMM_COLD 0x08000000 /*!< モンスターの学習フラグ: プレイヤーに冷気免疫あり */
+ #define SM_FRIENDLY 0x10000000 /*!< 友好的である / Friendly */
+ #define SM_IMM_REFLECT 0x20000000 /*!< モンスターの学習フラグ: プレイヤーに反射あり */
+ #define SM_IMM_FREE 0x40000000 /*!< モンスターの学習フラグ: プレイヤーに麻痺耐性あり */
+ #define SM_IMM_MANA 0x80000000 /*!< モンスターの学習フラグ: プレイヤーにMPがない */
+
+ MONSTER_IDX parent_m_idx;
};
struct alloc_entry
{
- s16b index; /* The actual index */
+ KIND_OBJECT_IDX index; /* The actual index */
- byte level; /* Base dungeon level */
- byte prob1; /* Probability, pass 1 */
- byte prob2; /* Probability, pass 2 */
- byte prob3; /* Probability, pass 3 */
+ DEPTH level; /* Base dungeon level */
+ PROB prob1; /* Probability, pass 1 */
+ PROB prob2; /* Probability, pass 2 */
+ PROB prob3; /* Probability, pass 3 */
u16b total; /* Unused for now */
};
byte o_set;
byte o_bit;
- cptr o_text;
- cptr o_desc;
+ concptr o_text;
+ concptr o_desc;
};
-/*
- * Structure for the "quests"
- */
typedef struct quest_type quest_type;
+/*!
+ * @struct quest_type
+ * @brief クエスト情報の構造体 / Structure for the "quests".
+ */
+
struct quest_type
{
- s16b status; /* Is the quest taken, completed, finished? */
-
- s16b type; /* The quest type */
+ QUEST_STATUS status; /*!< クエストの進行ステータス / Is the quest taken, completed, finished? */
+ QUEST_TYPE type; /*!< クエストの種別 / The quest type */
- char name[60]; /* Quest name */
- s16b level; /* Dungeon level */
- s16b r_idx; /* Monster race */
+ GAME_TEXT name[60]; /*!< クエスト名 / Quest name */
+ DEPTH level; /*!< 処理階層 / Dungeon level */
+ MONRACE_IDX r_idx; /*!< クエスト対象のモンスターID / Monster race */
- s16b cur_num; /* Number killed */
- s16b max_num; /* Number required */
+ MONSTER_NUMBER cur_num; /*!< 撃破したモンスターの数 / Number killed */
+ MONSTER_NUMBER max_num; /*!< 求められるモンスターの撃破数 / Number required */
- s16b k_idx; /* object index */
- s16b num_mon; /* number of monsters on level */
+ KIND_OBJECT_IDX k_idx; /*!< クエスト対象のアイテムID / object index */
+ MONSTER_NUMBER num_mon; /*!< QUEST_TYPE_KILL_NUMBER時の目標撃破数 number of monsters on level */
- byte flags; /* quest flags */
- byte dungeon; /* quest dungeon */
+ BIT_FLAGS flags; /*!< クエストに関するフラグビット / quest flags */
+ DUNGEON_IDX dungeon; /*!< クエスト対象のダンジョンID / quest dungeon */
- byte complev; /* player level (complete) */
+ PLAYER_LEVEL complev; /*!< クリア時プレイヤーレベル / player level (complete) */
+ REAL_TIME comptime; /*!< クリア時ゲーム時間 / quest clear time*/
};
struct owner_type
{
- cptr owner_name; /* Name */
-
- s16b max_cost; /* Purse limit */
-
+ concptr owner_name; /* Name */
+ PRICE max_cost; /* Purse limit */
byte max_inflate; /* Inflation (max) */
byte min_inflate; /* Inflation (min) */
-
byte haggle_per; /* Haggle unit */
-
byte insult_max; /* Insult limit */
-
byte owner_race; /* Owner race */
};
struct magic_type
{
- byte slevel; /* Required level (to learn) */
- byte smana; /* Required mana (to cast) */
- byte sfail; /* Minimum chance of failure */
- byte sexp; /* Encoded experience bonus */
+ PLAYER_LEVEL slevel; /* Required level (to learn) */
+ MANA_POINT smana; /* Required mana (to cast) */
+ PERCENTAGE sfail; /* Minimum chance of failure */
+ EXP sexp; /* Encoded experience bonus */
};
struct player_magic
{
- int spell_book; /* Tval of spell books (if any) */
+ OBJECT_TYPE_VALUE spell_book; /* Tval of spell books (if any) */
int spell_xtra; /* Something for later */
int spell_stat; /* Stat for spells (if any) */
struct player_sex
{
- cptr title; /* Type of sex */
- cptr winner; /* Name of winner */
+ concptr title; /* Type of sex */
+ concptr winner; /* Name of winner */
#ifdef JP
- cptr E_title; /* ±Ñ¸ìÀÊÌ */
- cptr E_winner; /* ±Ñ¸ìÀÊÌ */
+ concptr E_title; /* 英語性別 */
+ concptr E_winner; /* 英語性別 */
#endif
};
struct player_race
{
- cptr title; /* Type of race */
+ concptr title; /* Type of race */
#ifdef JP
- cptr E_title; /* ±Ñ¸ì¼ï² */
+ concptr E_title; /* 英語種族 */
#endif
s16b r_adj[6]; /* Racial stat bonuses */
struct player_class
{
- cptr title; /* Type of class */
+ concptr title; /* Type of class */
#ifdef JP
- cptr E_title; /* ±Ñ¸ì¿¦¶È */
+ concptr E_title; /* 英語職業 */
#endif
s16b c_adj[6]; /* Class stat modifier */
typedef struct player_seikaku player_seikaku;
struct player_seikaku
{
- cptr title; /* Type of seikaku */
+ concptr title; /* Type of seikaku */
#ifdef JP
- cptr E_title; /* ±Ñ¸ìÀ³Ê */
+ concptr E_title; /* 英語性格 */
#endif
s16b a_adj[6]; /* seikaku stat bonuses */
s16b a_mhp; /* Race hit-dice modifier */
- byte no; /* ¤Î */
+ byte no; /* の */
byte sex; /* seibetu seigen */
};
struct player_type
{
- s16b oldpy; /* Previous player location -KMW- */
- s16b oldpx; /* Previous player location -KMW- */
-
- byte psex; /* Sex index */
- byte prace; /* Race index */
- byte pclass; /* Class index */
- byte pseikaku; /* Seikaku index */
- byte realm1; /* First magic realm */
- byte realm2; /* Second magic realm */
- byte oops; /* Unused */
-
- byte hitdie; /* Hit dice (sides) */
- u16b expfact; /* Experience factor
- * Note: was byte, causing overflow for Amberite
- * characters (such as Amberite Paladins)
- */
+ POSITION oldpy; /* Previous player location -KMW- */
+ POSITION oldpx; /* Previous player location -KMW- */
+
+ SEX_IDX psex; /* Sex index */
+ RACE_IDX prace; /* Race index */
+ CLASS_IDX pclass; /* Class index */
+ CHARACTER_IDX pseikaku; /* Seikaku index */
+ REALM_IDX realm1; /* First magic realm */
+ REALM_IDX realm2; /* Second magic realm */
+ CHARACTER_IDX oops; /* Unused */
+
+ DICE_SID hitdie; /* Hit dice (sides) */
+ u16b expfact; /* Experience factor
+ * Note: was byte, causing overflow for Amberite
+ * characters (such as Amberite Paladins)
+ */
s16b age; /* Characters age */
s16b ht; /* Height */
s16b wt; /* Weight */
s16b sc; /* Social Class */
+ PRICE au; /* Current Gold */
- s32b au; /* Current Gold */
-
- s32b max_max_exp; /* Max max experience (only to calculate score) */
- s32b max_exp; /* Max experience */
- s32b exp; /* Cur experience */
+ EXP max_max_exp; /* Max max experience (only to calculate score) */
+ EXP max_exp; /* Max experience */
+ EXP exp; /* Cur experience */
u32b exp_frac; /* Cur exp frac (times 2^16) */
- s16b lev; /* Level */
+ PLAYER_LEVEL lev; /* Level */
s16b town_num; /* Current town number */
s16b arena_number; /* monster number in arena -KMW- */
bool inside_arena; /* Is character inside arena? */
- s16b inside_quest; /* Inside quest level */
+ QUEST_IDX inside_quest; /* Inside quest level */
bool inside_battle; /* Is character inside tougijou? */
- s32b wilderness_x; /* Coordinates in the wilderness */
- s32b wilderness_y;
+ POSITION wilderness_x; /* Coordinates in the wilderness */
+ POSITION wilderness_y;
bool wild_mode;
- s32b mhp; /* Max hit pts */
- s32b chp; /* Cur hit pts */
+ HIT_POINT mhp; /* Max hit pts */
+ HIT_POINT chp; /* Cur hit pts */
u32b chp_frac; /* Cur hit frac (times 2^16) */
- s32b msp; /* Max mana pts */
- s32b csp; /* Cur mana pts */
+ MANA_POINT msp; /* Max mana pts */
+ MANA_POINT csp; /* Cur mana pts */
u32b csp_frac; /* Cur mana frac (times 2^16) */
s16b max_plv; /* Max Player Level */
- s16b stat_max[6]; /* Current "maximal" stat values */
- s16b stat_max_max[6]; /* Maximal "maximal" stat values */
- s16b stat_cur[6]; /* Current "natural" stat values */
+ BASE_STATUS stat_max[6]; /* Current "maximal" stat values */
+ BASE_STATUS stat_max_max[6]; /* Maximal "maximal" stat values */
+ BASE_STATUS stat_cur[6]; /* Current "natural" stat values */
s16b learned_spells;
s16b add_spells;
u32b count;
- s16b fast; /* Timed -- Fast */
- s16b slow; /* Timed -- Slow */
- s16b blind; /* Timed -- Blindness */
- s16b paralyzed; /* Timed -- Paralysis */
- s16b confused; /* Timed -- Confusion */
- s16b afraid; /* Timed -- Fear */
- s16b image; /* Timed -- Hallucination */
- s16b poisoned; /* Timed -- Poisoned */
- s16b cut; /* Timed -- Cut */
- s16b stun; /* Timed -- Stun */
-
- s16b protevil; /* Timed -- Protection */
- s16b invuln; /* Timed -- Invulnerable */
- s16b ult_res; /* Timed -- Ultimate Resistance */
- s16b hero; /* Timed -- Heroism */
- s16b shero; /* Timed -- Super Heroism */
- s16b shield; /* Timed -- Shield Spell */
- s16b blessed; /* Timed -- Blessed */
- s16b tim_invis; /* Timed -- See Invisible */
- s16b tim_infra; /* Timed -- Infra Vision */
- s16b tsuyoshi; /* Timed -- Tsuyoshi Special */
- s16b ele_attack; /* Timed -- Elemental Attack */
- s16b ele_immune; /* Timed -- Elemental Immune */
-
- s16b oppose_acid; /* Timed -- oppose acid */
- s16b oppose_elec; /* Timed -- oppose lightning */
- s16b oppose_fire; /* Timed -- oppose heat */
- s16b oppose_cold; /* Timed -- oppose cold */
- s16b oppose_pois; /* Timed -- oppose poison */
-
-
- s16b tim_esp; /* Timed ESP */
- s16b wraith_form; /* Timed wraithform */
-
- s16b resist_magic; /* Timed Resist Magic (later) */
- s16b tim_regen;
- s16b kabenuke;
- s16b tim_stealth;
- s16b tim_levitation;
- s16b tim_sh_touki;
- s16b lightspeed;
- s16b tsubureru;
- s16b magicdef;
- s16b tim_res_nether; /* Timed -- Nether resistance */
- s16b tim_res_time; /* Timed -- Time resistance */
- byte mimic_form;
- s16b tim_mimic;
- s16b tim_sh_fire;
- s16b tim_sh_holy;
- s16b tim_eyeeye;
+ TIME_EFFECT fast; /* Timed -- Fast */
+ TIME_EFFECT slow; /* Timed -- Slow */
+ TIME_EFFECT blind; /* Timed -- Blindness */
+ TIME_EFFECT paralyzed; /* Timed -- Paralysis */
+ TIME_EFFECT confused; /* Timed -- Confusion */
+ TIME_EFFECT afraid; /* Timed -- Fear */
+ TIME_EFFECT image; /* Timed -- Hallucination */
+ TIME_EFFECT poisoned; /* Timed -- Poisoned */
+ TIME_EFFECT cut; /* Timed -- Cut */
+ TIME_EFFECT stun; /* Timed -- Stun */
+
+ TIME_EFFECT protevil; /* Timed -- Protection */
+ TIME_EFFECT invuln; /* Timed -- Invulnerable */
+ TIME_EFFECT ult_res; /* Timed -- Ultimate Resistance */
+ TIME_EFFECT hero; /* Timed -- Heroism */
+ TIME_EFFECT shero; /* Timed -- Super Heroism */
+ TIME_EFFECT shield; /* Timed -- Shield Spell */
+ TIME_EFFECT blessed; /* Timed -- Blessed */
+ TIME_EFFECT tim_invis; /* Timed -- See Invisible */
+ TIME_EFFECT tim_infra; /* Timed -- Infra Vision */
+ TIME_EFFECT tsuyoshi; /* Timed -- Tsuyoshi Special */
+ TIME_EFFECT ele_attack; /* Timed -- Elemental Attack */
+ TIME_EFFECT ele_immune; /* Timed -- Elemental Immune */
+
+ TIME_EFFECT oppose_acid; /* Timed -- oppose acid */
+ TIME_EFFECT oppose_elec; /* Timed -- oppose lightning */
+ TIME_EFFECT oppose_fire; /* Timed -- oppose heat */
+ TIME_EFFECT oppose_cold; /* Timed -- oppose cold */
+ TIME_EFFECT oppose_pois; /* Timed -- oppose poison */
+
+ TIME_EFFECT tim_esp; /* Timed ESP */
+ TIME_EFFECT wraith_form; /* Timed wraithform */
+
+ TIME_EFFECT resist_magic; /* Timed Resist Magic (later) */
+ TIME_EFFECT tim_regen;
+ TIME_EFFECT kabenuke;
+ TIME_EFFECT tim_stealth;
+ TIME_EFFECT tim_levitation;
+ TIME_EFFECT tim_sh_touki;
+ TIME_EFFECT lightspeed;
+ TIME_EFFECT tsubureru;
+ TIME_EFFECT magicdef;
+ TIME_EFFECT tim_res_nether; /* Timed -- Nether resistance */
+ TIME_EFFECT tim_res_time; /* Timed -- Time resistance */
+ MIMIC_RACE_IDX mimic_form;
+ TIME_EFFECT tim_mimic;
+ TIME_EFFECT tim_sh_fire;
+ TIME_EFFECT tim_sh_holy;
+ TIME_EFFECT tim_eyeeye;
/* for mirror master */
- s16b tim_reflect; /* Timed -- Reflect */
- s16b multishadow; /* Timed -- Multi-shadow */
- s16b dustrobe; /* Timed -- Robe of dust */
-
- s16b chaos_patron;
- u32b muta1;
- u32b muta2;
- u32b muta3;
+ TIME_EFFECT tim_reflect; /* Timed -- Reflect */
+ TIME_EFFECT multishadow; /* Timed -- Multi-shadow */
+ TIME_EFFECT dustrobe; /* Timed -- Robe of dust */
+
+ PATRON_IDX chaos_patron;
+
+ BIT_FLAGS muta1; /*!< レイシャル型の変異 / "Activatable" mutations must be in MUT1_* */
+ #define MUT1_SPIT_ACID 0x00000001L /*!< 突然変異: 酸の唾 */
+ #define MUT1_BR_FIRE 0x00000002L /*!< 突然変異: 炎のブレス */
+ #define MUT1_HYPN_GAZE 0x00000004L /*!< 突然変異: 催眠睨み */
+ #define MUT1_TELEKINES 0x00000008L /*!< 突然変異: 念動力 */
+ #define MUT1_VTELEPORT 0x00000010L /*!< 突然変異: テレポート / Voluntary teleport */
+ #define MUT1_MIND_BLST 0x00000020L /*!< 突然変異: 精神攻撃 */
+ #define MUT1_RADIATION 0x00000040L /*!< 突然変異: 放射能 */
+ #define MUT1_VAMPIRISM 0x00000080L /*!< 突然変異: 吸血 */
+ #define MUT1_SMELL_MET 0x00000100L /*!< 突然変異: 金属嗅覚 */
+ #define MUT1_SMELL_MON 0x00000200L /*!< 突然変異: 敵臭嗅覚 */
+ #define MUT1_BLINK 0x00000400L /*!< 突然変異: ショート・テレポート */
+ #define MUT1_EAT_ROCK 0x00000800L /*!< 突然変異: 岩喰い */
+ #define MUT1_SWAP_POS 0x00001000L /*!< 突然変異: 位置交換 */
+ #define MUT1_SHRIEK 0x00002000L /*!< 突然変異: 叫び */
+ #define MUT1_ILLUMINE 0x00004000L /*!< 突然変異: 照明 */
+ #define MUT1_DET_CURSE 0x00008000L /*!< 突然変異: 呪い感知 */
+ #define MUT1_BERSERK 0x00010000L /*!< 突然変異: 狂戦士化 */
+ #define MUT1_POLYMORPH 0x00020000L /*!< 突然変異: 変身 */
+ #define MUT1_MIDAS_TCH 0x00040000L /*!< 突然変異: ミダスの手 */
+ #define MUT1_GROW_MOLD 0x00080000L /*!< 突然変異: カビ発生 */
+ #define MUT1_RESIST 0x00100000L /*!< 突然変異: エレメント耐性 */
+ #define MUT1_EARTHQUAKE 0x00200000L /*!< 突然変異: 地震 */
+ #define MUT1_EAT_MAGIC 0x00400000L /*!< 突然変異: 魔力喰い */
+ #define MUT1_WEIGH_MAG 0x00800000L /*!< 突然変異: 魔力感知 */
+ #define MUT1_STERILITY 0x01000000L /*!< 突然変異: 増殖阻止 */
+ #define MUT1_PANIC_HIT 0x02000000L /*!< 突然変異: ヒットアンドアウェイ */
+ #define MUT1_DAZZLE 0x04000000L /*!< 突然変異: 眩惑 */
+ #define MUT1_LASER_EYE 0x08000000L /*!< 突然変異: レーザー・アイ */
+ #define MUT1_RECALL 0x10000000L /*!< 突然変異: 帰還 */
+ #define MUT1_BANISH 0x20000000L /*!< 突然変異: 邪悪消滅 */
+ #define MUT1_COLD_TOUCH 0x40000000L /*!< 突然変異: 凍結の手 */
+ #define MUT1_LAUNCHER 0x80000000L /*!< 突然変異: アイテム投げ */
+
+ BIT_FLAGS muta2; /*!< 常時効果つきの変異1 / Randomly activating mutations must be MUT2_* */
+ #define MUT2_BERS_RAGE 0x00000001L /*!< 突然変異: 狂戦士化の発作 */
+ #define MUT2_COWARDICE 0x00000002L /*!< 突然変異: 臆病 */
+ #define MUT2_RTELEPORT 0x00000004L /*!< 突然変異: ランダムテレポート / Random teleport, instability */
+ #define MUT2_ALCOHOL 0x00000008L /*!< 突然変異: アルコール分泌 */
+ #define MUT2_HALLU 0x00000010L /*!< 突然変異: 幻覚を引き起こす精神錯乱 */
+ #define MUT2_FLATULENT 0x00000020L /*!< 突然変異: 猛烈な屁 */
+ #define MUT2_SCOR_TAIL 0x00000040L /*!< 突然変異: サソリの尻尾 */
+ #define MUT2_HORNS 0x00000080L /*!< 突然変異: ツノ */
+ #define MUT2_BEAK 0x00000100L /*!< 突然変異: クチバシ */
+ #define MUT2_ATT_DEMON 0x00000200L /*!< 突然変異: デーモンを引き付ける */
+ #define MUT2_PROD_MANA 0x00000400L /*!< 突然変異: 制御できない魔力のエネルギー */
+ #define MUT2_SPEED_FLUX 0x00000800L /*!< 突然変異: ランダムな加減速 */
+ #define MUT2_BANISH_ALL 0x00001000L /*!< 突然変異: ランダムなモンスター消滅 */
+ #define MUT2_EAT_LIGHT 0x00002000L /*!< 突然変異: 光源喰い */
+ #define MUT2_TRUNK 0x00004000L /*!< 突然変異: 象の鼻 */
+ #define MUT2_ATT_ANIMAL 0x00008000L /*!< 突然変異: 動物を引き寄せる */
+ #define MUT2_TENTACLES 0x00010000L /*!< 突然変異: 邪悪な触手 */
+ #define MUT2_RAW_CHAOS 0x00020000L /*!< 突然変異: 純カオス */
+ #define MUT2_NORMALITY 0x00040000L /*!< 突然変異: ランダムな変異の消滅 */
+ #define MUT2_WRAITH 0x00080000L /*!< 突然変異: ランダムな幽体化 */
+ #define MUT2_POLY_WOUND 0x00100000L /*!< 突然変異: ランダムな傷の変化 */
+ #define MUT2_WASTING 0x00200000L /*!< 突然変異: 衰弱 */
+ #define MUT2_ATT_DRAGON 0x00400000L /*!< 突然変異: ドラゴンを引き寄せる */
+ #define MUT2_WEIRD_MIND 0x00800000L /*!< 突然変異: ランダムなテレパシー */
+ #define MUT2_NAUSEA 0x01000000L /*!< 突然変異: 落ち着きの無い胃 */
+ #define MUT2_CHAOS_GIFT 0x02000000L /*!< 突然変異: カオスパトロン */
+ #define MUT2_WALK_SHAD 0x04000000L /*!< 突然変異: ランダムな現実変容 */
+ #define MUT2_WARNING 0x08000000L /*!< 突然変異: 警告 */
+ #define MUT2_INVULN 0x10000000L /*!< 突然変異: ランダムな無敵化 */
+ #define MUT2_SP_TO_HP 0x20000000L /*!< 突然変異: ランダムなMPからHPへの変換 */
+ #define MUT2_HP_TO_SP 0x40000000L /*!< 突然変異: ランダムなHPからMPへの変換 */
+ #define MUT2_DISARM 0x80000000L /*!< 突然変異: ランダムな武器落とし */
+
+ BIT_FLAGS muta3; /*!< 常時効果つきの変異2 / Other mutations will be mainly in MUT3_* */
+ #define MUT3_HYPER_STR 0x00000001L /*!< 突然変異: 超人的な力 */
+ #define MUT3_PUNY 0x00000002L /*!< 突然変異: 虚弱 */
+ #define MUT3_HYPER_INT 0x00000004L /*!< 突然変異: 生体コンピュータ */
+ #define MUT3_MORONIC 0x00000008L /*!< 突然変異: 精神薄弱 */
+ #define MUT3_RESILIENT 0x00000010L /*!< 突然変異: 弾力のある体 */
+ #define MUT3_XTRA_FAT 0x00000020L /*!< 突然変異: 異常な肥満 */
+ #define MUT3_ALBINO 0x00000040L /*!< 突然変異: アルビノ */
+ #define MUT3_FLESH_ROT 0x00000080L /*!< 突然変異: 腐敗した肉体 */
+ #define MUT3_SILLY_VOI 0x00000100L /*!< 突然変異: 間抜けなキーキー声 */
+ #define MUT3_BLANK_FAC 0x00000200L /*!< 突然変異: のっぺらぼう */
+ #define MUT3_ILL_NORM 0x00000400L /*!< 突然変異: 幻影に覆われた体 */
+ #define MUT3_XTRA_EYES 0x00000800L /*!< 突然変異: 第三の目 */
+ #define MUT3_MAGIC_RES 0x00001000L /*!< 突然変異: 魔法防御 */
+ #define MUT3_XTRA_NOIS 0x00002000L /*!< 突然変異: 騒音 */
+ #define MUT3_INFRAVIS 0x00004000L /*!< 突然変異: 赤外線視力 */
+ #define MUT3_XTRA_LEGS 0x00008000L /*!< 突然変異: 追加の脚 */
+ #define MUT3_SHORT_LEG 0x00010000L /*!< 突然変異: 短い脚 */
+ #define MUT3_ELEC_TOUC 0x00020000L /*!< 突然変異: 電撃オーラ */
+ #define MUT3_FIRE_BODY 0x00040000L /*!< 突然変異: 火炎オーラ */
+ #define MUT3_WART_SKIN 0x00080000L /*!< 突然変異: イボ肌 */
+ #define MUT3_SCALES 0x00100000L /*!< 突然変異: 鱗肌 */
+ #define MUT3_IRON_SKIN 0x00200000L /*!< 突然変異: 鉄の肌 */
+ #define MUT3_WINGS 0x00400000L /*!< 突然変異: 翼 */
+ #define MUT3_FEARLESS 0x00800000L /*!< 突然変異: 恐れ知らず */
+ #define MUT3_REGEN 0x01000000L /*!< 突然変異: 急回復 */
+ #define MUT3_ESP 0x02000000L /*!< 突然変異: テレパシー */
+ #define MUT3_LIMBER 0x04000000L /*!< 突然変異: しなやかな肉体 */
+ #define MUT3_ARTHRITIS 0x08000000L /*!< 突然変異: 関節の痛み */
+ #define MUT3_BAD_LUCK 0x10000000L /*!< 突然変異: 黒いオーラ(不運) */
+ #define MUT3_VULN_ELEM 0x20000000L /*!< 突然変異: 元素攻撃弱点 */
+ #define MUT3_MOTION 0x40000000L /*!< 突然変異: 正確で力強い動作 */
+ #define MUT3_GOOD_LUCK 0x80000000L /*!< 突然変異: 白いオーラ(幸運) */
s16b virtues[8];
s16b vir_types[8];
- s16b word_recall; /* Word of recall counter */
- s16b alter_reality; /* Alter reality counter */
- byte recall_dungeon; /* Dungeon set to be recalled */
+ TIME_EFFECT word_recall; /* Word of recall counter */
+ TIME_EFFECT alter_reality; /* Alter reality counter */
+ DUNGEON_IDX recall_dungeon; /* Dungeon set to be recalled */
- s16b energy_need; /* Energy needed for next move */
+ ENERGY energy_need; /* Energy needed for next move */
+ ENERGY enchant_energy_need; /* Energy needed for next upkeep effect */
- s16b food; /* Current nutrition */
+ FEED food; /* Current nutrition */
- u32b special_attack; /* Special attack capacity -LM- */
- u32b special_defense; /* Special block capacity -LM- */
- byte action; /* Currently action */
+ BIT_FLAGS special_attack; /* Special attack capacity -LM- */
+ BIT_FLAGS special_defense; /* Special block capacity -LM- */
+ ACTION_IDX action; /* Currently action */
- u32b spell_learned1; /* bit mask of spells learned */
- u32b spell_learned2; /* bit mask of spells learned */
- u32b spell_worked1; /* bit mask of spells tried and worked */
- u32b spell_worked2; /* bit mask of spells tried and worked */
- u32b spell_forgotten1; /* bit mask of spells learned but forgotten */
- u32b spell_forgotten2; /* bit mask of spells learned but forgotten */
- byte spell_order[64]; /* order spells learned/remembered/forgotten */
+ BIT_FLAGS spell_learned1; /* bit mask of spells learned */
+ BIT_FLAGS spell_learned2; /* bit mask of spells learned */
+ BIT_FLAGS spell_worked1; /* bit mask of spells tried and worked */
+ BIT_FLAGS spell_worked2; /* bit mask of spells tried and worked */
+ BIT_FLAGS spell_forgotten1; /* bit mask of spells learned but forgotten */
+ BIT_FLAGS spell_forgotten2; /* bit mask of spells learned but forgotten */
+ SPELL_IDX spell_order[64]; /* order spells learned/remembered/forgotten */
- s16b spell_exp[64]; /* Proficiency of spells */
- s16b weapon_exp[5][64]; /* Proficiency of weapons */
- s16b skill_exp[10]; /* Proficiency of misc. skill */
+ SUB_EXP spell_exp[64]; /* Proficiency of spells */
+ SUB_EXP weapon_exp[5][64]; /* Proficiency of weapons */
+ SUB_EXP skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */
- s32b magic_num1[108]; /* Array for non-spellbook type magic */
- byte magic_num2[108]; /* Flags for non-spellbook type magics */
+ MAGIC_NUM1 magic_num1[108]; /*!< Array for non-spellbook type magic */
+ MAGIC_NUM2 magic_num2[108]; /*!< 魔道具術師の取り込み済魔道具使用回数 / Flags for non-spellbook type magics */
- s16b mane_spell[MAX_MANE];
- s16b mane_dam[MAX_MANE];
+ SPELL_IDX mane_spell[MAX_MANE];
+ HIT_POINT mane_dam[MAX_MANE];
s16b mane_num;
- s16b player_hp[PY_MAX_LEVEL];
+ s16b concent; /* Sniper's concentration level */
+
+ HIT_POINT player_hp[PY_MAX_LEVEL];
char died_from[80]; /* What killed the player */
- cptr last_message; /* Last message on death or retirement */
+ concptr last_message; /* Last message on death or retirement */
char history[4][60]; /* Textual "history" for the Player */
u16b total_winner; /* Total winner */
bool wizard; /* Player is in wizard mode */
- s16b riding; /* Riding on a monster of this index */
+ MONSTER_IDX riding; /* Riding on a monster of this index */
byte knowledge; /* Knowledge about yourself */
- s32b visit; /* Visited towns */
+ BIT_FLAGS visit; /* Visited towns */
- byte start_race; /* Race at birth */
- s32b old_race1; /* Record of race changes */
- s32b old_race2; /* Record of race changes */
+ RACE_IDX start_race; /* Race at birth */
+ BIT_FLAGS old_race1; /* Record of race changes */
+ BIT_FLAGS old_race2; /* Record of race changes */
s16b old_realm; /* Record of realm changes */
s16b pet_follow_distance; /* Length of the imaginary "leash" for pets */
s16b today_mon; /* Wanted monster */
bool dtrap; /* Whether you are on trap-safe grids */
- s16b floor_id; /* Current floor location */
+ FLOOR_IDX floor_id; /* Current floor location */
bool autopick_autoregister; /* auto register is in-use or not */
bool teleport_town;
bool enter_dungeon; /* Just enter the dungeon */
- s16b health_who; /* Health bar trackee */
+ IDX health_who; /* Health bar trackee */
- s16b monster_race_idx; /* Monster race trackee */
+ MONRACE_IDX monster_race_idx; /* Monster race trackee */
- s16b object_kind_idx; /* Object kind trackee */
+ KIND_OBJECT_IDX object_kind_idx; /* Object kind trackee */
s16b new_spells; /* Number of spells available */
s16b old_spells;
s16b cur_lite; /* Radius of lite (if any) */
-
- u32b notice; /* Special Updates (bit flags) */
- u32b update; /* Pending Updates (bit flags) */
- u32b redraw; /* Normal Redraws (bit flags) */
- u32b window; /* Window Redraws (bit flags) */
+ BIT_FLAGS update; /* Pending Updates */
+ #define PU_BONUS 0x00000001L /*!< ステータス更新フラグ: 能力値修正 / Calculate bonuses */
+ #define PU_TORCH 0x00000002L /*!< ステータス更新フラグ: 光源半径 / Calculate torch radius */
+ #define PU_HP 0x00000010L /*!< ステータス更新フラグ: HP / Calculate chp and mhp */
+ #define PU_MANA 0x00000020L /*!< ステータス更新フラグ: MP / Calculate csp and msp */
+ #define PU_SPELLS 0x00000040L /*!< ステータス更新フラグ: 魔法学習数 / Calculate spells */
+ #define PU_COMBINE 0x00000100L /*!< アイテム処理フラグ: アイテムの結合を要する / Combine the pack */
+ #define PU_REORDER 0x00000200L /*!< アイテム処理フラグ: アイテムの並び替えを要する / Reorder the pack */
+ #define PU_AUTODESTROY 0x00000400L /*!< アイテム処理フラグ: アイテムの自動破壊を要する / Auto-destroy marked item */
+ #define PU_UN_VIEW 0x00010000L /*!< ステータス更新フラグ: 地形の視界外化 / Forget view */
+ #define PU_UN_LITE 0x00020000L /*!< ステータス更新フラグ: 明暗範囲の視界外化 / Forget lite */
+ #define PU_VIEW 0x00100000L /*!< ステータス更新フラグ: 視界 / Update view */
+ #define PU_LITE 0x00200000L /*!< ステータス更新フラグ: 明暗範囲 / Update lite */
+ #define PU_MON_LITE 0x00400000L /*!< ステータス更新フラグ: モンスターの光源範囲 / Monster illumination */
+ #define PU_DELAY_VIS 0x00800000L /*!< ステータス更新フラグ: 視界の追加更新 / Mega-Hack -- Delayed visual update */
+ #define PU_MONSTERS 0x01000000L /*!< ステータス更新フラグ: モンスターのステータス / Update monsters */
+ #define PU_DISTANCE 0x02000000L /*!< ステータス更新フラグ: プレイヤーとモンスターの距離 / Update distances */
+ #define PU_FLOW 0x10000000L /*!< ステータス更新フラグ: プレイヤーから各マスへの到達距離 / Update flow */
+
+ BIT_FLAGS redraw; /* Normal Redraws */
+ BIT_FLAGS window; /* Window Redraws */
s16b stat_use[6]; /* Current modified stats */
s16b stat_top[6]; /* Maximal modified stats */
bool sutemi;
bool counter;
- s32b align; /* Good/evil/neutral */
- s16b run_py;
- s16b run_px;
+ ALIGNMENT align; /* Good/evil/neutral */
+ POSITION run_py;
+ POSITION run_px;
+ DIRECTION fishing_dir;
/*** Extracted fields ***/
- u32b total_weight; /* Total weight being carried */
+ WEIGHT total_weight; /*!< 所持品と装備品の計算総重量 / Total weight being carried */
s16b stat_add[6]; /* Modifiers to stat values */
s16b stat_ind[6]; /* Indexes into stat tables */
bool resist_neth; /* Resist nether */
bool resist_fear; /* Resist fear */
bool resist_time; /* Resist time */
+ bool resist_water; /* Resist water */
bool reflect; /* Reflect 'bolt' attacks */
bool sh_fire; /* Fiery 'immolation' effect */
bool sustain_con; /* Keep constitution */
bool sustain_chr; /* Keep charisma */
- u32b cursed; /* Player is cursed */
+ BIT_FLAGS cursed; /* Player is cursed */
bool can_swim; /* No damage falling */
bool levitation; /* No damage falling */
bool free_act; /* Never paralyzed */
bool see_inv; /* Can see invisible */
bool regenerate; /* Regenerate hit pts */
- bool hold_life; /* Resist life draining */
+ bool hold_exp; /* Resist exp draining */
bool telepathy; /* Telepathy */
bool esp_animal;
bool mighty_throw;
bool see_nocto; /* Noctovision */
- s16b to_dd[2]; /* Extra dice/sides */
- s16b to_ds[2];
+ DICE_NUMBER to_dd[2]; /* Extra dice/sides */
+ DICE_SID to_ds[2];
- s16b dis_to_h[2]; /* Known bonus to hit (wield) */
- s16b dis_to_h_b; /* Known bonus to hit (bow) */
- s16b dis_to_d[2]; /* Known bonus to dam (wield) */
- s16b dis_to_a; /* Known bonus to ac */
+ HIT_PROB dis_to_h[2]; /*!< 判明している現在の表記上の近接武器命中修正値 / Known bonus to hit (wield) */
+ HIT_PROB dis_to_h_b; /*!< 判明している現在の表記上の射撃武器命中修正値 / Known bonus to hit (bow) */
+ HIT_POINT dis_to_d[2]; /*!< 判明している現在の表記上の近接武器ダメージ修正値 / Known bonus to dam (wield) */
+ ARMOUR_CLASS dis_to_a; /*!< 判明している現在の表記上の装備AC修正値 / Known bonus to ac */
+ ARMOUR_CLASS dis_ac; /*!< 判明している現在の表記上の装備AC基礎値 / Known base ac */
- s16b dis_ac; /* Known base ac */
-
- s16b to_h[2]; /* Bonus to hit (wield) */
- s16b to_h_b; /* Bonus to hit (bow) */
- s16b to_h_m; /* Bonus to hit (misc) */
- s16b to_d[2]; /* Bonus to dam (wield) */
- s16b to_d_m; /* Bonus to dam (misc) */
+ s16b to_h[2]; /* Bonus to hit (wield) */
+ s16b to_h_b; /* Bonus to hit (bow) */
+ s16b to_h_m; /* Bonus to hit (misc) */
+ s16b to_d[2]; /* Bonus to dam (wield) */
+ s16b to_d_m; /* Bonus to dam (misc) */
s16b to_a; /* Bonus to ac */
s16b to_m_chance; /* Minusses to cast chance */
bool hidarite;
bool no_flowed;
- s16b ac; /* Base ac */
+ ARMOUR_CLASS ac; /*!< 装備無しの基本AC / Base ac */
+
+ ACTION_SKILL_POWER see_infra; /*!< 赤外線視能力の強さ /Infravision range */
+ ACTION_SKILL_POWER skill_dis; /*!< 行動技能値:解除能力 / Skill: Disarming */
+ ACTION_SKILL_POWER skill_dev; /*!< 行動技能値:魔道具使用 / Skill: Magic Devices */
+ ACTION_SKILL_POWER skill_sav; /*!< 行動技能値:魔法防御 / Skill: Saving throw */
+ ACTION_SKILL_POWER skill_stl; /*!< 行動技能値:隠密 / Skill: Stealth factor */
- s16b see_infra; /* Infravision range */
+ /*!
+ * 行動技能値:知覚 / Skill: Searching ability
+ * この値はsearch()による地形の隠し要素発見処理などで混乱、盲目、幻覚、無光源などの
+ * 状態異常がない限り、難易度修正などがないままそのままパーセンテージ値として使われる。
+ * 100以上ならば必ず全てのトラップなどを見つけることが出来る。
+ */
+ ACTION_SKILL_POWER skill_srh;
- s16b skill_dis; /* Skill: Disarming */
- s16b skill_dev; /* Skill: Magic Devices */
- s16b skill_sav; /* Skill: Saving throw */
- s16b skill_stl; /* Skill: Stealth factor */
- s16b skill_srh; /* Skill: Searching ability */
- s16b skill_fos; /* Skill: Searching frequency */
- s16b skill_thn; /* Skill: To hit (normal) */
- s16b skill_thb; /* Skill: To hit (shooting) */
- s16b skill_tht; /* Skill: To hit (throwing) */
- s16b skill_dig; /* Skill: Digging */
+ ACTION_SKILL_POWER skill_fos; /*!< 行動技能値:探索 / Skill: Searching frequency */
+ ACTION_SKILL_POWER skill_thn; /*!< 行動技能値:打撃命中能力 / Skill: To hit (normal) */
+ ACTION_SKILL_POWER skill_thb; /*!< 行動技能値:射撃命中能力 / Skill: To hit (shooting) */
+ ACTION_SKILL_POWER skill_tht; /*!< 行動技能値:投射命中能力 / Skill: To hit (throwing) */
+ ACTION_SKILL_POWER skill_dig; /*!< 行動技能値:掘削 / Skill: Digging */
s16b num_blow[2]; /* Number of blows */
s16b num_fire; /* Number of shots */
byte tval_xtra; /* Correct xtra tval */
-
byte tval_ammo; /* Correct ammo tval */
byte pspeed; /* Current speed */
+
+ ENERGY energy_use; /* Energy use this turn */
+
+ POSITION y; /* Player location in dungeon */
+ POSITION x; /* Player location in dungeon */
+ GAME_TEXT name[32]; /*!< 現在のプレイヤー名 / Current player's character name */
};
struct birther
{
- byte psex; /* Sex index */
- byte prace; /* Race index */
- byte pclass; /* Class index */
- byte pseikaku; /* Seikaku index */
- byte realm1; /* First magic realm */
- byte realm2; /* Second magic realm */
+ SEX_IDX psex; /* Sex index */
+ RACE_IDX prace; /* Race index */
+ CLASS_IDX pclass; /* Class index */
+ CHARACTER_IDX pseikaku; /* Seikaku index */
+ REALM_IDX realm1; /* First magic realm */
+ REALM_IDX realm2; /* Second magic realm */
s16b age;
s16b ht;
s16b wt;
s16b sc;
- s32b au;
+ PRICE au; /*!< 初期の所持金 */
- s16b stat_max[6]; /* Current "maximal" stat values */
- s16b stat_max_max[6]; /* Maximal "maximal" stat values */
- s16b player_hp[PY_MAX_LEVEL];
+ BASE_STATUS stat_max[6]; /* Current "maximal" stat values */
+ BASE_STATUS stat_max_max[6]; /* Maximal "maximal" stat values */
+ HIT_POINT player_hp[PY_MAX_LEVEL];
- s16b chaos_patron;
+ PATRON_IDX chaos_patron;
s16b vir_types[8];
struct martial_arts
{
- cptr desc; /* A verbose attack description */
+ concptr desc; /* A verbose attack description */
int min_level; /* Minimum level to use */
int chance; /* Chance of 'success' */
int dd; /* Damage dice */
struct kamae
{
- cptr desc; /* A verbose kamae description */
+ concptr desc; /* A verbose kamae description */
int min_level; /* Minimum level to use */
- cptr info;
+ concptr info;
};
/* Mindcrafters */
int min_lev;
int mana_cost;
int fail;
- cptr name;
+ concptr name;
};
typedef struct mind_power mind_power;
typedef struct monster_power monster_power;
struct monster_power
{
- int level;
- int smana;
- int fail;
+ PLAYER_LEVEL level;
+ MANA_POINT smana;
+ PERCENTAGE fail;
int manedam;
int manefail;
int use_stat;
- cptr name;
+ concptr name;
};
struct building_type
{
- char name[20]; /* proprietor name */
- char owner_name[20]; /* proprietor name */
+ GAME_TEXT name[20]; /* proprietor name */
+ GAME_TEXT owner_name[20]; /* proprietor name */
char owner_race[20]; /* proprietor race */
- char act_names[8][30]; /* action names */
- s32b member_costs[8]; /* Costs for class members of building */
- s32b other_costs[8]; /* Costs for nonguild members */
+ GAME_TEXT act_names[8][30]; /* action names */
+ PRICE member_costs[8]; /* Costs for class members of building */
+ PRICE other_costs[8]; /* Costs for nonguild members */
char letters[8]; /* action letters */
- s16b actions[8]; /* action codes */
- s16b action_restr[8]; /* action restrictions */
+ BACT_IDX actions[8]; /* action codes */
+ BACT_RESTRICT_IDX action_restr[8]; /* action restrictions */
- s16b member_class[MAX_CLASS]; /* which classes are part of guild */
- s16b member_race[MAX_RACES]; /* which classes are part of guild */
- s16b member_realm[MAX_MAGIC+1]; /* which realms are part of guild */
+ CLASS_IDX member_class[MAX_CLASS]; /* which classes are part of guild */
+ RACE_IDX member_race[MAX_RACES]; /* which classes are part of guild */
+ REALM_IDX member_realm[MAX_MAGIC+1]; /* which realms are part of guild */
};
typedef struct wilderness_type wilderness_type;
struct wilderness_type
{
- int terrain;
- int town;
- int road;
- u32b seed;
- s16b level;
- byte entrance;
+ int terrain;
+ int town;
+ int road;
+ u32b seed;
+ DEPTH level;
+ byte entrance;
};
typedef struct town_type town_type;
struct town_type
{
- char name[32];
- u32b seed; /* Seed for RNG */
- store_type *store; /* The stores [MAX_STORES] */
- byte numstores;
+ GAME_TEXT name[32];
+ u32b seed; /* Seed for RNG */
+ store_type *store; /* The stores [MAX_STORES] */
+ byte numstores;
};
/* Dungeons */
typedef struct dun_type dun_type;
struct dun_type
{
- byte min_level; /* Minimum level in the dungeon */
- byte max_level; /* Maximum dungeon level allowed */
-
- cptr name; /* The name of the dungeon */
+ DEPTH min_level; /* Minimum level in the dungeon */
+ DEPTH max_level; /* Maximum dungeon level allowed */
+ concptr name; /* The name of the dungeon */
};
/*
struct tag_type
{
- int tag;
- void *pointer;
+ int tag;
+ int index;
};
-typedef bool (*monster_hook_type)(int r_idx);
+typedef bool (*monsterrace_hook_type)(MONRACE_IDX r_idx);
/*
struct high_score
{
- char what[8]; /* Version info (string) */
-
- char pts[10]; /* Total Score (number) */
-
- char gold[10]; /* Total Gold (number) */
-
- char turns[10]; /* Turns Taken (number) */
-
- char day[10]; /* Time stamp (string) */
-
- char who[16]; /* Player Name (string) */
-
- char uid[8]; /* Player UID (number) */
-
- char sex[2]; /* Player Sex (string) */
- char p_r[3]; /* Player Race (number) */
- char p_c[3]; /* Player Class (number) */
- char p_a[3]; /* Player Seikaku (number) */
-
- char cur_lev[4]; /* Current Player Level (number) */
- char cur_dun[4]; /* Current Dungeon Level (number) */
- char max_lev[4]; /* Max Player Level (number) */
- char max_dun[4]; /* Max Dungeon Level (number) */
-
- char how[40]; /* Method of death (string) */
+ GAME_TEXT what[8]; /* Version info (string) */
+ GAME_TEXT pts[10]; /* Total Score (number) */
+ GAME_TEXT gold[10]; /* Total Gold (number) */
+ GAME_TEXT turns[10]; /* Turns Taken (number) */
+ GAME_TEXT day[10]; /* Time stamp (string) */
+ GAME_TEXT who[16]; /* Player Name (string) */
+ GAME_TEXT uid[8]; /* Player UID (number) */
+ GAME_TEXT sex[2]; /* Player Sex (string) */
+ GAME_TEXT p_r[3]; /* Player Race (number) */
+ GAME_TEXT p_c[3]; /* Player Class (number) */
+ GAME_TEXT p_a[3]; /* Player Seikaku (number) */
+
+ GAME_TEXT cur_lev[4]; /* Current Player Level (number) */
+ GAME_TEXT cur_dun[4]; /* Current Dungeon Level (number) */
+ GAME_TEXT max_lev[4]; /* Max Player Level (number) */
+ GAME_TEXT max_dun[4]; /* Max Dungeon Level (number) */
+
+ GAME_TEXT how[40]; /* Method of death (string) */
};
typedef struct
{
- s16b feat; /* Feature tile */
- byte percent; /* Chance of type */
+ FEAT_IDX feat; /* Feature tile */
+ PERCENTAGE percent; /* Chance of type */
}
feat_prob;
/* A structure for the != dungeon types */
typedef struct dungeon_info_type dungeon_info_type;
struct dungeon_info_type {
- u32b name; /* Name */
- u32b text; /* Description */
- byte dy;
- byte dx;
+ STR_OFFSET name; /* Name */
+ STR_OFFSET text; /* Description */
+
+ POSITION dy;
+ POSITION dx;
feat_prob floor[DUNGEON_FEAT_PROB_NUM]; /* Floor probability */
feat_prob fill[DUNGEON_FEAT_PROB_NUM]; /* Cave wall probability */
- s16b outer_wall; /* Outer wall tile */
- s16b inner_wall; /* Inner wall tile */
- s16b stream1; /* stream tile */
- s16b stream2; /* stream tile */
-
- s16b mindepth; /* Minimal depth */
- s16b maxdepth; /* Maximal depth */
- byte min_plev; /* Minimal plev needed to enter -- it's an anti-cheating mesure */
- s16b pit;
- s16b nest;
- byte mode; /* Mode of combinaison of the monster flags */
+ FEAT_IDX outer_wall; /* Outer wall tile */
+ FEAT_IDX inner_wall; /* Inner wall tile */
+ FEAT_IDX stream1; /* stream tile */
+ FEAT_IDX stream2; /* stream tile */
+
+ DEPTH mindepth; /* Minimal depth */
+ DEPTH maxdepth; /* Maximal depth */
+ PLAYER_LEVEL min_plev; /* Minimal plev needed to enter -- it's an anti-cheating mesure */
+ BIT_FLAGS16 pit;
+ BIT_FLAGS16 nest;
+ BIT_FLAGS8 mode; /* Mode of combinaison of the monster flags */
int min_m_alloc_level; /* Minimal number of monsters per level */
int max_m_alloc_chance; /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
- u32b flags1; /* Flags 1 */
+ BIT_FLAGS flags1; /* Flags 1 */
+
+ BIT_FLAGS mflags1; /* The monster flags that are allowed */
+ BIT_FLAGS mflags2;
+ BIT_FLAGS mflags3;
+ BIT_FLAGS mflags4;
+ BIT_FLAGS mflags7;
+ BIT_FLAGS mflags8;
+ BIT_FLAGS mflags9;
+ BIT_FLAGS mflagsr;
- u32b mflags1; /* The monster flags that are allowed */
- u32b mflags2;
- u32b mflags3;
- u32b mflags4;
- u32b mflags5;
- u32b mflags6;
- u32b mflags7;
- u32b mflags8;
- u32b mflags9;
- u32b mflagsr;
+ BIT_FLAGS m_a_ability_flags1;
+ BIT_FLAGS m_a_ability_flags2;
+ BIT_FLAGS m_a_ability_flags3;
+ BIT_FLAGS m_a_ability_flags4;
char r_char[5]; /* Monster race allowed */
- int final_object; /* The object you'll find at the bottom */
- int final_artifact; /* The artifact you'll find at the bottom */
- int final_guardian; /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
+ KIND_OBJECT_IDX final_object; /* The object you'll find at the bottom */
+ ARTIFACT_IDX final_artifact; /* The artifact you'll find at the bottom */
+ MONRACE_IDX final_guardian; /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
- byte special_div; /* % of monsters affected by the flags/races allowed, to add some variety */
+ PROB special_div; /* % of monsters affected by the flags/races allowed, to add some variety */
int tunnel_percent;
int obj_great;
int obj_good;
};
-/*
- * A structure type for entry of auto-picker/destroyer
+/*!
+ * @struct autopick_type
+ * @brief 自動拾い/破壊設定データの構造体 / A structure type for entry of auto-picker/destroyer
*/
typedef struct {
- cptr name; /* Items which have 'name' as part of its name match */
- cptr insc; /* Items will be auto-inscribed as 'insc' */
- u32b flag[2]; /* Misc. keyword to be matched */
- byte action; /* Auto-pickup or Destroy or Leave items */
- byte dice; /* Weapons which have more than 'dice' dice match */
- byte bonus; /* Items which have more than 'bonus' magical bonus match */
+ concptr name; /*!< 自動拾い/破壊定義の名称一致基準 / Items which have 'name' as part of its name match */
+ concptr insc; /*!< 対象となったアイテムに自動で刻む内容 / Items will be auto-inscribed as 'insc' */
+ BIT_FLAGS flag[2]; /*!< キーワードに関する汎用的な条件フラグ / Misc. keyword to be matched */
+ byte action; /*!< 対象のアイテムを拾う/破壊/放置するかの指定フラグ / Auto-pickup or Destroy or Leave items */
+ byte dice; /*!< 武器のダイス値基準値 / Weapons which have more than 'dice' dice match */
+ byte bonus; /*!< アイテムのボーナス基準値 / Items which have more than 'bonus' magical bonus match */
} autopick_type;
*/
typedef struct
{
- s16b floor_id; /* No recycle until 65536 IDs are all used */
- byte savefile_id; /* ID for savefile (from 0 to MAX_SAVED_FLOOR) */
- s16b dun_level;
+ FLOOR_IDX floor_id; /* No recycle until 65536 IDs are all used */
+ s16b savefile_id; /* ID for savefile (from 0 to MAX_SAVED_FLOOR) */
+ DEPTH dun_level;
s32b last_visit; /* Time count of last visit. 0 for new floor. */
u32b visit_mark; /* Older has always smaller mark. */
- s16b upper_floor_id; /* a floor connected with level teleportation */
- s16b lower_floor_id; /* a floor connected with level tel. and trap door */
+ FLOOR_IDX upper_floor_id; /* a floor connected with level teleportation */
+ FLOOR_IDX lower_floor_id; /* a floor connected with level tel. and trap door */
} saved_floor_type;
*/
typedef struct
{
- u16b info;
- s16b feat;
- s16b mimic;
+ BIT_FLAGS info;
+ FEAT_IDX feat;
+ FEAT_IDX mimic;
s16b special;
u16b occurrence;
} cave_template_type;
-/*
- * A structure type for arena entry
+/*!
+ * @struct arena_type
+ * @brief 闘技場のモンスターエントリー構造体 / A structure type for arena entry
*/
typedef struct
{
- s16b r_idx; /* Monster (0 means victory prizing) */
- byte tval; /* tval of prize (0 means no prize) */
- byte sval; /* sval of prize */
+ MONRACE_IDX r_idx; /*!< 闘技場のモンスター種族ID(0ならば表彰式) / Monster (0 means victory prizing) */
+ OBJECT_TYPE_VALUE tval; /*!< モンスター打倒後に得られるアイテムの大カテゴリID / tval of prize (0 means no prize) */
+ OBJECT_SUBTYPE_VALUE sval; /*!< モンスター打倒後に得られるアイテムの小カテゴリID / sval of prize */
} arena_type;
+
+
+/*
+ * A structure type for doors
+ */
+typedef struct
+{
+ FEAT_IDX open;
+ FEAT_IDX broken;
+ FEAT_IDX closed;
+ FEAT_IDX locked[MAX_LJ_DOORS];
+ FEAT_IDX num_locked;
+ FEAT_IDX jammed[MAX_LJ_DOORS];
+ FEAT_IDX num_jammed;
+} door_type;
+
+
+#ifdef TRAVEL
+/*
+ * A structure type for travel command
+ */
+typedef struct {
+ int run; /* Remaining grid number */
+ int cost[MAX_HGT][MAX_WID];
+ POSITION x; /* Target X */
+ POSITION y; /* Target Y */
+ DIRECTION dir; /* Running direction */
+} travel_type;
+#endif
+
+typedef struct {
+ concptr flag;
+ byte index;
+ byte level;
+ s32b value;
+ struct {
+ int constant;
+ DICE_NUMBER dice;
+ } timeout;
+ concptr desc;
+} activation_type;
+
+typedef struct {
+ int flag;
+ int type;
+ concptr name;
+} dragonbreath_type;