#include "inventory/inventory-slot-types.h"
#include "object-enchant/object-boost.h"
#include "object-enchant/object-ego.h"
-#include "system/object-type-definition.h"
#include "sv-definition/sv-protector-types.h"
+#include "system/object-type-definition.h"
-BootsEnchanter::BootsEnchanter(player_type *owner_ptr, object_type *o_ptr, DEPTH level, int power)
- : ArmorEnchanterBase{ o_ptr, level, power }
- , owner_ptr(owner_ptr)
+/*
+ * @brief コンストラクタ
+ * @param player_ptr プレイヤーへの参照ポインタ
+ * @param o_ptr 強化を与えたいオブジェクトの構造体参照ポインタ
+ * @param level 生成基準階
+ * @param power 生成ランク
+ */
+BootsEnchanter::BootsEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
+ : AbstractProtectorEnchanter{ o_ptr, level, power }
+ , player_ptr(player_ptr)
{
}
/*
- * power > 2 is debug only
+ * power > 2はデバッグ専用.
*/
void BootsEnchanter::apply_magic()
{
if (this->power > 1) {
if (one_in_(20) || (this->power > 2)) {
- become_random_artifact(this->owner_ptr, this->o_ptr, false);
+ become_random_artifact(this->player_ptr, this->o_ptr, false);
return;
}
this->o_ptr->name2 = get_random_ego(INVEN_FEET, true);
- } else if (this->power < -1) {
+ return;
+ }
+
+ if (this->power < -1) {
this->o_ptr->name2 = get_random_ego(INVEN_FEET, false);
}
}