OSDN Git Service

Changed *Slay* Evil multiplier to match what's in melee1.c.
[hengbandforosx/hengbandosx.git] / src / store.c
index 4d5755b..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"
@@ -19,6 +20,7 @@
 #include "cmd-spell.h"
 #include "rumor.h"
 #include "player-status.h"
+#include "object-hook.h"
 
 #define MIN_STOCK 12
 
@@ -1918,229 +1920,235 @@ static byte rgold_adj[MAX_RACES][MAX_RACES] =
        /*Hum, HfE, Elf,  Hal, Gno, Dwa, HfO, HfT, Dun, HiE, Barbarian,
         HfOg, HGn, HTn, Cyc, Yek, Klc, Kbd, Nbl, DkE, Drc, Mind Flayer,
         Imp,  Glm, Skl, Zombie, Vampire, Spectre, Fairy, Beastman, Ent,
-        Angel, Demon, Kutar */
+        Angel, Demon, Kutar, Android, Merfolk */
 
        /* Human */
        { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
          124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
          115, 105, 125, 125, 125, 125, 105, 120, 105,  95, 140,
-         100, 120, 110, 105 },
+         100, 120, 110, 105, 110 },
 
        /* Half-Elf */
        { 110, 100, 100, 105, 110, 120, 125, 130, 110, 100, 110,
          120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
          120, 110, 110, 110, 120, 110, 100, 125, 100,  95, 140,
-         110, 115, 110, 110 },
+         110, 115, 110, 110, 110 },
 
        /* Elf */
        { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
          120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
          120, 115, 110, 110, 120, 110, 100, 125, 100,  95, 140,
-         110, 110, 105, 110 },
+         110, 110, 105, 110, 110 },
 
        /* Halfling */
        { 115, 110, 105,  95, 105, 110, 115, 130, 115, 105, 115,
          125, 120, 120, 125, 115, 110, 120, 120, 120, 115, 115,
          120, 110, 120, 120, 130, 110, 110, 130, 110,  95, 140,
-         115, 120, 105, 115 },
+         115, 120, 105, 115, 105 },
 
        /* Gnome */
        { 115, 115, 110, 105,  95, 110, 115, 130, 115, 110, 115,
          120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
          120, 101, 110, 110, 120, 120, 115, 130, 115,  95, 140,
-         115, 110, 110, 115 },
+         115, 110, 110, 115, 110 },
 
        /* Dwarf */
        { 115, 120, 120, 110, 110,  95, 125, 135, 115, 120, 115,
          125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
          120, 105, 115, 115, 115, 115, 120, 130, 120,  95, 140,
-         115, 110, 115, 115 },
+         115, 110, 115, 115, 120 },
 
        /* Half-Orc */
        { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
          110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
          115, 125, 120, 120, 115, 120, 125, 115, 125,  95, 140,
-         115, 110, 115, 115 },
+         115, 110, 115, 115, 125 },
 
        /* Half-Troll */
        { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
          110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
          110, 115, 112, 112, 115, 112, 120, 110, 120,  95, 140,
-         110, 110, 115, 110 },
+         110, 110, 115, 110, 130 },
 
        /* Amberite */
        { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
          120, 120, 105, 120, 115, 105, 115, 120, 110, 105, 105,
          120, 105, 120, 120, 125, 120, 105, 135, 105,  95, 140,
-         100, 110, 110, 100 },
+         100, 110, 110, 100, 110 },
 
        /* High_Elf */
        { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
          125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
          125, 115, 120, 120, 125, 120, 100, 125, 100,  95, 140,
-         110, 110, 105, 110 },
+         110, 110, 105, 110, 110 },
 
        /* Human / Barbarian (copied from human) */
        { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
          124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
          115, 105, 125, 125, 130, 125, 115, 120, 115,  95, 140,
-         100, 120, 110, 100 },
+         100, 120, 110, 100, 110 },
 
        /* Half-Ogre: theoretical, copied from half-troll */
        { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
          110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
          110, 115, 112, 112, 115, 112, 120, 110, 120,  95, 140,
-         110, 110, 115, 110 },
+         110, 110, 115, 110, 120 },
 
        /* Half-Giant: theoretical, copied from half-troll */
        { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
          110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
          110, 115, 112, 112, 115, 112, 130, 120, 130,  95, 140,
-         110, 110, 115, 110 },
+         110, 110, 115, 110, 115 },
 
        /* Half-Titan: theoretical, copied from High_Elf */
        { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
          125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
          125, 115, 120, 120, 120, 120, 130, 130, 130,  95, 140,
-         110, 110, 115, 110 },
+         110, 110, 115, 110, 108 },
 
        /* Cyclops: theoretical, copied from half-troll */
        { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
          110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
          110, 115, 112, 112, 115, 112, 130, 130, 130,  95, 140,
-         110, 110, 115, 110 },
+         110, 110, 115, 110, 115 },
 
        /* Yeek: theoretical, copied from Half-Orc */
        { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
          110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
          115, 125, 120, 120, 120, 120, 130, 130, 130,  95, 140,
-         115, 110, 115, 115 },
+         115, 110, 115, 115, 110 },
 
        /* Klackon: theoretical, copied from Gnome */
        { 115, 115, 110, 105,  95, 110, 115, 130, 115, 110, 115,
          120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
          120, 101, 110, 110, 120, 120, 130, 130, 130,  95, 140,
-         115, 110, 115, 115 },
+         115, 110, 115, 115, 110 },
 
        /* Kobold: theoretical, copied from Half-Orc */
        { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
          110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
          115, 125, 120, 120, 120, 120, 130, 130, 130,  95, 140,
-         115, 110, 115, 115 },
+         115, 110, 115, 115, 120 },
 
        /* Nibelung: theoretical, copied from Dwarf */
        { 115, 120, 120, 110, 110,  95, 125, 135, 115, 120, 115,
          125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
          120, 105, 115, 115, 120, 120, 130, 130, 130,  95, 140,
-         115, 135, 115, 115 },
+         115, 135, 115, 115, 120 },
 
        /* Dark Elf */
        { 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
          115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
          110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
-         110, 101, 115, 110 },
+         110, 101, 115, 110, 115 },
 
        /* Draconian: theoretical, copied from High_Elf */
        { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
          125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
          125, 115, 120, 120, 120, 120, 130, 130, 130,  95, 140,
-         110, 110, 115, 110 },
+         110, 110, 115, 110, 115 },
 
        /* Mind Flayer: theoretical, copied from High_Elf */
        { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
          125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
          125, 115, 120, 120, 120, 120, 130, 130, 130,  95, 140,
-         110, 110, 115, 110 },
+         110, 110, 115, 110, 110 },
 
        /* Imp: theoretical, copied from High_Elf */
        { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
          125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
          125, 115, 120, 120, 120, 120, 130, 130, 130, 120, 120,
-         110, 110, 115, 110 },
+         110, 110, 115, 110, 120 },
 
        /* Golem: theoretical, copied from High_Elf */
        { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
          125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
          125, 115, 120, 120, 120, 120, 130, 130, 130,  95, 140,
-         110, 110, 115, 110 },
+         110, 110, 115, 110, 110 },
 
        /* Skeleton: theoretical, copied from half-orc */
        { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
          110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
          115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
-         115, 110, 125, 115 },
+         115, 110, 125, 115, 110 },
 
        /* Zombie: Theoretical, copied from half-orc */
        { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
          110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
          115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
-         115, 110, 125, 115 },
+         115, 110, 125, 115, 110 },
 
        /* Vampire: Theoretical, copied from half-orc */
        { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
          110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
          115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
-         115, 110, 125, 115 },
+         115, 110, 125, 115, 120 },
 
        /* Spectre: Theoretical, copied from half-orc */
        { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
          110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
          115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
-         115, 110, 125, 115 },
+         115, 110, 125, 115, 110 },
 
        /* Sprite: Theoretical, copied from half-orc */
        { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
          110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
          115, 125, 120, 120, 120, 120, 130, 130, 130,  95, 140,
-         115, 110, 105, 115 },
+         115, 110, 105, 115, 110 },
 
        /* Beastman: Theoretical, copied from half-orc */
        { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
          110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
          115, 125, 120, 120, 120, 120, 130, 130, 130,  95, 140,
-         115, 110, 115, 115 },
+         115, 110, 115, 115, 125 },
 
        /* Ent */
        { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
          120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
          120, 115, 110, 110, 120, 110, 100, 125, 100,  95, 140,
-         110, 110, 105, 110 },
+         110, 110, 105, 110, 110 },
 
        /* Angel */
        {  95,  95,  95,  95,  95,  95,  95,  95,  95,  95,  95,
           95,  95,  95,  95,  95,  95,  95,  95,  95,  95,  95,
           95,  95,  95,  95,  95,  95,  95,  95,  95,  95, 160,
-          95,  95,  95,  95 },
+          95,  95,  95,  95,  95 },
 
        /* Demon */
        { 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
          140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
          140, 140, 140, 140, 140, 140, 140, 140, 140, 160, 120,
-         140, 140, 140, 140 },
+         140, 140, 140, 140, 140 },
 
        /* Dunadan */
        { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
          124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
          115, 105, 125, 125, 125, 125, 105, 120, 105,  95, 140,
-         100, 120, 110, 100 },
+         100, 120, 110, 100, 110 },
 
        /* Shadow Fairy */
        { 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
          115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
          110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
-         110, 101, 115, 110 },
+         110, 101, 115, 110, 115 },
 
        /* Kutar */
        { 110, 110, 105, 105, 110, 115, 115, 115, 110, 105, 110,
          115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
          115, 115, 125, 125, 125, 125, 105, 115, 105,  95, 140,
-         110, 115, 100, 110 },
+         110, 115, 100, 110, 110 },
 
        /* Android */
        { 105, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
          124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
          115, 105, 125, 125, 125, 125, 105, 120, 105,  95, 140,
-         100, 120, 110, 100 },
+         100, 120, 110, 100, 110 },
+
+       /* Merfolk */
+       { 110, 110, 110, 105, 110, 120, 125, 130, 110, 110, 110,
+         120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
+         120, 110, 110, 110, 120, 110, 110, 125, 110,  95, 140,
+         110, 115, 110, 110, 100 },
 };
 
 
@@ -2247,7 +2255,7 @@ static void mass_produce(object_type *o_ptr)
        int size = 1;
        DISCOUNT_RATE discount = 0;
 
-       s32b cost = object_value(o_ptr);
+       PRICE cost = object_value(o_ptr);
 
 
        /* Analyze the type */
@@ -2516,7 +2524,7 @@ static void store_object_absorb(object_type *o_ptr, object_type *j_ptr)
  */
 static int store_check_num(object_type *o_ptr)
 {
-       int        i;
+       int i;
        object_type *j_ptr;
 
        /* The "home" acts like the player */
@@ -2999,9 +3007,9 @@ bool combine_and_reorder_home(int store_num)
  */
 static int home_carry(object_type *o_ptr)
 {
-       int                             slot;
-       s32b                       value;
-       int     i;
+       int slot;
+       PRICE value;
+       int i;
        object_type *j_ptr;
        bool old_stack_force_notes = stack_force_notes;
        bool old_stack_force_costs = stack_force_costs;
@@ -3104,8 +3112,8 @@ static int home_carry(object_type *o_ptr)
  */
 static int store_carry(object_type *o_ptr)
 {
-       int     i, slot;
-       s32b    value, j_value;
+       int i, slot;
+       PRICE value, j_value;
        object_type *j_ptr;
 
 
@@ -3270,7 +3278,7 @@ static void store_item_optimize(INVENTORY_IDX item)
  */
 static bool black_market_crap(object_type *o_ptr)
 {
-       int     i, j;
+       int i, j;
 
        /* Ego items are never crap */
        if (object_is_ego(o_ptr)) return (FALSE);
@@ -3462,8 +3470,8 @@ static void store_create(void)
  */
 static bool noneedtobargain(PRICE minprice)
 {
-       s32b good = st_ptr->good_buy;
-       s32b bad = st_ptr->bad_buy;
+       PRICE good = st_ptr->good_buy;
+       PRICE bad = st_ptr->bad_buy;
 
        /* Cheap items are "boring" */
        if (minprice < 10L) return (TRUE);
@@ -3525,12 +3533,12 @@ static void updatebargain(PRICE price, PRICE minprice, int num)
  */
 static void display_entry(int pos)
 {
-       int             i, cur_col;
+       int i, cur_col;
        object_type *o_ptr;
-       s32b            x;
+       s32b x;
 
        GAME_TEXT o_name[MAX_NLEN];
-       char            out_val[160];
+       char out_val[160];
 
        int maxwid = 75;
 
@@ -3620,11 +3628,10 @@ static void display_entry(int pos)
 
                        /* Actually draw the price (not fixed) */
 #ifdef JP
-(void)sprintf(out_val, "%9ld固", (long)x);
+                       (void)sprintf(out_val, "%9ld固", (long)x);
 #else
                        (void)sprintf(out_val, "%9ld F", (long)x);
 #endif
-
                        put_str(out_val, i+6, 68);
                }
 
@@ -3684,7 +3691,7 @@ static void display_inventory(void)
 #ifdef JP
        put_str("          ", 5, 20);
 #else
-       put_str("        ", 5, 20);
+       put_str("        ", 5, 22);
 #endif
 
 
@@ -3696,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)
@@ -3835,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 */
@@ -3915,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);
@@ -3978,10 +3983,10 @@ static s32b last_inc = 0L;
  */
 static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final)
 {
-       s32b            i;
-       concptr         p;
-       char                            buf[128];
-       char            out_val[160];
+       s32b i;
+       concptr p;
+       GAME_TEXT buf[128];
+       GAME_TEXT out_val[160];
 
        /* Clear old increment if necessary */
        if (!allow_inc) last_inc = 0L;
@@ -4009,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 */
@@ -4324,18 +4327,12 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
        int     flag, loop_flag, noneed;
        int     annoyed = 0, final = FALSE;
        bool    cancel = FALSE;
-#ifdef JP
-       concptr pmt = "提示金額";
-#else
-       concptr    pmt = "Offer";
-#endif
+       concptr pmt = _("提示金額", "Offer");
 
        char    out_val[160];
 
-
        *price = 0;
 
-
        /* Obtain the starting offer and the final offer */
        cur_ask = price_item(o_ptr, ot_ptr->max_inflate, TRUE);
        final_ask = price_item(o_ptr, ot_ptr->min_inflate, TRUE);
@@ -4358,12 +4355,7 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
                /* No reason to haggle */
                if (final_ask >= purse)
                {
-#ifdef JP
-                       msg_print("即座にこの金額にまとまった。");
-#else
-                       msg_print("You instantly agree upon the price.");
-#endif
-
+                       msg_print(_("即座にこの金額にまとまった。", "You instantly agree upon the price."));
                        msg_print(NULL);
 
                        /* Offer full purse */
@@ -4373,12 +4365,7 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
                /* No need to haggle */
                else if (noneed)
                {
-#ifdef JP
-                       msg_print("結局この金額にまとまった。");
-#else
-                       msg_print("You eventually agree upon the price.");
-#endif
-
+                       msg_print(_("結局この金額にまとまった。", "You eventually agree upon the price."));
                        msg_print(NULL);
                }
 
@@ -4386,12 +4373,7 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
                else
                {
                        /* Message summary */
-#ifdef JP
-                       msg_print("すんなりとこの金額にまとまった。");
-#else
-                       msg_print("You quickly agree upon the price.");
-#endif
-
+                       msg_print(_("すんなりとこの金額にまとまった。", "You quickly agree upon the price."));
                        msg_print(NULL);
                }
 
@@ -4400,12 +4382,7 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
 
                /* Final offer */
                final = TRUE;
-#ifdef JP
-               pmt = "最終提示金額";
-#else
-               pmt = "Final Offer";
-#endif
-
+               pmt = _("最終提示金額", "Final Offer");
        }
 
        /* Haggle for the whole pile */
@@ -4438,12 +4415,7 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
 
                        (void)sprintf(out_val, "%s :  %ld", pmt, (long)cur_ask);
                        put_str(out_val, 1, 0);
-#ifdef JP
-                       cancel = receive_offer("提示する価格? ",
-#else
-                       cancel = receive_offer("What price do you ask? ",
-#endif
-
+                       cancel = receive_offer(_("提示する価格? ", "What price do you ask? "),
                                                                   &offer, last_offer, -1, cur_ask, final);
 
                        if (cancel)
@@ -4496,11 +4468,7 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
                        {
                                cur_ask = final_ask;
                                final = TRUE;
-#ifdef JP
-                               pmt = "最終提示金額";
-#else
-                               pmt = "Final Offer";
-#endif
+                               pmt = _("最終提示金額", "Final Offer");
 
                                annoyed++;
                                if (annoyed > 3)
@@ -4525,12 +4493,7 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
                                allow_inc = TRUE;
                                prt("", 1, 0);
                                (void)sprintf(out_val,
-#ifdef JP
-                                             "前回の提示価格 $%ld", (long)last_offer);
-#else
-                                                         "Your last bid %ld", (long)last_offer);
-#endif
-
+                                       _("前回の提示価格 $%ld", "Your last bid %ld"), (long)last_offer);
                                put_str(out_val, 1, 39);
                                say_comment_3(cur_ask, annoyed);
                        }
@@ -4571,11 +4534,7 @@ static void store_purchase(void)
 
        if (cur_store_num == STORE_MUSEUM)
        {
-#ifdef JP
-               msg_print("博物館から取り出すことはできません。");
-#else
-               msg_print("Museum.");
-#endif
+               msg_print(_("博物館から取り出すことはできません。", "Museum."));
                return;
        }
 
@@ -4583,23 +4542,12 @@ static void store_purchase(void)
        if (st_ptr->stock_num <= 0)
        {
                if (cur_store_num == STORE_HOME)
-#ifdef JP
-                       msg_print("我が家には何も置いてありません。");
-#else
-                       msg_print("Your home is empty.");
-#endif
-
+                       msg_print(_("我が家には何も置いてありません。", "Your home is empty."));
                else
-#ifdef JP
-                       msg_print("現在商品の在庫を切らしています。");
-#else
-                       msg_print("I am currently out of stock.");
-#endif
-
+                       msg_print(_("現在商品の在庫を切らしています。", "I am currently out of stock."));
                return;
        }
 
-
        /* Find the number of objects on this and following pages */
        i = (st_ptr->stock_num - store_top);
 
@@ -4676,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;
@@ -4729,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 */
@@ -4773,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);
@@ -4944,7 +4888,6 @@ static void store_sell(void)
 
        object_type forge;
        object_type *q_ptr;
-
        object_type *o_ptr;
 
        concptr q, s;
@@ -4992,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;
@@ -5056,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)
@@ -5162,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;
@@ -5330,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);
@@ -5761,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))
@@ -5775,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."));
@@ -5788,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;
@@ -5800,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();
@@ -5981,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;