OSDN Git Service

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