OSDN Git Service

Reworded the English description for glyph of warding spells to make the conditional...
[hengbandforosx/hengbandosx.git] / src / store.c
index 7edda25..3805de2 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "angband.h"
 #include "cmd-item.h"
+#include "cmd-smith.h"
 #include "cmd-zapwand.h"
 #include "cmd-magiceat.h"
 #include "store.h"
@@ -3690,7 +3691,7 @@ static void display_inventory(void)
 #ifdef JP
        put_str("          ", 5, 20);
 #else
-       put_str("        ", 5, 20);
+       put_str("        ", 5, 22);
 #endif
 
 
@@ -3702,7 +3703,7 @@ static void display_inventory(void)
 
                /* Indicate the "current page" */
                /* Trailing spaces are to display (Page xx) and (Page x) */
-               put_str(format(_("(%dページ)  ", "(Page %d)  "), store_top/store_bottom + 1), 5, 20);
+               put_str(format(_("(%dページ)  ", "(Page %d)  "), store_top/store_bottom + 1), 5, _(20, 22));
        }
 
        if (cur_store_num == STORE_HOME || cur_store_num == STORE_MUSEUM)
@@ -3841,8 +3842,6 @@ static int get_stock(COMMAND_CODE *com_val, concptr pmt, int i, int j)
                        return (TRUE);
                }
        }
-
-       /* Paranoia */
        msg_print(NULL);
 
        /* Assume failure */
@@ -3921,7 +3920,7 @@ static int increase_insults(void)
                st_ptr->bad_buy = 0;
 
                /* Open tomorrow */
-               st_ptr->store_open = turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
+               st_ptr->store_open = current_world_ptr->game_turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
 
                /* Closed */
                return (TRUE);
@@ -4015,8 +4014,6 @@ static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final)
        {
                sprintf(buf, "%s ", pmt);
        }
-
-       /* Paranoia */
        msg_print(NULL);
 
        /* Ask until done */
@@ -4627,11 +4624,7 @@ static void store_purchase(void)
                {
                        msg_format(_("一つにつき $%ldです。", "That costs %ld gold per item."), (long)(best));
                }
-
-               /* Get a quantity */
                amt = get_quantity(NULL, o_ptr->number);
-
-               /* Allow user abort */
                if (amt <= 0) return;
        }
        j_ptr = &forge;
@@ -4680,7 +4673,7 @@ static void store_purchase(void)
                        choice = purchase_haggle(j_ptr, &price);
 
                        /* Hack -- Got kicked out */
-                       if (st_ptr->store_open >= turn) return;
+                       if (st_ptr->store_open >= current_world_ptr->game_turn) return;
                }
 
                /* Player wants it */
@@ -4724,7 +4717,7 @@ static void store_purchase(void)
                                msg_format(_("%sを $%ldで購入しました。", "You bought %s for %ld gold."), o_name, (long)price);
 
                                strcpy(record_o_name, o_name);
-                               record_turn = turn;
+                               record_turn = current_world_ptr->game_turn;
 
                                if (record_buy) do_cmd_write_nikki(NIKKI_BUY, 0, o_name);
                                object_desc(o_name, o_ptr, OD_NAME_ONLY);
@@ -4895,7 +4888,6 @@ static void store_sell(void)
 
        object_type forge;
        object_type *q_ptr;
-
        object_type *o_ptr;
 
        concptr q, s;
@@ -4943,13 +4935,9 @@ static void store_sell(void)
        /* Assume one item */
        amt = 1;
 
-       /* Find out how many the player wants (letter means "all") */
        if (o_ptr->number > 1)
        {
-               /* Get a quantity */
                amt = get_quantity(NULL, o_ptr->number);
-
-               /* Allow user abort */
                if (amt <= 0) return;
        }
        q_ptr = &forge;
@@ -5007,7 +4995,7 @@ static void store_sell(void)
                choice = sell_haggle(q_ptr, &price);
 
                /* Kicked out */
-               if (st_ptr->store_open >= turn) return;
+               if (st_ptr->store_open >= current_world_ptr->game_turn) return;
 
                /* Sold... */
                if (choice == 0)
@@ -5113,11 +5101,11 @@ static void store_sell(void)
 
                if (-1 == store_check_num(q_ptr))
                {
-                       msg_print(_("それと同じ品物は既に博物館にあるようです。", "The same object as it is already in the Museum."));
+                       msg_print(_("それと同じ品物は既に博物館にあるようです。", "The Museum already has one of those items."));
                }
                else
                {
-                       msg_print(_("博物館に寄贈したものは取り出すことができません!!", "You cannot take items which is given to the Museum back!!"));
+                       msg_print(_("博物館に寄贈したものは取り出すことができません!!", "You cannot take back items which have been donated to the Museum!!"));
                }
 
                if (!get_check(format(_("本当に%sを寄贈しますか?", "Really give %s to the Museum? "), o2_name))) return;
@@ -5281,7 +5269,7 @@ static void museum_remove_object(void)
 
        object_desc(o_name, o_ptr, 0);
 
-       msg_print(_("展示をやめさせたアイテムは二度と見ることはできません!", "You cannot see items which is removed from the Museum!"));
+       msg_print(_("展示をやめさせたアイテムは二度と見ることはできません!", "Once removed from the Museum, an item will be gone forever!"));
        if (!get_check(format(_("本当に%sの展示をやめさせますか?", "Really order to remove %s from the Museum? "), o_name))) return;
 
        msg_format(_("%sの展示をやめさせた。", "You ordered to remove %s."), o_name);
@@ -5712,7 +5700,7 @@ void do_cmd_store(void)
        store_bottom = MIN_STOCK + xtra_stock;
 
        /* Access the player grid */
-       g_ptr = &grid_array[p_ptr->y][p_ptr->x];
+       g_ptr = &current_floor_ptr->grid_array[p_ptr->y][p_ptr->x];
 
        /* Verify a store */
        if (!cave_have_flag_grid(g_ptr, FF_STORE))
@@ -5726,11 +5714,11 @@ void do_cmd_store(void)
 
        old_town_num = p_ptr->town_num;
        if ((which == STORE_HOME) || (which == STORE_MUSEUM)) p_ptr->town_num = 1;
-       if (dun_level) p_ptr->town_num = NO_TOWN;
+       if (current_floor_ptr->dun_level) p_ptr->town_num = NO_TOWN;
        inner_town_num = p_ptr->town_num;
 
        /* Hack -- Check the "locked doors" */
-       if ((town_info[p_ptr->town_num].store[which].store_open >= turn) ||
+       if ((town_info[p_ptr->town_num].store[which].store_open >= current_world_ptr->game_turn) ||
            (ironman_shops))
        {
                msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
@@ -5739,7 +5727,7 @@ void do_cmd_store(void)
        }
 
        /* Calculate the number of store maintainances since the last visit */
-       maintain_num = (turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
+       maintain_num = (current_world_ptr->game_turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
 
        /* Maintain the store max. 10 times */
        if (maintain_num > 10) maintain_num = 10;
@@ -5751,7 +5739,7 @@ void do_cmd_store(void)
                        store_maint(p_ptr->town_num, which);
 
                /* Save the visit */
-               town_info[p_ptr->town_num].store[which].last_visit = turn;
+               town_info[p_ptr->town_num].store[which].last_visit = current_world_ptr->game_turn;
        }
 
        forget_lite();
@@ -5932,14 +5920,14 @@ void do_cmd_store(void)
                if (need_redraw_store_inv) display_inventory();
 
                /* Hack -- get kicked out of the store */
-               if (st_ptr->store_open >= turn) leave_store = TRUE;
+               if (st_ptr->store_open >= current_world_ptr->game_turn) leave_store = TRUE;
        }
 
        select_floor_music();
 
        p_ptr->town_num = old_town_num;
 
-       take_turn(p_ptr, 100);;
+       take_turn(p_ptr, 100);
 
        /* Hack -- Character is no longer in "icky" mode */
        character_icky = FALSE;