2 * @brief 剣・鈍器・長柄/斧武器に耐性等の追加効果を付与する処理
7 #include "object-enchant/weapon/melee-weapon-enchanter.h"
8 #include "artifact/random-art-generator.h"
9 #include "system/item-entity.h"
11 MeleeWeaponEnchanter::MeleeWeaponEnchanter(PlayerType *player_ptr, ItemEntity *o_ptr, DEPTH level, int power)
12 : AbstractWeaponEnchanter(o_ptr, level, power)
13 , player_ptr(player_ptr)
18 * @brief 打撃系オブジェクトに生成ランクごとの強化を与えるサブルーチン
19 * @details power > 2はデバッグ専用.
21 void MeleeWeaponEnchanter::apply_magic()
23 if (this->should_skip) {
27 if (this->power > 1) {
32 if (this->power < -1) {
38 * @brief アーティファクト生成・ダイス強化処理
39 * @details power > 2はデバッグ専用.
41 void MeleeWeaponEnchanter::strengthen()
43 if ((this->power > 2) || one_in_(40)) {
44 become_random_artifact(this->player_ptr, this->o_ptr, false);
48 this->give_ego_index();
49 if (this->o_ptr->is_random_artifact()) {
53 while (one_in_(10 * this->o_ptr->dd * this->o_ptr->ds)) {
57 if (this->o_ptr->dd > 9) {