OSDN Git Service

Merge pull request #876 from iks3/refactor-racial-explanations
[hengbandforosx/hengbandosx.git] / src / system / monster-race-definition.h
1 #pragma once
2
3 #include "monster-attack/monster-attack-effect.h"
4 #include "monster-attack/monster-attack-types.h"
5 #include "monster-race/race-ability-flags.h"
6 #include "util/flag-group.h"
7 #include "system/angband.h"
8 #include <string>
9
10 /*! モンスターが1ターンに攻撃する最大回数 (射撃を含む) / The maximum number of times a monster can attack in a turn (including SHOOT) */
11 #define MAX_NUM_BLOWS 4
12
13 /*
14  * Monster blow structure
15  *
16  *      - Method (RBM_*)
17  *      - Effect (RBE_*)
18  *      - Damage Dice
19  *      - Damage Sides
20  */
21 typedef struct monster_blow {
22     rbm_type method{};
23     rbe_type effect{};
24     DICE_NUMBER d_dice{};
25     DICE_SID d_side{};
26 } monster_blow;
27
28 /*!
29  * @brief モンスター種族の定義構造体
30  * @details
31  * Monster "race" information, including racial memories
32  *
33  * Note that "d_attr" and "d_char" are used for MORE than "visual" stuff.
34  *
35  * Note that "x_attr" and "x_char" are used ONLY for "visual" stuff.
36  *
37  * Note that "cur_num" (and "max_num") represent the number of monsters
38  * of the given race currently on (and allowed on) the current level.
39  * This information yields the "dead" flag for Unique monsters.
40  *
41  * Note that "max_num" is reset when a new player is created.
42  * Note that "cur_num" is reset when a new level is created.
43  *
44  * Note that several of these fields, related to "recall", can be
45  * scrapped if space becomes an issue, resulting in less "complete"
46  * monster recall (no knowledge of spells, etc).  All of the "recall"
47  * fields have a special prefix to aid in searching for them.
48  */
49 struct monster_race {
50     std::string name; //!< 名前データのオフセット(日本語) /  Name offset(Japanese)
51 #ifdef JP
52     std::string E_name; //!< 名前データのオフセット(英語) /  Name offset(English)
53 #endif
54     std::string text; //!< 思い出テキストのオフセット / Lore text offset
55     DICE_NUMBER hdice{}; //!< HPのダイス数 / Creatures hit dice count
56     DICE_SID hside{}; //!< HPのダイス面数 / Creatures hit dice sides
57     ARMOUR_CLASS ac{}; //!< アーマークラス / Armour Class
58     SLEEP_DEGREE sleep{}; //!< 睡眠値 / Inactive counter (base)
59     POSITION aaf{}; //!< 感知範囲(1-100スクエア) / Area affect radius (1-100)
60     SPEED speed{}; //!< 加速(110で+0) / Speed (normally 110)
61     EXP mexp{}; //!< 殺害時基本経験値 / Exp value for kill
62     BIT_FLAGS16 extra{}; //!< 未使用 /  Unused (for now)
63     RARITY freq_spell{}; //!< 魔法&特殊能力仕様頻度(1/n) /  Spell frequency
64     BIT_FLAGS flags1{}; //!< Flags 1 (general)
65     BIT_FLAGS flags2{}; //!< Flags 2 (abilities)
66     BIT_FLAGS flags3{}; //!< Flags 3 (race/resist)
67     BIT_FLAGS flags7{}; //!< Flags 7 (movement related abilities)
68     BIT_FLAGS flags8{}; //!< Flags 8 (wilderness info)
69     BIT_FLAGS flags9{}; //!< Flags 9 (drops info)
70     BIT_FLAGS flagsr{}; //!< 耐性フラグ / Flags R (resistances info)
71     EnumClassFlagGroup<RF_ABILITY> ability_flags; //!< 能力フラグ(魔法/ブレス) / Ability Flags
72     monster_blow blow[MAX_NUM_BLOWS]{}; //!< 打撃能力定義 / Up to four blows per round
73     MONRACE_IDX reinforce_id[6]{}; //!< 指定護衛モンスター種族ID(6種まで)
74     DICE_NUMBER reinforce_dd[6]{}; //!< 指定護衛数ダイス数
75     DICE_SID reinforce_ds[6]{}; //!< 指定護衛数ダイス面
76     ARTIFACT_IDX artifact_id[4]{}; //!< 特定アーティファクトドロップID
77     RARITY artifact_rarity[4]{}; //!< 特定アーティファクトレア度
78     PERCENTAGE artifact_percent[4]{}; //!< 特定アーティファクトドロップ率
79     PERCENTAGE arena_ratio{}; //!< モンスター闘技場の掛け金倍率修正値(%基準 / 0=100%) / The adjustment ratio for gambling monster
80     MONRACE_IDX next_r_idx{}; //!< 進化先モンスター種族ID
81     EXP next_exp{}; //!< 進化に必要な経験値
82     DEPTH level{}; //!< レベル / Level of creature
83     RARITY rarity{}; //!< レアリティ / Rarity of creature
84     TERM_COLOR d_attr{}; //!< デフォルトの表示色 / Default monster attribute
85     SYMBOL_CODE d_char{}; //!< デフォルトの表示文字 / Default monster character
86     TERM_COLOR x_attr{}; //!< 設定した表示色(またはタイル位置Y) / Desired monster attribute
87     SYMBOL_CODE x_char{}; //!< 設定した表示文字(またはタイル位置X) / Desired monster character
88     MONSTER_NUMBER max_num{}; //!< 階に最大存在できる数 / Maximum population allowed per level
89     MONSTER_NUMBER cur_num{}; //!< 階に現在いる数 / Monster population on current level
90     FLOOR_IDX floor_id{}; //!< 存在している保存階ID /  Location of unique monster
91     MONSTER_NUMBER r_sights{}; //!< 見えている数 / Count sightings of this monster
92     MONSTER_NUMBER r_deaths{}; //!< このモンスターに殺された人数 / Count deaths from this monster
93     MONSTER_NUMBER r_pkills{}; //!< このゲームで倒すのを見た数 / Count visible monsters killed in this life
94     MONSTER_NUMBER r_akills{}; //!< このゲームで倒した数 / Count all monsters killed in this life
95     MONSTER_NUMBER r_tkills{}; //!< 全ゲームで倒した数 / Count monsters killed in all lives
96     byte r_wake{}; //!< @に気づいて起きた数 / Number of times woken up (?)
97     byte r_ignore{}; //!< @に気づいていない数 / Number of times ignored (?)
98 #define MR1_EVOLUTION 0x01
99     byte r_xtra1{}; //!< 特殊な思い出フラグ(進化) / Something
100     byte r_xtra2{}; //!< 未使用 / Something (unused)
101     ITEM_NUMBER r_drop_gold{}; //!< これまでに撃破時に落とした財宝の数 / Max number of gold dropped at once
102     ITEM_NUMBER r_drop_item{}; //!< これまでに撃破時に落としたアイテムの数 / Max number of item dropped at once
103     byte r_cast_spell{}; //!< 使った魔法/ブレスの種類数 /  Max unique number of spells seen
104     byte r_blows[MAX_NUM_BLOWS]{}; //!< 受けた打撃 /  Number of times each blow type was seen
105     u32b r_flags1{}; //!< Observed racial flags
106     u32b r_flags2{}; //!< Observed racial flags
107     u32b r_flags3{}; //!< Observed racial flags
108     u32b r_flagsr{}; //!< 見た耐性フラグ / Observed racial resistance flags
109     EnumClassFlagGroup<RF_ABILITY> r_ability_flags; //!< 見た能力フラグ(魔法/ブレス) / Observed racial ability flags
110     PLAYER_LEVEL defeat_level{}; //!< 倒したレベル(ユニーク用) / player level at which defeated this race
111     REAL_TIME defeat_time{}; //!< 倒した時間(ユニーク用) / time at which defeated this race
112 };