#pragma once
-#include "system/angband.h"
+#include <string>
+#include <vector>
+#include "object-enchant/tr-flags.h"
#include "object-enchant/tr-types.h"
#include "object-enchant/trg-types.h"
-#include "system/object-type-definition.h"
+#include "system/angband.h"
+#include "system/system-variables.h"
#include "util/flag-group.h"
-#include <string>
-#include <vector>
-
/* Body Armor */
#define EGO_A_MORGUL 4
#define EGO_A_DEMON 5
#define EGO_ELVENKIND 9
#define EGO_DWARVEN 10
#define EGO_PERMANENCE 11
-#define EGO_YOIYAMI 12
+#define EGO_TWILIGHT 12
#define EGO_URUKISH 13
/* Shields */
#define EGO_CHAOTIC 77
#define EGO_SHARPNESS 78
#define EGO_EARTHQUAKES 79
+#define EGO_W_FAIRLY 83
+#define EGO_W_OMNIVOROUS 84
+#define EGO_W_DARK_REVENGER 85
+#define EGO_KILL_GOOD 86
#define EGO_WEIRD 87
#define EGO_KILL_ANIMAL 88
#define EGO_KILL_EVIL 89
int mul{}; //<! 確率分子
int dev{}; //<! 確率分母
std::vector<tr_type> tr_flags{};
- std::vector<TRG> trg_flags{};
+ std::vector<ItemGenerationTraitType> trg_flags{};
};
/*
* Information about "ego-items".
*/
+enum class RandomArtActType : short;
struct ego_item_type {
+ EGO_IDX idx{};
+
std::string name; //!< エゴの名前
std::string text; //!< フレーバーテキスト
DEPTH level{}; //!< 生成レベル
RARITY rarity{}; //<! レアリティ
+ HIT_PROB base_to_h{}; //!< ベース命中修正
+ int base_to_d{}; //!< べ^スダメージ修正
+ ARMOUR_CLASS base_to_a{}; //!< ベースAC修正
+
HIT_PROB max_to_h{}; //!< 最大ボーナス命中修正
- HIT_POINT max_to_d{}; //!< 最大ボーナスダメージ修正
+ int max_to_d{}; //!< 最大ボーナスダメージ修正
ARMOUR_CLASS max_to_a{}; //!< 最大ボーナスAC修正
PARAMETER_VALUE max_pval{}; //!< 最大pval
PRICE cost{}; //!< コスト
- BIT_FLAGS flags[TR_FLAG_SIZE]{}; //!< 能力/耐性フラグ
- FlagGroup<TRG> gen_flags; //!< 生成時適用フラグ
+ TrFlags flags{}; //!< 能力/耐性フラグ
+ EnumClassFlagGroup<ItemGenerationTraitType> gen_flags; //!< 生成時適用フラグ
std::vector<ego_generate_type> xtra_flags{}; //!< 追加能力/耐性フラグ
- IDX act_idx{}; //!< 発動番号 / Activative ability index
+ RandomArtActType act_idx{}; //!< 発動番号 / Activative ability index
};
-extern EGO_IDX max_e_idx;
extern std::vector<ego_item_type> e_info;
+class ObjectType;
+class PlayerType;
byte get_random_ego(byte slot, bool good);
-void apply_ego(player_type *player_ptr, object_type *o_ptr, DEPTH lev);
+void apply_ego(ObjectType *o_ptr, DEPTH lev);