OSDN Git Service

e382d9f0e05028c3bf3eab50c5811623d1901aef
[hengbandforosx/hengbandosx.git] / src / system / artifact-type-definition.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 "system/object-type-definition.h"
8 #include "util/flag-group.h"
9
10 #include <string>
11 #include <vector>
12
13 /*!
14  * @struct artifact_type
15  * @brief 固定アーティファクト情報の構造体 / Artifact structure.
16  * @details
17  * @note
18  * the save-file only writes "cur_num" to the savefile.
19  * "max_num" is always "1" (if that artifact "exists")
20  */
21 enum class RandomArtActType : short;
22 struct artifact_type {
23     ARTIFACT_IDX idx{};
24
25     std::string name; /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
26     std::string text; /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
27         ItemKindType tval{};            /*!< ベースアイテム大項目ID / Artifact type */
28         OBJECT_SUBTYPE_VALUE sval{};    /*!< ベースアイテム小項目ID / Artifact sub type */
29         PARAMETER_VALUE pval{}; /*!< pval修正値 / Artifact extra info */
30         HIT_PROB to_h{};                        /*!< 命中ボーナス値 /  Bonus to hit */
31         HIT_POINT to_d{};               /*!< ダメージボーナス値 / Bonus to damage */
32         ARMOUR_CLASS to_a{};                    /*!< ACボーナス値 / Bonus to armor */
33         ARMOUR_CLASS ac{};                      /*!< 上書きベースAC値 / Base armor */
34         DICE_NUMBER dd{};
35         DICE_SID ds{};  /*!< ダイス値 / Damage when hits */
36         WEIGHT weight{};                /*!< 重量 / Weight */
37         PRICE cost{};                   /*!< 基本価格 / Artifact "cost" */
38         TrFlags flags{};       /*! アイテムフラグ / Artifact Flags */
39         EnumClassFlagGroup<ItemGenerationTraitType> gen_flags;  /*! アイテム生成フラグ / flags for generate */
40         DEPTH level{};          /*! 基本生成階 / Artifact level */
41         RARITY rarity{};                /*! レアリティ / Artifact rarity */
42         byte cur_num{};         /*! 現在の生成数 / Number created (0 or 1) */
43         byte max_num{};         /*! (未使用)最大生成数 / Unused (should be "1") */
44         FLOOR_IDX floor_id{};      /*! アイテムを落としたフロアのID / Leaved on this location last time */
45     RandomArtActType act_idx{}; /*! 発動能力ID / Activative ability index */
46 };
47
48 extern std::vector<artifact_type> a_info;