OSDN Git Service

[Fix] #38796 マーフォーク用の rgold_adj を追加。 / Add to rgold_adj for Merfolk.
[hengband/hengband.git] / src / bldg.c
index 4579f2f..e701c87 100644 (file)
 #include "world.h"
 #include "sort.h"
 
+#include "avatar.h"
 #include "mutation.h"
 #include "quest.h"
+#include "artifact.h"
+#include "cmd-spell.h"
+#include "rumor.h"
+#include "player-status.h"
+#include "spells-status.h"
 
 /*!
  * ループ中で / hack as in leave_store in store.c
@@ -1866,7 +1872,6 @@ static bool kankin(void)
                                object_prep(&forge, lookup_kind(prize_list[num-1].tval, prize_list[num-1].sval));
                                apply_magic(&forge, object_level, AM_NO_FIXED_ART);
 
-                               /* Identify it fully */
                                object_aware(&forge);
                                object_known(&forge);
 
@@ -3482,8 +3487,6 @@ static void building_recharge(void)
 #else
        msg_format("%^s %s recharged for %d gold.", tmp_str, ((o_ptr->number > 1) ? "were" : "was"), price);
 #endif
-
-       /* Combine / Reorder the pack (later) */
        p_ptr->update |= (PU_COMBINE | PU_REORDER);
 
        p_ptr->window |= (PW_INVEN);
@@ -3626,8 +3629,6 @@ static void building_recharge_all(void)
        /* Give feedback */
        msg_format(_("$%d で再充填しました。", "You pay %d gold."), total_cost);
        msg_print(NULL);
-
-       /* Combine / Reorder the pack (later) */
        p_ptr->update |= (PU_COMBINE | PU_REORDER);
 
        p_ptr->window |= (PW_INVEN);
@@ -3670,7 +3671,7 @@ bool tele_town(void)
 
                if ((i == NO_TOWN) || (i == SECRET_TOWN) || (i == p_ptr->town_num) || !(p_ptr->visit & (1L << (i - 1)))) continue;
 
-               sprintf(buf, "%c) %-20s", I2A(i - 1), town[i].name);
+               sprintf(buf, "%c) %-20s", I2A(i - 1), town_info[i].name);
                prt(buf, 5 + i, 5);
                num++;
        }
@@ -3751,7 +3752,6 @@ static bool research_mon(void)
                                   "Enter character to be identified(^A:All,^U:Uniqs,^N:Non uniqs,^M:Name): "), &sym, FALSE)) 
 
        {
-               /* Restore */
                screen_load();
 
                return (FALSE);
@@ -3785,8 +3785,6 @@ static bool research_mon(void)
                if (!get_string(_("名前(英語の場合小文字で可)", "Enter name:"),temp, 70))
                {
                        temp[0]=0;
-
-                       /* Restore */
                        screen_load();
 
                        return FALSE;
@@ -3805,7 +3803,6 @@ static bool research_mon(void)
        /* Display the result */
        prt(buf, 16, 10);
 
-
        /* Allocate the "who" array */
        C_MAKE(who, max_r_idx, MONRACE_IDX);
 
@@ -3865,8 +3862,6 @@ static bool research_mon(void)
        {
                /* Free the "who" array */
                C_KILL(who, max_r_idx, MONRACE_IDX);
-
-               /* Restore */
                screen_load();
 
                return (FALSE);
@@ -3971,8 +3966,6 @@ static bool research_mon(void)
 
        /* Free the "who" array */
        C_KILL(who, max_r_idx, MONRACE_IDX);
-
-       /* Restore */
        screen_load();
 
        return (!notpicked);
@@ -4199,7 +4192,7 @@ void do_cmd_quest(void)
 {
        if(p_ptr->wild_mode) return;
 
-       p_ptr->energy_use = 100;
+       take_turn(p_ptr, 100);;
 
        if (!cave_have_flag_bold(p_ptr->y, p_ptr->x, FF_QUEST_ENTER))
        {
@@ -4241,7 +4234,7 @@ void do_cmd_bldg(void)
 
        if(p_ptr->wild_mode) return;
 
-       p_ptr->energy_use = 100;
+       take_turn(p_ptr, 100);;
 
        if (!cave_have_flag_bold(p_ptr->y, p_ptr->x, FF_BLDG))
        {
@@ -4279,7 +4272,7 @@ void do_cmd_bldg(void)
                        command_new = SPECIAL_KEY_BUILDING;
 
                        /* No energy needed to re-enter the arena */
-                       p_ptr->energy_use = 0;
+                       free_turn(p_ptr);
                }
 
                return;
@@ -4296,7 +4289,7 @@ void do_cmd_bldg(void)
                command_new = SPECIAL_KEY_BUILDING;
 
                /* No energy needed to re-enter the arena */
-               p_ptr->energy_use = 0;
+               free_turn(p_ptr);
 
                return;
        }