#pragma once
+#include <optional>
#include <unordered_map>
#include <vector>
-#include <optional>
#include "object-enchant/tr-types.h"
-#include "player-ability/player-abillity-types.h"
+#include "player-ability/player-ability-types.h"
#include "player/player-class-types.h"
#include "player/player-race-types.h"
#include "system/angband.h"
#define MIMIC_IS_UNDEAD 0x00000004
/*!
- * プレイヤー種族の生命形態
+ * @brief プレイヤー種族の生命形態
*/
enum class PlayerRaceLife {
- LIVING = 0, //生きている
- UNDEAD = 1, //不死
- DEMON = 2, //悪魔
- NONLIVING = 3, //生きてない
+ LIVING = 0, //!< 生きている
+ UNDEAD = 1, //!< 不死
+ DEMON = 2, //!< 悪魔
+ NONLIVING = 3, //!< 生きてない
MAX
};
+/*!
+ * @brief プレイヤー種族の食料形態
+ */
+enum class PlayerRaceFood {
+ RATION = 0, //!< 食料
+ WATER = 1, //!< 水
+ OIL = 2, //!< 油
+ BLOOD = 3, //!< 血
+ MANA = 4, //!< 魔力
+ CORPSE = 5, //!< 死体(捧げる)
+ MAX
+};
+
+/*!
+ * @brief プレイヤー種族の条件設定構造体
+ */
struct player_race_condition {
tr_type type{};
PLAYER_LEVEL level{};
std::optional<player_class_type> pclass{};
bool not_class{};
- player_race_condition(tr_type t, PLAYER_LEVEL l = 1, const std::optional<player_class_type>& c = std::nullopt, bool nc = false)
- : type(t), level(l), pclass(c), not_class(nc) {}
+ player_race_condition(tr_type t, PLAYER_LEVEL l = 1, const std::optional<player_class_type> &c = std::nullopt, bool nc = false)
+ : type(t)
+ , level(l)
+ , pclass(c)
+ , not_class(nc)
+ {
+ }
};
/*!
- * p@brief プレイヤー種族構造体 / Player racial info
+ * @brief プレイヤー種族構造体 / Player racial info
*/
struct player_race {
concptr title{}; //!< 種族名 / Title of race
byte m_m_wt{}; //!< 体重加算範囲(男) / mod weight (males)
byte f_b_ht{}; //!< 身長最小値(女) / base height (females)
- byte f_m_ht{}; //!< 身長加算範囲(女) / mod height (females)
+ byte f_m_ht{}; //!< 身長加算範囲(女) / mod height (females)
byte f_b_wt{}; //!< 体重最小値(女) / base weight (females)
byte f_m_wt{}; //!< 体重加算範囲(女) / mod weight (females)
u32b choice{}; //!< 似つかわしい職業(ミミック時はミミック種族属性) / Legal class choices
PlayerRaceLife life{}; //!< 生命の形態
+ PlayerRaceFood food{}; //!< 食料の形態
std::vector<player_race_condition> extra_flags;
};
bool player_race_has_flag(player_type *creature_ptr, tr_type flag, bool base_race = false);
void add_player_race_flags(player_type *creature_ptr, BIT_FLAGS *flags, bool base_race = false);
PlayerRaceLife player_race_life(player_type *creature_ptr, bool base_race = false);
+PlayerRaceFood player_race_food(player_type *creature_ptr, bool base_race = false);