3 #include "object-enchant/tr-flags.h"
4 #include "object-enchant/trg-types.h"
5 #include "system/angband.h"
6 #include "util/flag-group.h"
11 enum class ItemKindType : short;
14 BaseitemKey(const ItemKindType type_value, const std::optional<int> &subtype_value = std::nullopt);
15 bool operator==(const BaseitemKey &other) const;
16 bool operator!=(const BaseitemKey &other) const
18 return !(*this == other);
21 bool operator<(const BaseitemKey &other) const;
22 bool operator>(const BaseitemKey &other) const
27 bool operator<=(const BaseitemKey &other) const
29 return !(*this > other);
32 bool operator>=(const BaseitemKey &other) const
34 return !(*this < other);
37 ItemKindType tval() const;
38 std::optional<int> sval() const;
40 ItemKindType get_arrow_kind() const;
41 bool is_spell_book() const;
42 bool is_high_level_book() const;
43 bool is_melee_weapon() const;
45 bool has_unidentified_name() const;
48 ItemKindType type_value;
49 std::optional<int> subtype_value;
51 bool is_mushrooms() const;
54 enum class ItemKindType : short;
55 enum class RandomArtActType : short;
61 std::string name; /*!< ベースアイテム名 */
62 std::string text; /*!< 解説テキスト */
63 std::string flavor_name; /*!< 未確定名 */
67 PARAMETER_VALUE pval{}; /*!< ベースアイテムのpval(能力修正共通値) Object extra info */
69 HIT_PROB to_h{}; /*!< ベースアイテムの命中修正値 / Bonus to hit */
70 int to_d{}; /*!< ベースアイテムのダメージ修正値 / Bonus to damage */
71 ARMOUR_CLASS to_a{}; /*!< ベースアイテムのAC修正値 / Bonus to armor */
72 ARMOUR_CLASS ac{}; /*!< ベースアイテムのAC基本値 / Base armor */
74 DICE_NUMBER dd{}; /*!< ダメージダイスの数 / Damage dice */
75 DICE_SID ds{}; /*!< ダメージダイスの大きさ / Damage sides */
77 WEIGHT weight{}; /*!< ベースアイテムの重量 / Weight */
78 PRICE cost{}; /*!< ベースアイテムの基本価値 / Object "base cost" */
79 TrFlags flags{}; /*!< ベースアイテムの基本特性ビット配列 / Flags */
80 EnumClassFlagGroup<ItemGenerationTraitType> gen_flags; /*!< ベースアイテムの生成特性ビット配列 / flags for generate */
82 DEPTH level{}; /*!< ベースアイテムの基本生成階 / Level */
83 DEPTH locale[4]{}; /*!< ベースアイテムの生成階テーブル / Allocation level(s) */
84 PROB chance[4]{}; /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */
86 TERM_COLOR d_attr{}; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
87 char d_char{}; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */
88 bool easy_know{}; /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */
89 RandomArtActType act_idx{}; /*!< 発動能力のID / Activative ability index */
91 /* @todo ここから下はk_info.txt に依存しないミュータブルなフィールド群なので、将来的に分離予定 */
93 TERM_COLOR x_attr{}; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */
94 char x_char{}; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */
96 IDX flavor{}; /*!< 未鑑定名の何番目を当てるか(0は未鑑定名なし) / Special object flavor (or zero) */
97 bool aware{}; /*!< ベースアイテムが鑑定済かどうか / The player is "aware" of the item's effects */
98 bool tried{}; /*!< ベースアイテムを未鑑定のまま試したことがあるか / The player has "tried" one of the items */
101 extern std::vector<BaseitemInfo> baseitems_info;