#include "monster-attack/monster-attack-effect.h"
#include "monster-attack/monster-attack-types.h"
+#include "monster-race/monster-aura-types.h"
#include "monster-race/race-ability-flags.h"
#include "util/flag-group.h"
#include "system/angband.h"
#include <string>
/*! モンスターが1ターンに攻撃する最大回数 (射撃を含む) / The maximum number of times a monster can attack in a turn (including SHOOT) */
-#define MAX_NUM_BLOWS 4
+constexpr int MAX_NUM_BLOWS = 4;
-/*
- * Monster blow structure
- *
- * - Method (RBM_*)
- * - Effect (RBE_*)
- * - Damage Dice
- * - Damage Sides
- */
-typedef struct monster_blow {
- rbm_type method{};
- rbe_type effect{};
+struct monster_blow {
+ RaceBlowMethodType method{};
+ RaceBlowEffectType effect{};
DICE_NUMBER d_dice{};
DICE_SID d_side{};
-} monster_blow;
+};
/*!
* @brief モンスター種族の定義構造体
* fields have a special prefix to aid in searching for them.
*/
struct monster_race {
+ MONRACE_IDX idx{};
std::string name; //!< 名前データのオフセット(日本語) / Name offset(Japanese)
#ifdef JP
std::string E_name; //!< 名前データのオフセット(英語) / Name offset(English)
BIT_FLAGS flags8{}; //!< Flags 8 (wilderness info)
BIT_FLAGS flags9{}; //!< Flags 9 (drops info)
BIT_FLAGS flagsr{}; //!< 耐性フラグ / Flags R (resistances info)
- EnumClassFlagGroup<RF_ABILITY> ability_flags; //!< 能力フラグ(魔法/ブレス) / Ability Flags
+ EnumClassFlagGroup<MonsterAbilityType> ability_flags; //!< 能力フラグ(魔法/ブレス) / Ability Flags
+ EnumClassFlagGroup<MonsterAuraType> aura_flags; //!< オーラフラグ / Aura Flags
monster_blow blow[MAX_NUM_BLOWS]{}; //!< 打撃能力定義 / Up to four blows per round
MONRACE_IDX reinforce_id[6]{}; //!< 指定護衛モンスター種族ID(6種まで)
DICE_NUMBER reinforce_dd[6]{}; //!< 指定護衛数ダイス数
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 (?)
-#define MR1_EVOLUTION 0x01
- byte r_xtra1{}; //!< 特殊な思い出フラグ(進化) / Something
+ bool r_can_evolve{}; //!< 進化するか否か / Flag being able to evolve
byte r_xtra2{}; //!< 未使用 / Something (unused)
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 unique number of spells seen
byte r_blows[MAX_NUM_BLOWS]{}; //!< 受けた打撃 / Number of times each blow type was seen
- u32b r_flags1{}; //!< Observed racial flags
- u32b r_flags2{}; //!< Observed racial flags
- u32b r_flags3{}; //!< Observed racial flags
- u32b r_flagsr{}; //!< 見た耐性フラグ / Observed racial resistance flags
- EnumClassFlagGroup<RF_ABILITY> r_ability_flags; //!< 見た能力フラグ(魔法/ブレス) / Observed racial ability flags
+ uint32_t r_flags1{}; //!< Observed racial flags
+ uint32_t r_flags2{}; //!< Observed racial flags
+ uint32_t r_flags3{}; //!< Observed racial flags
+ uint32_t r_flagsr{}; //!< 見た耐性フラグ / Observed racial resistance flags
+ EnumClassFlagGroup<MonsterAbilityType> r_ability_flags; //!< 見た能力フラグ(魔法/ブレス) / Observed racial ability flags
+ EnumClassFlagGroup<MonsterAuraType> r_aura_flags; //!< 見た能力フラグ(オーラ) / Observed aura flags
PLAYER_LEVEL defeat_level{}; //!< 倒したレベル(ユニーク用) / player level at which defeated this race
REAL_TIME defeat_time{}; //!< 倒した時間(ユニーク用) / time at which defeated this race
+ PERCENTAGE cur_hp_per{}; //!< 生成時現在HP率(%)
};