OSDN Git Service

Merge remote-tracking branch 'remotes/hengband-osx/For2.2.2-Refactoring-English-New...
[hengband/hengband.git] / src / market / building-recharger.c
index de99a48..303d877 100644 (file)
@@ -1,12 +1,22 @@
-#include "system/angband.h"
-#include "market/building-recharger.h"
-#include "object/object-hook.h"
-#include "object/object-kind.h"
-#include "object/object-flavor.h"
-#include "market/building-util.h"
-#include "inventory/player-inventory.h"
-#include "spell/spells3.h"
+#include "market/building-recharger.h"
 #include "autopick/autopick.h"
+#include "core/asking-player.h"
+#include "core/player-update-types.h"
+#include "core/window-redrawer.h"
+#include "flavor/flavor-describer.h"
+#include "flavor/object-flavor-types.h"
+#include "floor/floor-object.h"
+#include "inventory/inventory-slot-types.h"
+#include "market/building-util.h"
+#include "object-enchant/special-object-flags.h"
+#include "object-hook/hook-magic.h"
+#include "object/item-tester-hooker.h"
+#include "object/item-use-flags.h"
+#include "object/object-kind.h"
+#include "perception/object-perception.h"
+#include "spell-kind/spells-perception.h"
+#include "term/screen-processor.h"
+#include "view/display-messages.h"
 
 /*!
  * @brief 魔道具の使用回数を回復させる施設のメインルーチン / Recharge rods, wands and staffs
@@ -40,9 +50,9 @@ void building_recharge(player_type *player_ptr)
     k_ptr = &k_info[o_ptr->k_idx];
 
     /*
-        * We don't want to give the player free info about
-        * the level of the item or the number of charges.
-        */
+     * We don't want to give the player free info about
+     * the level of the item or the number of charges.
+     */
     /* The item must be "known" */
     char tmp_str[MAX_NLEN];
     if (!object_is_known(o_ptr)) {
@@ -54,7 +64,7 @@ void building_recharge(player_type *player_ptr)
         {
             player_ptr->au -= 50;
             identify_item(player_ptr, o_ptr);
-            object_desc(player_ptr, tmp_str, o_ptr, 0);
+            describe_flavor(player_ptr, tmp_str, o_ptr, 0);
             msg_format(_("%s です。", "You have: %s."), tmp_str);
 
             autopick_alter_item(player_ptr, item, FALSE);
@@ -82,8 +92,7 @@ void building_recharge(player_type *player_ptr)
         price = MAX(10, price);
     }
 
-    if (o_ptr->tval == TV_WAND
-        && (o_ptr->pval / o_ptr->number >= k_ptr->pval)) {
+    if (o_ptr->tval == TV_WAND && (o_ptr->pval / o_ptr->number >= k_ptr->pval)) {
         if (o_ptr->number > 1) {
             msg_print(_("この魔法棒はもう充分に充填されています。", "These wands are already fully charged."));
         } else {
@@ -102,7 +111,7 @@ void building_recharge(player_type *player_ptr)
     }
 
     if (player_ptr->au < price) {
-        object_desc(player_ptr, tmp_str, o_ptr, OD_NAME_ONLY);
+        describe_flavor(player_ptr, tmp_str, o_ptr, OD_NAME_ONLY);
 #ifdef JP
         msg_format("%sを再充填するには$%d 必要です!", tmp_str, price);
 #else
@@ -116,8 +125,7 @@ void building_recharge(player_type *player_ptr)
 #ifdef JP
         if (get_check(format("そのロッドを$%d で再充填しますか?", price)))
 #else
-        if (get_check(format("Recharge the %s for %d gold? ",
-                ((o_ptr->number > 1) ? "rods" : "rod"), price)))
+        if (get_check(format("Recharge the %s for %d gold? ", ((o_ptr->number > 1) ? "rods" : "rod"), price)))
 #endif
 
         {
@@ -132,8 +140,8 @@ void building_recharge(player_type *player_ptr)
         else
             max_charges = o_ptr->number * k_ptr->pval - o_ptr->pval;
 
-        charges = (PARAMETER_VALUE)get_quantity(format(_("一回分$%d で何回分充填しますか?", "Add how many charges for %d gold? "), price),
-            MIN(player_ptr->au / price, max_charges));
+        charges = (PARAMETER_VALUE)get_quantity(
+            format(_("一回分$%d で何回分充填しますか?", "Add how many charges for %d gold? "), price), MIN(player_ptr->au / price, max_charges));
 
         if (charges < 1)
             return;
@@ -143,7 +151,7 @@ void building_recharge(player_type *player_ptr)
         o_ptr->ident &= ~(IDENT_EMPTY);
     }
 
-    object_desc(player_ptr, tmp_str, o_ptr, 0);
+    describe_flavor(player_ptr, tmp_str, o_ptr, 0);
 #ifdef JP
     msg_format("%sを$%d で再充填しました。", tmp_str, price);
 #else