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"
12 enum class ItemKindType : short;
15 BaseitemKey(const ItemKindType type_value, const std::optional<int> &subtype_value = std::nullopt);
16 bool operator==(const BaseitemKey &other) const;
17 bool operator!=(const BaseitemKey &other) const
19 return !(*this == other);
22 bool operator<(const BaseitemKey &other) const;
23 bool operator>(const BaseitemKey &other) const
28 bool operator<=(const BaseitemKey &other) const
30 return !(*this > other);
33 bool operator>=(const BaseitemKey &other) const
35 return !(*this < other);
38 ItemKindType tval() const;
39 std::optional<int> sval() const;
41 ItemKindType get_arrow_kind() const;
42 bool is_spell_book() const;
43 bool is_high_level_book() const;
44 bool is_melee_weapon() const;
46 bool has_unidentified_name() const;
47 bool can_recharge() const;
48 bool is_wand_rod() const;
49 bool is_wand_staff() const;
50 bool is_protector() const;
51 bool can_be_aura_protector() const;
52 bool is_wearable() const;
53 bool is_weapon() const;
54 bool is_equipement() const;
55 bool is_melee_ammo() const;
56 bool is_orthodox_melee_weapon() const;
57 bool is_broken_weapon() const;
58 bool is_throwable() const;
59 bool is_wieldable_in_etheir_hand() const;
61 short get_bow_energy() const;
62 int get_arrow_magnification() const;
63 bool is_aiming_rod() const;
64 bool is_lite_requiring_fuel() const;
66 bool is_armour() const;
67 bool is_cross_bow() const;
70 ItemKindType type_value;
71 std::optional<int> subtype_value;
73 bool is_mushrooms() const;
76 enum class ItemKindType : short;
77 enum class RandomArtActType : short;
83 std::string name; /*!< ベースアイテム名 */
84 std::string text; /*!< 解説テキスト */
85 std::string flavor_name; /*!< 未確定名 */
89 PARAMETER_VALUE pval{}; /*!< ベースアイテムのpval(能力修正共通値) Object extra info */
91 HIT_PROB to_h{}; /*!< ベースアイテムの命中修正値 / Bonus to hit */
92 int to_d{}; /*!< ベースアイテムのダメージ修正値 / Bonus to damage */
93 ARMOUR_CLASS to_a{}; /*!< ベースアイテムのAC修正値 / Bonus to armor */
94 ARMOUR_CLASS ac{}; /*!< ベースアイテムのAC基本値 / Base armor */
96 DICE_NUMBER dd{}; /*!< ダメージダイスの数 / Damage dice */
97 DICE_SID ds{}; /*!< ダメージダイスの大きさ / Damage sides */
99 WEIGHT weight{}; /*!< ベースアイテムの重量 / Weight */
100 PRICE cost{}; /*!< ベースアイテムの基本価値 / Object "base cost" */
101 TrFlags flags{}; /*!< ベースアイテムの基本特性ビット配列 / Flags */
102 EnumClassFlagGroup<ItemGenerationTraitType> gen_flags; /*!< ベースアイテムの生成特性ビット配列 / flags for generate */
104 DEPTH level{}; /*!< ベースアイテムの基本生成階 / Level */
107 int level; /*!< ベースアイテムの生成階 */
108 short chance; /*!< ベースアイテムの生成確率 */
111 std::array<alloc_table, 4> alloc_tables{}; /*!< ベースアイテムの生成テーブル */
113 TERM_COLOR d_attr{}; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
114 char d_char{}; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */
115 bool easy_know{}; /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */
116 RandomArtActType act_idx{}; /*!< 発動能力のID / Activative ability index */
118 void decide_easy_know();
120 /* @todo ここから下はk_info.txt に依存しないミュータブルなフィールド群なので、将来的に分離予定 */
122 TERM_COLOR x_attr{}; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */
123 char x_char{}; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */
125 IDX flavor{}; /*!< 未鑑定名の何番目を当てるか(0は未鑑定名なし) / Special object flavor (or zero) */
126 bool aware{}; /*!< ベースアイテムが鑑定済かどうか / The player is "aware" of the item's effects */
127 bool tried{}; /*!< ベースアイテムを未鑑定のまま試したことがあるか / The player has "tried" one of the items */
130 extern std::vector<BaseitemInfo> baseitems_info;