4 #include <unordered_map>
7 #include "object-enchant/tr-types.h"
8 #include "player-ability/player-ability-types.h"
9 #include "player/player-class-types.h"
10 #include "player/player-race-types.h"
11 #include "system/angband.h"
14 * Constant for kinds of mimic
18 #define MIMIC_DEMON_LORD 2
19 #define MIMIC_VAMPIRE 3
21 #define MIMIC_FLAGS choice
22 #define MIMIC_IS_NONLIVING 0x00000001
23 #define MIMIC_IS_DEMON 0x00000002
24 #define MIMIC_IS_UNDEAD 0x00000004
29 enum class PlayerRaceLife {
30 LIVING = 0, //!< 生きている
33 NONLIVING = 3, //!< 生きてない
40 enum class PlayerRaceFood {
46 CORPSE = 5, //!< 死体(捧げる)
51 * @brief プレイヤー種族の条件設定構造体
53 struct player_race_condition {
56 std::optional<player_class_type> pclass{};
59 player_race_condition(tr_type t, PLAYER_LEVEL l = 1, const std::optional<player_class_type> &c = std::nullopt, bool nc = false)
69 * @brief プレイヤー種族構造体 / Player racial info
72 concptr title{}; //!< 種族名 / Title of race
74 concptr E_title{}; //!< 英語種族名
76 concptr symbol{}; //!< 種族シンボル(救援召喚) / Race symbols
77 s16b r_adj[A_MAX]{}; //!< 能力値ボーナス / Racial stat bonuses
79 s16b r_dis{}; //!< 解除 / disarming
80 s16b r_dev{}; //!< 魔道具使用 /magic devices
81 s16b r_sav{}; //!< 魔法防御 / saving throw
82 s16b r_stl{}; //!< 隠密 / stealth
83 s16b r_srh{}; //!< 探索 / search ability
84 s16b r_fos{}; //!< 知覚 / search frequency
85 s16b r_thn{}; //!< 打撃修正(命中) / combat (normal)
86 s16b r_thb{}; //!< 射撃修正(命中) / combat (shooting)
88 byte r_mhp{}; //!< ヒットダイス / Race hit-dice modifier
89 byte r_exp{}; //!< 経験値修正 /Race experience factor
91 byte b_age{}; //!< 年齢最小値 / base age
92 byte m_age{}; //!< 年齢加算範囲 / mod age
94 byte m_b_ht{}; //!< 身長最小値(男) / base height (males)
95 byte m_m_ht{}; //!< 身長加算範囲(男) / mod height (males)
96 byte m_b_wt{}; //!< 体重最小値(男) / base weight (males)
97 byte m_m_wt{}; //!< 体重加算範囲(男) / mod weight (males)
99 byte f_b_ht{}; //!< 身長最小値(女) / base height (females)
100 byte f_m_ht{}; //!< 身長加算範囲(女) / mod height (females)
101 byte f_b_wt{}; //!< 体重最小値(女) / base weight (females)
102 byte f_m_wt{}; //!< 体重加算範囲(女) / mod weight (females)
104 byte infra{}; //!< 赤外線視力 / Infra-vision range
106 u32b choice{}; //!< 似つかわしい職業(ミミック時はミミック種族属性) / Legal class choices
107 PlayerRaceLife life{}; //!< 生命の形態
108 PlayerRaceFood food{}; //!< 食料の形態
110 std::vector<player_race_condition> extra_flags;
113 extern const player_race *rp_ptr;
115 typedef struct player_type player_type;
116 SYMBOL_CODE get_summon_symbol_from_player(player_type *creature_ptr);
117 bool is_specific_player_race(player_type *creature_ptr, player_race_type prace);
118 bool player_race_has_flag(player_type *creature_ptr, tr_type flag, bool base_race = false);
119 void add_player_race_flags(player_type *creature_ptr, BIT_FLAGS *flags, bool base_race = false);
120 PlayerRaceLife player_race_life(player_type *creature_ptr, bool base_race = false);
121 PlayerRaceFood player_race_food(player_type *creature_ptr, bool base_race = false);