*
* Certain data is saved in multiple places for efficient access, currently,
* this includes the tval/sval/weight fields in "object_type", various fields
- * in "header_type", and the "m_idx" and "o_idx" fields in "cave_type". All
+ * in "header_type", and the "m_idx" and "o_idx" fields in "grid_type". All
* of these could be removed, but this would, in general, slow down the game
* and increase the complexity of the code.
* </pre>
struct feature_state
{
- byte action; /*!< 変化条件をFF_*のIDで指定 / Action (FF_*) */
- s16b result; /*!< 変化先ID / Result (f_info ID) */
+ 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) */
};
STR_OFFSET text; /*!< 地形説明参照のためのネームバッファオフセット値 / Text (offset) */
STR_OFFSET tag; /*!< 地形特性タグ参照のためのネームバッファオフセット値 / Tag (offset) */
- IDX mimic; /*!< 未確定時の外形地形ID / Feature to mimic */
+ STR_OFFSET mimic_tag;
+ STR_OFFSET destroyed_tag;
+
+ FEAT_IDX mimic; /*!< 未確定時の外形地形ID / Feature to mimic */
+ FEAT_IDX destroyed; /*!< *破壊*に巻き込まれた時の地形移行先(未実装?) / Default destroyed state */
BIT_FLAGS flags[FF_FLAG_SIZE]; /*!< 地形の基本特性ビット配列 / Flags */
- u16b priority; /*!< 縮小表示で省略する際の表示優先度 / Map priority */
- IDX destroyed; /*!< *破壊*に巻き込まれた時の地形移行先(未実装?) / Default destroyed state */
+ FEAT_PRIORITY priority; /*!< 縮小表示で省略する際の表示優先度 / Map priority */
feature_state state[MAX_FEAT_STATES]; /*!< feature_state テーブル */
- byte subtype; /*!< 副特性値 */
+ FEAT_SUBTYPE subtype; /*!< 副特性値 */
FEAT_POWER power; /*!< 地形強度 */
- SYMBOL_COLOR d_attr[F_LIT_MAX]; /*!< デフォルトの地形シンボルカラー / Default feature attribute */
+ TERM_COLOR d_attr[F_LIT_MAX]; /*!< デフォルトの地形シンボルカラー / Default feature attribute */
SYMBOL_CODE d_char[F_LIT_MAX]; /*!< デフォルトの地形シンボルアルファベット / Default feature character */
- SYMBOL_COLOR x_attr[F_LIT_MAX]; /*!< 設定変更後の地形シンボルカラー / Desired feature attribute */
+ TERM_COLOR x_attr[F_LIT_MAX]; /*!< 設定変更後の地形シンボルカラー / Desired feature attribute */
SYMBOL_CODE x_char[F_LIT_MAX]; /*!< 設定変更後の地形シンボルアルファベット / Desired feature character */
};
BIT_FLAGS gen_flags; /*!< ベースアイテムの生成特性ビット配列 / flags for generate */
DEPTH locale[4]; /*!< ベースアイテムの生成階テーブル / Allocation level(s) */
- byte chance[4]; /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */
+ PROB chance[4]; /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */
DEPTH level; /*!< ベースアイテムの基本生成階 / Level */
- byte extra; /*!< その他色々のビットフラグ配列 / Something */
+ BIT_FLAGS8 extra; /*!< その他色々のビットフラグ配列 / Something */
- SYMBOL_COLOR d_attr; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
+ TERM_COLOR d_attr; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
SYMBOL_CODE d_char; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */
- SYMBOL_COLOR x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */
+ TERM_COLOR x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */
SYMBOL_CODE x_char; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */
- s16b flavor; /*!< 調査中(TODO) / Special object flavor (or zero) */
+ IDX flavor; /*!< 調査中(TODO) / Special object flavor (or zero) */
bool easy_know; /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */
bool tried; /*!< ベースアイテムを未鑑定のまま試したことがあるか / The player has "tried" one of the items */
- IDX act_idx; /*!< 発動能力のID / Activative ability index */
+ ACTIVATION_IDX act_idx; /*!< 発動能力のID / Activative ability index */
};
byte cur_num; /*! 現在の生成数 / Number created (0 or 1) */
byte max_num; /*! (未使用)最大生成数 / Unused (should be "1") */
- s16b floor_id; /*! アイテムを落としたフロアのID / Leaved on this location last time */
+ FLOOR_IDX floor_id; /*! アイテムを落としたフロアのID / Leaved on this location last time */
byte act_idx; /*! 発動能力ID / Activative ability index */
};
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 */
DEPTH level; /* Minimum level */
RARITY rarity; /* Object rarity */
struct monster_blow
{
- byte method;
- byte effect;
+ BLOW_METHOD method;
+ BLOW_EFFECT effect;
DICE_NUMBER d_dice;
DICE_SID d_side;
};
ARMOUR_CLASS ac; /*!< アーマークラス / Armour Class */
- s16b sleep; /*!< 睡眠値 / Inactive counter (base) */
- byte aaf; /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
+ SLEEP_DEGREE sleep; /*!< 睡眠値 / Inactive counter (base) */
+ POSITION aaf; /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
SPEED speed; /*!< 加速(110で+0) / Speed (normally 110) */
EXP mexp; /*!< 殺害時基本経験値 / Exp value for kill */
- s16b extra; /*!< 未使用 / Unused (for now) */
+ BIT_FLAGS16 extra; /*!< 未使用 / Unused (for now) */
- byte freq_spell; /*!< 魔法&特殊能力仕様頻度(1/n) / Spell frequency */
+ RARITY freq_spell; /*!< 魔法&特殊能力仕様頻度(1/n) / Spell frequency */
BIT_FLAGS flags1; /* Flags 1 (general) */
BIT_FLAGS flags2; /* Flags 2 (abilities) */
DEPTH level; /* Level of creature */
RARITY rarity; /* Rarity of creature */
-
- SYMBOL_COLOR d_attr; /* Default monster attribute */
+ TERM_COLOR d_attr; /* Default monster attribute */
SYMBOL_CODE d_char; /* Default monster character */
-
- SYMBOL_COLOR x_attr; /* Desired monster attribute */
+ TERM_COLOR x_attr; /* Desired monster attribute */
SYMBOL_CODE x_char; /* Desired monster character */
- byte max_num; /* Maximum population allowed per level */
+ MONSTER_NUMBER max_num; /* Maximum population allowed per level */
+ MONSTER_NUMBER cur_num; /* Monster population on current level */
- byte cur_num; /* Monster population on current level */
+ FLOOR_IDX floor_id; /* Location of unique monster */
- s16b floor_id; /* Location of unique monster */
+ MONSTER_NUMBER r_sights; /* Count sightings of this monster */
+ MONSTER_NUMBER r_deaths; /* Count deaths from this monster */
- s16b r_sights; /* Count sightings of this monster */
- s16b r_deaths; /* Count deaths from this monster */
-
- s16b r_pkills; /* Count visible monsters killed in this life */
- s16b r_akills; /* Count all 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 */
STR_OFFSET name; /* Name (offset) */
STR_OFFSET text; /* Text (offset) */
- byte typ; /* Vault type */
- byte rat; /* Vault rating */
+ ROOM_IDX typ; /* Vault type */
+ PROB rat; /* Vault rating (unused) */
POSITION hgt; /* Vault height */
POSITION wid; /* Vault width */
};
/*
* A single "grid" in a Cave
*
- * Note that several aspects of the code restrict the actual cave
+ * Note that several aspects of the code restrict the actual current_floor_ptr->grid_array
* to a max size of 256 by 256. In partcular, locations are often
* saved as bytes, limiting each coordinate to the 0-255 range.
*
* The "o_idx" and "m_idx" fields are very interesting. There are
* many places in the code where we need quick access to the actual
- * monster or object(s) in a given cave grid. The easiest way to
+ * monster or object(s) in a given grid. The easiest way to
* do this is to simply keep the index of the monster and object
* (if any) with the grid, but this takes 198*66*4 bytes of memory.
* Several other methods come to mind, which require only half this
* Note the special fields for the "MONSTER_FLOW" code.
*/
-typedef struct cave_type cave_type;
+typedef struct grid_type grid_type;
-struct cave_type
+struct grid_type
{
- u16b info; /* Hack -- cave flags */
+ BIT_FLAGS info; /* Hack -- current_floor_ptr->grid_array flags */
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 current_floor_ptr->grid_array info
+ * 具体的な使用一覧はクエスト行き階段の移行先クエストID、
+ * 各ダンジョン入口の移行先ダンジョンID、
+ *
+ */
+ s16b special;
FEAT_IDX mimic; /* Feature to mimic */
* Note that "object flags" must now be derived from the object kind,
* the artifact and ego-item indexes, and the two "xtra" fields.
*
- * Each cave grid points to one (or zero) objects via the "o_idx"
+ * Each grid points to one (or zero) objects via the "o_idx"
* field (above). Each object then points to one (or zero) objects
* via the "next_o_idx" field, forming a singly linked list, which
* in game terms, represents a "stack" of objects in the same grid.
WEIGHT weight; /* Item weight */
- IDX name1; /* Artifact type, if any */
- IDX name2; /* Ego-Item type, if any */
+ ARTIFACT_IDX name1; /* Artifact type, if any */
+ EGO_IDX name2; /* Ego-Item type, if any */
XTRA8 xtra1; /* Extra info type (now unused) */
XTRA8 xtra2; /* Extra info activation index */
XTRA8 xtra3; /* Extra info for weaponsmith */
- XTRA16 xtra4; /* Extra info fuel or captured monster's current HP */
- XTRA16 xtra5; /* Extra info captured monster's max HP */
+ XTRA16 xtra4; /*!< 光源の残り寿命、あるいは捕らえたモンスターの現HP / Extra info fuel or captured monster's current HP */
+ XTRA16 xtra5; /*!< 捕らえたモンスターの最大HP / Extra info captured monster's max HP */
HIT_PROB to_h; /* Plusses to hit */
HIT_POINT to_d; /* Plusses to damage */
TIME_EFFECT timeout; /* Timeout Counter */
byte ident; /* Special flags */
-
byte marked; /* Object is marked */
u16b inscription; /* Inscription index */
BIT_FLAGS art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
BIT_FLAGS curse_flags; /* Flags for curse */
- IDX next_o_idx; /* Next object in stack (if any) */
- IDX held_m_idx; /* Monster holding us (if any) */
+ OBJECT_IDX next_o_idx; /* Next object in stack (if any) */
+ MONSTER_IDX 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
{
MONRACE_IDX r_idx; /* Monster race index */
- IDX ap_r_idx; /* Monster race appearance index */
+ MONRACE_IDX ap_r_idx; /* Monster race appearance index */
byte sub_align; /* Sub-alignment for a neutral monster */
POSITION fy; /* Y location on map */
HIT_POINT hp; /* Current Hit points */
HIT_POINT maxhp; /* Max Hit points */
HIT_POINT max_maxhp; /* Max Max Hit points */
- u32b dealt_damage; /* Sum of damages dealt by player */
+ HIT_POINT dealt_damage; /* Sum of damages dealt by player */
TIME_EFFECT mtimed[MAX_MTIMED]; /* Timed status counter */
EXP exp;
- BIT_FLAGS smart; /* Field for "smart_learn" */
+ /* 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
{
- IDX index; /* The actual index */
+ KIND_OBJECT_IDX index; /* The actual index */
DEPTH level; /* Base dungeon level */
PROB prob1; /* Probability, pass 1 */
byte o_set;
byte o_bit;
- cptr o_text;
- cptr o_desc;
+ concptr o_text;
+ concptr o_desc;
};
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 */
+ GAME_TEXT name[60]; /*!< クエスト名 / Quest name */
DEPTH level; /*!< 処理階層 / Dungeon level */
MONRACE_IDX r_idx; /*!< クエスト対象のモンスターID / Monster race */
MONSTER_NUMBER cur_num; /*!< 撃破したモンスターの数 / Number killed */
MONSTER_NUMBER max_num; /*!< 求められるモンスターの撃破数 / Number required */
- IDX k_idx; /*!< クエスト対象のアイテムID / object index */
+ 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; /*!< クエスト対象のダンジョンID / quest dungeon */
+ BIT_FLAGS flags; /*!< クエストに関するフラグビット / quest flags */
+ DUNGEON_IDX dungeon; /*!< クエスト対象のダンジョンID / quest dungeon */
- byte complev; /*!< クリア時プレイヤーレベル / player level (complete) */
- u32b comptime; /*!< クリア時ゲーム時間 / quest clear time*/
+ PLAYER_LEVEL complev; /*!< クリア時プレイヤーレベル / player level (complete) */
+ REAL_TIME comptime; /*!< クリア時ゲーム時間 / quest clear time*/
};
struct owner_type
{
- cptr owner_name; /* Name */
-
- s32b 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 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 */
POSITION oldpy; /* Previous player location -KMW- */
POSITION oldpx; /* Previous player location -KMW- */
- CHARACTER_IDX psex; /* Sex index */
- CHARACTER_IDX prace; /* Race index */
- CHARACTER_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 */
+ 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)
- */
+ 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 */
PLAYER_LEVEL lev; /* Level */
- s16b town_num; /* Current town number */
+ TOWN_IDX town_num; /* Current town number */
s16b arena_number; /* monster number in arena -KMW- */
bool inside_arena; /* Is character inside arena? */
QUEST_IDX inside_quest; /* Inside quest level */
bool inside_battle; /* Is character inside tougijou? */
+ DUNGEON_IDX dungeon_idx; /* current dungeon index */
POSITION wilderness_x; /* Coordinates in the wilderness */
POSITION wilderness_y;
bool wild_mode;
TIME_EFFECT magicdef;
TIME_EFFECT tim_res_nether; /* Timed -- Nether resistance */
TIME_EFFECT tim_res_time; /* Timed -- Time resistance */
- IDX mimic_form;
+ MIMIC_RACE_IDX mimic_form;
TIME_EFFECT tim_mimic;
TIME_EFFECT tim_sh_fire;
TIME_EFFECT tim_sh_holy;
TIME_EFFECT multishadow; /* Timed -- Multi-shadow */
TIME_EFFECT dustrobe; /* Timed -- Robe of dust */
- s16b chaos_patron;
- BIT_FLAGS muta1;
- BIT_FLAGS muta2;
- BIT_FLAGS muta3;
+ bool timewalk;
+
+
+ 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];
BIT_FLAGS special_attack; /* Special attack capacity -LM- */
BIT_FLAGS special_defense; /* Special block capacity -LM- */
- byte action; /* Currently action */
+ ACTION_IDX action; /* Currently action */
BIT_FLAGS spell_learned1; /* bit mask of spells learned */
BIT_FLAGS spell_learned2; /* bit mask of spells learned */
SUB_EXP skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */
MAGIC_NUM1 magic_num1[108]; /*!< Array for non-spellbook type magic */
- MAGIC_NUM2 magic_num2[108]; /*!< Flags for non-spellbook type magics */
+ MAGIC_NUM2 magic_num2[108]; /*!< 魔道具術師の取り込み済魔道具使用回数 / Flags for non-spellbook type magics */
SPELL_IDX mane_spell[MAX_MANE];
HIT_POINT mane_dam[MAX_MANE];
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 */
byte knowledge; /* Knowledge about yourself */
BIT_FLAGS visit; /* Visited towns */
- byte start_race; /* Race at birth */
+ 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 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 */
IDX health_who; /* Health bar trackee */
- IDX monster_race_idx; /* Monster race trackee */
+ MONRACE_IDX monster_race_idx; /* Monster race trackee */
- IDX 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 */
+ 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 mighty_throw;
bool see_nocto; /* Noctovision */
- s16b to_dd[2]; /* Extra dice/sides */
- s16b 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 */
+ DICE_NUMBER to_dd[2]; /* Extra dice/sides */
+ DICE_SID to_ds[2];
- s16b dis_ac; /* Known base 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 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 */
- s16b energy_use; /* Energy use this turn */
+ ENERGY energy_use; /* Energy use this turn */
POSITION y; /* Player location in dungeon */
POSITION x; /* Player location in dungeon */
- char name[32]; /* Current player's character name */
+ 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 */
- REALM_IDX realm1; /* First magic realm */
- REALM_IDX 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; /*!< 初期の所持金 */
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 */
- int min_level; /* Minimum level to use */
- int chance; /* Chance of 'success' */
- int dd; /* Damage dice */
- int ds; /* Damage sides */
- int effect; /* Special effects */
+ concptr desc; /* A verbose attack description */
+ PLAYER_LEVEL min_level; /* Minimum level to use */
+ int chance; /* Chance of 'success' */
+ int dd; /* Damage dice */
+ int ds; /* Damage sides */
+ int effect; /* Special effects */
};
typedef struct kamae kamae;
struct kamae
{
- cptr desc; /* A verbose kamae description */
- int min_level; /* Minimum level to use */
- cptr info;
+ concptr desc; /* A verbose kamae description */
+ PLAYER_LEVEL min_level; /* Minimum level to use */
+ concptr info;
};
/* Mindcrafters */
typedef struct mind_type mind_type;
struct mind_type
{
- int min_lev;
- int mana_cost;
- int fail;
- cptr name;
+ PLAYER_LEVEL min_lev;
+ MANA_POINT mana_cost;
+ PERCENTAGE fail;
+ 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 */
- char owner_race[20]; /* proprietor race */
+ GAME_TEXT name[20]; /* proprietor name */
+ GAME_TEXT owner_name[20]; /* proprietor name */
+ GAME_TEXT 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;
- DEPTH level;
- byte entrance;
+ int terrain;
+ TOWN_IDX 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;
-};
-
-/* 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 */
+ GAME_TEXT name[32];
+ u32b seed; /* Seed for RNG */
+ store_type *store; /* The stores [MAX_STORES] */
+ byte numstores;
};
/*
struct tag_type
{
- int tag;
- int index;
+ int tag;
+ int index;
};
-typedef bool (*monster_hook_type)(MONRACE_IDX 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) */
};
/* A structure for the != dungeon types */
-typedef struct dungeon_info_type dungeon_info_type;
-struct dungeon_info_type {
- STR_OFFSET name; /* Name */
- STR_OFFSET text; /* Description */
+typedef struct dungeon_type dungeon_type;
+struct dungeon_type {
+
+ STR_OFFSET name; /* Name */
+ STR_OFFSET text; /* Description */
POSITION dy;
POSITION dx;
PLAYER_LEVEL min_plev; /* Minimal plev needed to enter -- it's an anti-cheating mesure */
BIT_FLAGS16 pit;
BIT_FLAGS16 nest;
- byte mode; /* Mode of combinaison of the monster flags */
+ 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 */
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;
* @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 */
+ 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 */
*/
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) */
+ 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;
*/
typedef struct
{
- s16b r_idx; /*!< 闘技場のモンスター種族ID(0ならば表彰式) / Monster (0 means victory prizing) */
- byte tval; /*!< モンスター打倒後に得られるアイテムの大カテゴリID / tval of prize (0 means no prize) */
- byte sval; /*!< モンスター打倒後に得られるアイテムの小カテゴリID / 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
typedef struct {
int run; /* Remaining grid number */
int cost[MAX_HGT][MAX_WID];
- int x; /* Target X */
- int y; /* Target Y */
- int dir; /* Running direction */
+ POSITION x; /* Target X */
+ POSITION y; /* Target Y */
+ DIRECTION dir; /* Running direction */
} travel_type;
#endif
typedef struct {
- cptr flag;
+ concptr flag;
byte index;
byte level;
s32b value;
struct {
int constant;
- int dice;
+ DICE_NUMBER dice;
} timeout;
- cptr desc;
+ concptr desc;
} activation_type;
typedef struct {
int flag;
int type;
- cptr name;
+ concptr name;
} dragonbreath_type;
+
+typedef struct {
+ grid_type *grid_array[MAX_HGT];
+ DEPTH dun_level; /*!< 現在の実ダンジョン階層base_levelの参照元となる / Current dungeon level */
+ DEPTH base_level;
+ POSITION width; /* Current dungeon width */
+ POSITION height; /* Current dungeon height */
+} floor_type;
\ No newline at end of file