3 #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 {
33 NONLIVING = 3, //生きてない
37 struct player_race_condition {
40 std::optional<player_class_type> pclass{};
43 player_race_condition(tr_type t, PLAYER_LEVEL l = 1, const std::optional<player_class_type>& c = std::nullopt, bool nc = false)
44 : type(t), level(l), pclass(c), not_class(nc) {}
48 * p@brief プレイヤー種族構造体 / Player racial info
51 concptr title{}; //!< 種族名 / Title of race
53 concptr E_title{}; //!< 英語種族名
55 concptr symbol{}; //!< 種族シンボル(救援召喚) / Race symbols
56 s16b r_adj[A_MAX]{}; //!< 能力値ボーナス / Racial stat bonuses
58 s16b r_dis{}; //!< 解除 / disarming
59 s16b r_dev{}; //!< 魔道具使用 /magic devices
60 s16b r_sav{}; //!< 魔法防御 / saving throw
61 s16b r_stl{}; //!< 隠密 / stealth
62 s16b r_srh{}; //!< 探索 / search ability
63 s16b r_fos{}; //!< 知覚 / search frequency
64 s16b r_thn{}; //!< 打撃修正(命中) / combat (normal)
65 s16b r_thb{}; //!< 射撃修正(命中) / combat (shooting)
67 byte r_mhp{}; //!< ヒットダイス / Race hit-dice modifier
68 byte r_exp{}; //!< 経験値修正 /Race experience factor
70 byte b_age{}; //!< 年齢最小値 / base age
71 byte m_age{}; //!< 年齢加算範囲 / mod age
73 byte m_b_ht{}; //!< 身長最小値(男) / base height (males)
74 byte m_m_ht{}; //!< 身長加算範囲(男) / mod height (males)
75 byte m_b_wt{}; //!< 体重最小値(男) / base weight (males)
76 byte m_m_wt{}; //!< 体重加算範囲(男) / mod weight (males)
78 byte f_b_ht{}; //!< 身長最小値(女) / base height (females)
79 byte f_m_ht{}; //!< 身長加算範囲(女) / mod height (females)
80 byte f_b_wt{}; //!< 体重最小値(女) / base weight (females)
81 byte f_m_wt{}; //!< 体重加算範囲(女) / mod weight (females)
83 byte infra{}; //!< 赤外線視力 / Infra-vision range
85 u32b choice{}; //!< 似つかわしい職業(ミミック時はミミック種族属性) / Legal class choices
86 PlayerRaceLife life{}; //!< 生命の形態
88 std::vector<player_race_condition> extra_flags;
91 extern const player_race *rp_ptr;
93 typedef struct player_type player_type;
94 SYMBOL_CODE get_summon_symbol_from_player(player_type *creature_ptr);
95 bool is_specific_player_race(player_type *creature_ptr, player_race_type prace);
96 bool player_race_has_flag(player_type *creature_ptr, tr_type flag, bool base_race = false);
97 void add_player_race_flags(player_type *creature_ptr, BIT_FLAGS *flags, bool base_race = false);
98 PlayerRaceLife player_race_life(player_type *creature_ptr, bool base_race = false);