OSDN Git Service

[Refactor] #2204 HIT_POINTエイリアスをintに揃えた
[hengbandforosx/hengbandosx.git] / src / object / object-kind.h
1 #pragma once
2
3 #include "system/angband.h"
4
5 #include "object-enchant/tr-flags.h"
6 #include "object-enchant/trg-types.h"
7 #include "object/tval-types.h"
8 #include "system/system-variables.h"
9 #include "util/flag-group.h"
10
11 #include <string>
12 #include <vector>
13
14 enum class RandomArtActType : short;
15 struct object_kind {
16     KIND_OBJECT_IDX idx{};
17
18     std::string name; /*!< ベースアイテム名参照のためのネームバッファオフセット値 / Name (offset) */
19     std::string text; /*!< 解説テキスト参照のためのネームバッファオフセット値 / Text (offset) */
20     std::string flavor_name; /*!< 未確定名参照のためのネームバッファオフセット値 / Flavor name (offset) */
21
22     ItemKindType tval{}; /*!< ベースアイテム種別の大項目値 Object type */
23     OBJECT_SUBTYPE_VALUE sval{}; /*!< ベースアイテム種別の小項目値 Object sub type */
24
25     PARAMETER_VALUE pval{}; /*!< ベースアイテムのpval(能力修正共通値) Object extra info */
26
27     HIT_PROB to_h{}; /*!< ベースアイテムの命中修正値 / Bonus to hit */
28     int to_d{}; /*!< ベースアイテムのダメージ修正値 / Bonus to damage */
29     ARMOUR_CLASS to_a{}; /*!< ベースアイテムのAC修正値 / Bonus to armor */
30
31     ARMOUR_CLASS ac{}; /*!< ベースアイテムのAC基本値 /  Base armor */
32
33     DICE_NUMBER dd{};
34     DICE_SID ds{}; /*!< ダメージダイスの数と大きさ / Damage dice/sides */
35
36     WEIGHT weight{}; /*!< ベースアイテムの重量 / Weight */
37
38     PRICE cost{}; /*!< ベースアイテムの基本価値 / Object "base cost" */
39
40     TrFlags flags{}; /*!< ベースアイテムの基本特性ビット配列 / Flags */
41
42     EnumClassFlagGroup<ItemGenerationTraitType> gen_flags; /*!< ベースアイテムの生成特性ビット配列 / flags for generate */
43
44     DEPTH locale[4]{}; /*!< ベースアイテムの生成階テーブル / Allocation level(s) */
45     PROB chance[4]{}; /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */
46
47     DEPTH level{}; /*!< ベースアイテムの基本生成階 / Level */
48     BIT_FLAGS8 extra{}; /*!< その他色々のビットフラグ配列 / Something */
49
50     TERM_COLOR d_attr{}; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
51     SYMBOL_CODE d_char{}; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */
52
53     TERM_COLOR x_attr{}; /*!< 設定変更後のアイテムシンボルカラー /  Desired object attribute */
54     SYMBOL_CODE x_char{}; /*!< 設定変更後のアイテムシンボルアルファベット /  Desired object character */
55
56     IDX flavor{}; /*!< 未鑑定名の何番目を当てるか(0は未鑑定名なし) / Special object flavor (or zero) */
57     bool easy_know{}; /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */
58     bool aware{}; /*!< ベースアイテムが鑑定済かどうか /  The player is "aware" of the item's effects */
59     bool tried{}; /*!< ベースアイテムを未鑑定のまま試したことがあるか /  The player has "tried" one of the items */
60
61     RandomArtActType act_idx{}; /*!< 発動能力のID /  Activative ability index */
62 };
63
64 extern std::vector<object_kind> k_info;
65
66 class ObjectType;
67 SYMBOL_CODE object_char(ObjectType *o_ptr);