enum class ItemKindType : short;
class BaseitemKey {
public:
- BaseitemKey(const ItemKindType type_value, const std::optional<int> &subtype_value = std::nullopt);
+ constexpr BaseitemKey(const ItemKindType type_value, const std::optional<int> &subtype_value = std::nullopt)
+ : type_value(type_value)
+ , subtype_value(subtype_value)
+ {
+ }
+
bool operator==(const BaseitemKey &other) const;
bool operator!=(const BaseitemKey &other) const
{
ItemKindType tval() const;
std::optional<int> sval() const;
+ bool is(ItemKindType tval) const;
ItemKindType get_arrow_kind() const;
bool is_spell_book() const;
bool is_junk() const;
bool is_armour() const;
bool is_cross_bow() const;
+ bool refuse_enchant_weapon() const;
private:
ItemKindType type_value;
IDX flavor{}; /*!< 未鑑定名の何番目を当てるか(0は未鑑定名なし) / Special object flavor (or zero) */
bool aware{}; /*!< ベースアイテムが鑑定済かどうか / The player is "aware" of the item's effects */
bool tried{}; /*!< ベースアイテムを未鑑定のまま試したことがあるか / The player has "tried" one of the items */
+
+ void mark_as_tried();
};
extern std::vector<BaseitemInfo> baseitems_info;