#include "market/building-craft-fix.h"
+#include "artifact/fixed-art-types.h"
+#include "artifact/artifact-info.h"
+#include "core/asking-player.h"
+#include "core/player-update-types.h"
#include "core/stuff-handler.h"
+#include "flavor/flavor-describer.h"
+#include "flavor/object-flavor-types.h"
+#include "floor/floor-object.h"
#include "inventory/inventory-object.h"
-#include "inventory/player-inventory.h"
#include "market/building-util.h"
-#include "object/artifact.h"
+#include "object-enchant/object-boost.h"
+#include "object-enchant/special-object-flags.h"
+#include "object-enchant/tr-types.h"
+#include "object-hook/hook-enchant.h"
+#include "object-hook/hook-weapon.h"
+#include "object/item-tester-hooker.h"
#include "object/item-use-flags.h"
-#include "object/object-boost.h"
-#include "object/object-flavor.h"
-#include "object/object-hook.h"
+#include "object/object-flags.h"
+#include "object/object-kind-hook.h"
#include "object/object-kind.h"
-#include "object/object2.h"
-#include "object/special-object-flags.h"
-#include "object/sv-other-types.h"
-#include "object/sv-weapon-types.h"
-#include "object/tr-types.h"
-#include "player/player-effects.h"
+#include "object/object-value.h"
+#include "racial/racial-android.h"
+#include "spell-realm/spells-hex.h"
+#include "sv-definition/sv-other-types.h"
+#include "sv-definition/sv-weapon-types.h"
+#include "term/screen-processor.h"
+#include "util/bit-flags-calculator.h"
+#include "view/display-messages.h"
/*!
* @brief 修復材料のオブジェクトから修復対象に特性を移植する。
* @param from_ptr 修復材料オブジェクトの構造体の参照ポインタ。
* @return 修復対象になるならTRUEを返す。
*/
-static void give_one_ability_of_object(object_type *to_ptr, object_type *from_ptr)
+static void give_one_ability_of_object(player_type *player_ptr, object_type *to_ptr, object_type *from_ptr)
{
BIT_FLAGS to_flgs[TR_FLAG_SIZE];
BIT_FLAGS from_flgs[TR_FLAG_SIZE];
- object_flags(to_ptr, to_flgs);
- object_flags(from_ptr, from_flgs);
+ object_flags(player_ptr, to_ptr, to_flgs);
+ object_flags(player_ptr, from_ptr, from_flgs);
int n = 0;
int cand[TR_FLAG_MAX];
case TR_FIXED_FLAVOR:
break;
default:
- if (have_flag(from_flgs, i) && !have_flag(to_flgs, i)) {
+ if (has_flag(from_flgs, i) && !has_flag(to_flgs, i)) {
if (!(is_pval_flag(i) && (from_ptr->pval < 1)))
cand[n++] = i;
}
}
char basenm[MAX_NLEN];
- object_desc(player_ptr, basenm, o_ptr, OD_NAME_ONLY);
+ describe_flavor(player_ptr, basenm, o_ptr, OD_NAME_ONLY);
prt(format(_("修復する武器 : %s", "Repairing: %s"), basenm), row + 3, 2);
q = _("材料となる武器は?", "Which weapon for material? ");
return 0;
}
- object_desc(player_ptr, basenm, mo_ptr, OD_NAME_ONLY);
+ describe_flavor(player_ptr, basenm, mo_ptr, OD_NAME_ONLY);
prt(format(_("材料とする武器: %s", "Material : %s"), basenm), row + 4, 2);
- PRICE cost = bcost + object_value_real(o_ptr) * 2;
+ PRICE cost = bcost + object_value_real(player_ptr, o_ptr) * 2;
if (!get_check(format(_("$%dかかりますがよろしいですか? ", "Costs %d gold, okay? "), cost)))
return 0;
if (player_ptr->au < cost) {
- object_desc(player_ptr, basenm, o_ptr, OD_NAME_ONLY);
+ describe_flavor(player_ptr, basenm, o_ptr, OD_NAME_ONLY);
msg_format(_("%sを修復するだけのゴールドがありません!", "You do not have the gold to repair %s!"), basenm);
msg_print(NULL);
return 0;
}
- player_ptr->total_weight -= o_ptr->weight;
KIND_OBJECT_IDX k_idx;
if (o_ptr->sval == SV_BROKEN_DAGGER) {
int n = 1;
o_ptr->art_flags[i] |= k_ptr->flags[i];
if (k_ptr->pval)
o_ptr->pval = MAX(o_ptr->pval, randint1(k_ptr->pval));
- if (have_flag(k_ptr->flags, TR_ACTIVATE))
+ if (has_flag(k_ptr->flags, TR_ACTIVATE))
o_ptr->xtra2 = (byte)k_ptr->act_idx;
if (dd_bonus > 0) {
}
}
- if (have_flag(k_ptr->flags, TR_BLOWS)) {
+ if (has_flag(k_ptr->flags, TR_BLOWS)) {
int bmax = MIN(3, MAX(1, 40 / (o_ptr->dd * o_ptr->ds)));
o_ptr->pval = MIN(o_ptr->pval, bmax);
}
- give_one_ability_of_object(o_ptr, mo_ptr);
+ give_one_ability_of_object(player_ptr, o_ptr, mo_ptr);
o_ptr->to_d += MAX(0, (mo_ptr->to_d / 3));
o_ptr->to_h += MAX(0, (mo_ptr->to_h / 3));
o_ptr->to_a += MAX(0, (mo_ptr->to_a));
add_flag(o_ptr->art_flags, TR_IGNORE_ACID);
}
- give_one_ability_of_object(o_ptr, mo_ptr);
- if (!activation_index(o_ptr))
+ give_one_ability_of_object(player_ptr, o_ptr, mo_ptr);
+ if (!activation_index(player_ptr, o_ptr))
one_activation(o_ptr);
if (o_ptr->name1 == ART_NARSIL) {
msg_print(_("これはかなりの業物だったようだ。", "This blade seems to be exceptional."));
}
- object_desc(player_ptr, basenm, o_ptr, OD_NAME_ONLY);
+ describe_flavor(player_ptr, basenm, o_ptr, OD_NAME_ONLY);
#ifdef JP
msg_format("$%dで%sに修復しました。", cost, basenm);
#else
o_ptr->ident &= ~(IDENT_BROKEN);
o_ptr->discount = 99;
- player_ptr->total_weight += o_ptr->weight;
calc_android_exp(player_ptr);
inven_item_increase(player_ptr, mater, -1);
inven_item_optimize(player_ptr, mater);