OSDN Git Service

Merge pull request #1641 from habu1010/feature/fix-class-specific-data-menber-initialize
[hengbandforosx/hengbandosx.git] / src / player-info / magic-eater-data-type.h
1 #pragma once
2
3 #include "system/angband.h"
4
5 #include "object/tval-types.h"
6
7 inline constexpr int EATER_ITEM_GROUP_SIZE = 256; //!< 魔道具1種あたりの最大数
8 inline constexpr int EATER_STAFF_BASE = 0; //!< 杖の開始番号(繰り返しコマンド用)
9 inline constexpr int EATER_WAND_BASE = EATER_STAFF_BASE + EATER_ITEM_GROUP_SIZE; //!< 魔法棒の開始番号(繰り返しコマンド用)
10 inline constexpr int EATER_ROD_BASE = EATER_WAND_BASE + EATER_ITEM_GROUP_SIZE; //!< ロッドの開始番号(繰り返しコマンド用)
11 inline constexpr int32_t EATER_CHARGE = 0x10000L;
12 inline constexpr int32_t EATER_ROD_CHARGE = 0x10L;
13
14 struct magic_eater_data_type {
15     struct magic_type {
16         int32_t charge{}; //!< 充填量 (杖/魔法棒とロッドで仕様が異なる)
17         byte count{}; //!< 取り込んだ回数(杖/魔法棒)もしくは本数(ロッド)
18     };
19
20     magic_eater_data_type();
21
22     std::vector<magic_type> staves{}; //!< 杖のデータ
23     std::vector<magic_type> wands{}; //!< 魔法棒のデータ
24     std::vector<magic_type> rods{}; //!< ロッドのデータ
25     inline static std::vector<magic_type> none{}; //!< いずれの魔道具でもないダミー
26
27     std::vector<magic_type> &get_item_group(tval_type tval);
28 };