4 #include <unordered_map>
7 #include "object-enchant/tr-flags.h"
8 #include "object-enchant/tr-types.h"
9 #include "player-ability/player-ability-types.h"
10 #include "player-info/race-types.h"
11 #include "player/player-class-types.h"
12 #include "system/angband.h"
15 * @brief Constant for kinds of mimic
16 * @todo 後ほど時間がある時にenum classへ変換する.
18 enum mimic_kind_type {
28 enum class PlayerRaceLife {
29 LIVING = 0, //!< 生きている
32 NONLIVING = 3, //!< 生きてない
39 enum class PlayerRaceFood {
45 CORPSE = 5, //!< 死体(捧げる)
50 * @brief プレイヤー種族の条件設定構造体
52 struct player_race_condition {
55 std::optional<player_class_type> pclass{};
58 player_race_condition(tr_type t, PLAYER_LEVEL l = 1, const std::optional<player_class_type> &c = std::nullopt, bool nc = false)
68 * @brief プレイヤー種族情報構造体 / Player racial info
70 struct player_race_info {
71 concptr title{}; //!< 種族名 / Title of race
73 concptr E_title{}; //!< 英語種族名
75 concptr symbol{}; //!< 種族シンボル(救援召喚) / Race symbols
76 int16_t r_adj[A_MAX]{}; //!< 能力値ボーナス / Racial stat bonuses
78 int16_t r_dis{}; //!< 解除 / disarming
79 int16_t r_dev{}; //!< 魔道具使用 /magic devices
80 int16_t r_sav{}; //!< 魔法防御 / saving throw
81 int16_t r_stl{}; //!< 隠密 / stealth
82 int16_t r_srh{}; //!< 探索 / search ability
83 int16_t r_fos{}; //!< 知覚 / search frequency
84 int16_t r_thn{}; //!< 打撃修正(命中) / combat (normal)
85 int16_t r_thb{}; //!< 射撃修正(命中) / combat (shooting)
87 byte r_mhp{}; //!< ヒットダイス / Race hit-dice modifier
88 byte r_exp{}; //!< 経験値修正 /Race experience factor
90 byte b_age{}; //!< 年齢最小値 / base age
91 byte m_age{}; //!< 年齢加算範囲 / mod age
93 byte m_b_ht{}; //!< 身長最小値(男) / base height (males)
94 byte m_m_ht{}; //!< 身長加算範囲(男) / mod height (males)
95 byte m_b_wt{}; //!< 体重最小値(男) / base weight (males)
96 byte m_m_wt{}; //!< 体重加算範囲(男) / mod weight (males)
98 byte f_b_ht{}; //!< 身長最小値(女) / base height (females)
99 byte f_m_ht{}; //!< 身長加算範囲(女) / mod height (females)
100 byte f_b_wt{}; //!< 体重最小値(女) / base weight (females)
101 byte f_m_wt{}; //!< 体重加算範囲(女) / mod weight (females)
103 byte infra{}; //!< 赤外線視力 / Infra-vision range
105 uint32_t choice{}; //!< 似つかわしい職業(ミミック時はミミック種族属性) / Legal class choices
106 PlayerRaceLife life{}; //!< 生命の形態
107 PlayerRaceFood food{}; //!< 食料の形態
109 std::vector<player_race_condition> extra_flags;
112 extern const player_race_info *rp_ptr;
115 SYMBOL_CODE get_summon_symbol_from_player(player_type *creature_ptr);
116 bool player_race_has_flag(player_type *creature_ptr, tr_type flag, bool base_race = false);
117 void add_player_race_flags(player_type *creature_ptr, TrFlags &flags, bool base_race = false);
118 PlayerRaceLife player_race_life(player_type *creature_ptr, bool base_race = false);
119 PlayerRaceFood player_race_food(player_type *creature_ptr, bool base_race = false);