OSDN Git Service

Use const pointer for many times referred quest[*]
[hengband/hengband.git] / src / birth.c
index 0826da7..ef07044 100644 (file)
@@ -1821,7 +1821,9 @@ static cptr class_jouhou[MAX_CLASS] =
 
 "¶À»È¤¤¤Ï¡¢ËâÎϤιþ¤á¤é¤ì¤¿¶À¤òºî¤ê½Ð¤·¤Æ¡¢¤½¤ì¤ò¿¨ÇޤȤ·¤Æ¹¶·â¤ò¹Ô¤Ê¤¦¤³¤È¤¬¤Ç¤­¤ë¶ÀËâË¡¤ò»È¤¤¤Þ¤¹¡£¶À»È¤¤¤Ï¶À¤Î¾å¤Ç¼ÂÎϤòȯ´ø¤·¡¢¶À¤Î¾å¤Ç¤ÏÁÇÁᤤ¥Æ¥ì¥Ý¡¼¥È¤¬²Äǽ¤È¤Ê¤ê¤Þ¤¹¡£ËâË¡¤Î¶À¤Ï¡¢¥ì¥Ù¥ë¤Ë¤è¤Ã¤Æ°ìÅÙ¤ËÀ©¸æ¤Ç¤­¤ë¿ô¤¬À©¸Â¤µ¤ì¤Þ¤¹¡£¶ÀËâË¡¤ËɬÍפÊǽÎϤÏÃÎǽ¤Ç¤¹¡£",
 
-"Ǧ¼Ô¤Ï°Å°Ç¤ËÀø¤à¶²¤ë¤Ù¤­°Å»¦¼Ô¤Ç¤¢¤ê¡¢¸÷¸»¤ò»ý¤¿¤º¤Ë¹ÔÆ°¤·¡¢Áê¼ê¤ÎÉÔ°Õ¤ò¤Ä¤­°ì·â¤Ç©¤Îº¬¤ò»ß¤á¤Þ¤¹¡£¤Þ¤¿¡¢Áê¼ê¤òÏǤ魯¤¿¤á¤ÎǦ½Ñ¤â¿È¤Ë¤Ä¤±¤Þ¤¹¡£æ«¤ä¥É¥¢¤ò¸«¤Ä¤±¤ëǽÎϤËÍ¥¤ì¡¢æ«¤Î²ò½ü¤ä¸°³«¤±¤Ë½Ï㤷¤Æ¤¤¤Þ¤¹¡£·ÚÁõ¤ò¹¥¤ß¡¢½Å¤¤³»¤äÉð´ï¤òÁõÈ÷¤¹¤ë¤ÈÃø¤·¤¯Æ°¤­¤¬À©¸Â¤µ¤ì¡¢¤Þ¤¿¡¢½â¤òÁõÈ÷¤·¤è¤¦¤È¤Ï¤·¤Þ¤»¤ó¡£·ÚÁõ¤Ê¤é¤Ð¡¢¥ì¥Ù¥ë¤¬¾å¤¬¤ë¤Ë¤Ä¤ì¤è¤ê®¤¯¤è¤êÀŤ«¤Ë¹ÔÆ°¤Ç¤­¤Þ¤¹¡£¤µ¤é¤ËǦ¼Ô¤Ï¶²Éݤ»¤º¡¢À®Ä¹¤¹¤ì¤ÐÆǤ¬¤Û¤È¤ó¤É¸ú¤«¤Ê¤¯¤Ê¤ê¡¢Æ©ÌÀ¤Ê¤â¤Î¤ò¸«¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£Ç¦½Ñ¤ËɬÍפÊǽÎϤϴïÍѤµ¤Ç¤¹¡£"
+"Ǧ¼Ô¤Ï°Å°Ç¤ËÀø¤à¶²¤ë¤Ù¤­°Å»¦¼Ô¤Ç¤¢¤ê¡¢¸÷¸»¤ò»ý¤¿¤º¤Ë¹ÔÆ°¤·¡¢Áê¼ê¤ÎÉÔ°Õ¤ò¤Ä¤­°ì·â¤Ç©¤Îº¬¤ò»ß¤á¤Þ¤¹¡£¤Þ¤¿¡¢Áê¼ê¤òÏǤ魯¤¿¤á¤ÎǦ½Ñ¤â¿È¤Ë¤Ä¤±¤Þ¤¹¡£æ«¤ä¥É¥¢¤ò¸«¤Ä¤±¤ëǽÎϤËÍ¥¤ì¡¢æ«¤Î²ò½ü¤ä¸°³«¤±¤Ë½Ï㤷¤Æ¤¤¤Þ¤¹¡£·ÚÁõ¤ò¹¥¤ß¡¢½Å¤¤³»¤äÉð´ï¤òÁõÈ÷¤¹¤ë¤ÈÃø¤·¤¯Æ°¤­¤¬À©¸Â¤µ¤ì¡¢¤Þ¤¿¡¢½â¤òÁõÈ÷¤·¤è¤¦¤È¤Ï¤·¤Þ¤»¤ó¡£·ÚÁõ¤Ê¤é¤Ð¡¢¥ì¥Ù¥ë¤¬¾å¤¬¤ë¤Ë¤Ä¤ì¤è¤ê®¤¯¤è¤êÀŤ«¤Ë¹ÔÆ°¤Ç¤­¤Þ¤¹¡£¤µ¤é¤ËǦ¼Ô¤Ï¶²Éݤ»¤º¡¢À®Ä¹¤¹¤ì¤ÐÆǤ¬¤Û¤È¤ó¤É¸ú¤«¤Ê¤¯¤Ê¤ê¡¢Æ©ÌÀ¤Ê¤â¤Î¤ò¸«¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£Ç¦½Ñ¤ËɬÍפÊǽÎϤϴïÍѤµ¤Ç¤¹¡£",
+
+"¥¹¥Ê¥¤¥Ñ¡¼¤Ï°ì·âɬ»¦¤òÁÀ¤¦¶²¤ë¤Ù¤­¼Í¼ê¤Ç¤¹¡£Àº¿À¤ò¹â¤á¤ë¤³¤È¤Ë¤è¤ê¡¢¼Í·â¤Î°ÒÎϤÈÀºÅÙ¤ò¹â¤á¤Þ¤¹¡£¤Þ¤¿¡¢ËâË¡¤ò»È¤¦¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¤¬¡¢¸¦¤®À¡¤Þ¤µ¤ì¤¿Àº¿À¤«¤é·«¤ê½Ð¤µ¤ì¤ë¼Í·â½Ñ¤Ï¤µ¤é¤Ê¤ë°ÒÎϤò¤â¤¿¤é¤¹¤³¤È¤Ç¤·¤ç¤¦¡£¥Æ¥¯¥Ë¥Ã¥¯¤¬É¬ÍפȤµ¤ì¤ë¿¦¶È¤Ç¤¹¡£"
 
 #else
 
@@ -1877,7 +1879,9 @@ static cptr class_jouhou[MAX_CLASS] =
 
 "Mirror-Masters are spell casters; like other mages, they must live by their wits.  They can create magical mirrors, and employ them in the casting of Mirror-Magic spells.  A Mirror-Master standing on a mirror has greater ability and, for example, can perform quick teleports.  The maximum number of Magical Mirrors which can be controlled simultaneously depends on the level.  Intelligence determines a Mirror-Master's spell casting ability.",
 
-"A Ninja is a fearful assassin lurking in darkness.  He or she can navigate effectively with no light source, catch enemies unawares, and kill with a single blow.  Ninjas can use Ninjutsu, and are good at locating hidden traps and doors, disarming traps and picking locks.  Since heavy armors, heavy weapons, or shields will restrict their motion greatly, they prefer light clothes, and become faster and more stealthy as they gain levels.  A Ninja knows no fear and, at high level, becomes almost immune to poison and able to see invisible things.  Dexterity determines a Ninja's ability to use Ninjutsu."
+"A Ninja is a fearful assassin lurking in darkness.  He or she can navigate effectively with no light source, catch enemies unawares, and kill with a single blow.  Ninjas can use Ninjutsu, and are good at locating hidden traps and doors, disarming traps and picking locks.  Since heavy armors, heavy weapons, or shields will restrict their motion greatly, they prefer light clothes, and become faster and more stealthy as they gain levels.  A Ninja knows no fear and, at high level, becomes almost immune to poison and able to see invisible things.  Dexterity determines a Ninja's ability to use Ninjutsu.",
+
+"Snipers are good at shooting, and they can kill targets by a few shots. After they concentrate deeply, they can demonstrate their shooting talents. You can see incredibly firepower of their shots."
 #endif
 };
 
@@ -1963,8 +1967,9 @@ static cptr realm_jouhou[VALID_REALM] =
 
 "²Î½¸¤Ï¡¢²Î¤Ë¤è¤Ã¤Æ¸ú²Ì¤òȯ´ø¤¹¤ëËâË¡¤Ç¤¹¡£ËâË¡¤ÈƱÍÍ¡¢»È¤Ã¤¿»þ¤Ë¸ú²Ì¤Î¤¢¤ë¤â¤Î¤È¡¢²Î¤¤Â³¤±¤ë¤³¤È¤Ë¤è¤Ã¤Æ»ý³¤·¤Æ¸ú²Ì¤òȯ´ø¤¹¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡£¸å¼Ô¤Î¾ì¹ç¤Ï¡¢MP¤Î³¤¯¸Â¤ê¸ú²Ì¤òȯ´ø¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¤¬¡¢Æ±»þ¤Ë²Î¤¨¤ë²Î¤Ï1¤Ä¤À¤±¤È¤¤¤¦À©¸Â¤â¤¢¤ê¤Þ¤¹¡£",
 
-"Éð·Ý¤Î½ñ¤Ï¡¢ÍÍ¡¹¤ÊÀïÆ®¤Îµ»¤Ë¤Ä¤¤¤Æ½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¡£¤³¤ÎËܤϵ»¤ò³Ð¤¨¤ë¤È¤­¤ËÆɤàɬÍפ¬¤¢¤ê¤Þ¤¹¤¬¡¢°ìÅٳФ¨¤¿µ»¤Ï»È¤¦¤Î¤ËËܤò»ý¤ÄɬÍפϤ¢¤ê¤Þ¤»¤ó¡£µ»¤ò»È¤¦¤È¤­¤Ë¤Ïɬ¤ºÉð´ï¤òÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó¡£"
+"Éð·Ý¤Î½ñ¤Ï¡¢ÍÍ¡¹¤ÊÀïÆ®¤Îµ»¤Ë¤Ä¤¤¤Æ½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¡£¤³¤ÎËܤϵ»¤ò³Ð¤¨¤ë¤È¤­¤ËÆɤàɬÍפ¬¤¢¤ê¤Þ¤¹¤¬¡¢°ìÅٳФ¨¤¿µ»¤Ï»È¤¦¤Î¤ËËܤò»ý¤ÄɬÍפϤ¢¤ê¤Þ¤»¤ó¡£µ»¤ò»È¤¦¤È¤­¤Ë¤Ïɬ¤ºÉð´ï¤òÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó¡£",
 
+"¼ö½Ñ¤Ï´÷¤à¤Ù¤­Îΰè¤Ç¤¹¡£Ê£¿ô¤Î¼ö¤¤¤Î¸ÀÍÕ¤ò²Î¤Î¤è¤¦¤Ëˤ®¤Ê¤¬¤é±Ó¾§¤·¤Þ¤¹¡£Â¿¤¯¤Î¼öʸ¤Ï±Ó¾§¤·Â³¤±¤ë¤³¤È¤Ë¤è¤Ã¤Æ¸ú²Ì¤¬»ý³¤µ¤ì¤Þ¤¹¡£¼öʸ¤Ë¤ÏÁê¼ê¤Î¹ÔÆ°¤ò«Çû¤¹¤ë¤â¤Î¡¢¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¤â¤Î¡¢¹¶·â¤ËÂФ·¤ÆÈ¿·â¤¹¤ë¤â¤Î¤¬Â¿¤¯¤¢¤ê¤Þ¤¹¡£"
 #else
 
 "Life magic is very good for healing; it relies mostly on healing, protection and detection spells.  Also life magic have a few attack spells as well.  It said that some high level spell of life magic can disintegrate Undead monsters into ash.",
@@ -1989,11 +1994,13 @@ static cptr realm_jouhou[VALID_REALM] =
 
 "Music magic shows various effects as sing song.  There is two type of song; the one which shows effects instantly and the other one shows effect continuously until SP runs out.  But the latter type has a limit; only one song can be sing at the same time.",
 
-"The books of Kendo describe about various combat techniques.  When learning new techniques, you are required to carry the books, but once you memorizes them, you don't have to carry them.  When using a technique, wielding a weapon is required."
+"The books of Kendo describe about various combat techniques.  When learning new techniques, you are required to carry the books, but once you memorizes them, you don't have to carry them.  When using a technique, wielding a weapon is required.",
+
+"Hex is a very terrible realm. Spells gives continual effects when they are spelled continually like songs. Spells may obstract monsters' actions, may deal damages in sight, may revenge against enemies."
 #endif
 };
 
-static char realm_subinfo[VALID_REALM][41] =
+static cptr realm_subinfo[VALID_REALM] =
 {
 #ifdef JP
 "´¶ÃΤÈËɸæ¤È²óÉü¤ËÍ¥¤ì¤Æ¤¤¤Þ¤¹",
@@ -2007,7 +2014,8 @@ static char realm_subinfo[VALID_REALM][41] =
 "¹¶·â¤ÈËɸæ¤ÎξÌ̤ËÍ¥¤ì¤Æ¤¤¤Þ¤¹",
 "¼Ù°­¤Ê²øʪ¤ËÂФ¹¤ë¹¶·â¤ËÍ¥¤ì¤Æ¤¤¤Þ¤¹",
 "ÍÍ¡¹¤ÊËâË¡¸ú²Ì¤ò»ý¤Ã¤¿²Î¤ò²Î¤¤¤Þ¤¹",
-"ÂǷ⹶·â¤ËÆüìǽÎϤòÉղä·¤Þ¤¹"
+"ÂǷ⹶·â¤ËÆüìǽÎϤòÉղä·¤Þ¤¹",
+"Ũ¤ò¼ÙË⤷¤Ä¤ÄÉü½²¤òÁÀ¤¤¤Þ¤¹"
 #else
 "Good at detection and healing.",
 "Utility and protective spells.",
@@ -2020,7 +2028,8 @@ static char realm_subinfo[VALID_REALM][41] =
 "Good at both offence and defence.",
 "Destroys evil creatures.",
 "Song with magical effects.",
-"Special attacks on melee."
+"Special attacks on melee.",
+"Good at obstacle and revenge."
 #endif
 };
 
@@ -2146,6 +2155,11 @@ static byte choose_realm(s32b choices, int *count)
                (*count)++;
                auto_select = REALM_HISSATSU;
        }
+       if (choices & CH_HEX)
+       {
+               (*count)++;
+               auto_select = REALM_HEX;
+       }
 
        clear_from(10);
 
@@ -2176,10 +2190,10 @@ static byte choose_realm(s32b choices, int *count)
 #endif
 
        cs = 0;
-       for (i = 0; i<16; i++)
+       for (i = 0; i<32; i++)
        {
                /* Analize realms */
-               if (choices & (1 << i))
+               if (choices & (1L << i))
                {
                        if (p_ptr->realm1 == i+1)
                        {
@@ -2190,10 +2204,9 @@ static byte choose_realm(s32b choices, int *count)
                        }
                        if (p_ptr->realm2 == i+1)
                                cs = n;
-                       if (n < 26)
-                               sym[n] = I2A(n);
-                       else
-                               sym[n] = ('A' + n - 26);
+
+                       sym[n] = I2A(n);
+
                        sprintf(buf, "%c%c %s", sym[n], p2, realm_names[i+1]);
                        put_str(buf, 12 + (n/5), 2 + 15 * (n%5));
                        picks[n++] = i+1;
@@ -2235,7 +2248,7 @@ static byte choose_realm(s32b choices, int *count)
                                c_put_str(TERM_L_BLUE, realm_names[picks[cs]], 3, 40);
                                put_str(": Characteristic", 3, 40+strlen(realm_names[picks[cs]]));
 #endif
-                               put_str(realm_subinfo[picks[cs]-1], 4, 40);
+                               put_str(realm_subinfo[technic2magic(picks[cs])-1], 4, 40);
                        }
                        c_put_str(TERM_YELLOW, cur, 12 + (cs/5), 2 + 15 * (cs%5));
                        os = cs;
@@ -2572,7 +2585,7 @@ static void load_prev_data(bool swap)
        /*** Save the previous data ***/
        if (swap)
        {
-               COPY(&previous_char, &temp, birther);
+               (void)COPY(&previous_char, &temp, birther);
        }
 }
 
@@ -2967,7 +2980,7 @@ static void get_history(void)
                        chart = 148;
                        break;
                }
-               case RACE_KUTA:
+               case RACE_KUTAR:
                {
                        chart = 154;
                        break;
@@ -3219,14 +3232,17 @@ static void player_wipe(void)
        /* Wipe the quests */
        for (i = 0; i < max_quests; i++)
        {
-               quest[i].status = QUEST_STATUS_UNTAKEN;
-
-               quest[i].cur_num = 0;
-               quest[i].max_num = 0;
-               quest[i].type = 0;
-               quest[i].level = 0;
-               quest[i].r_idx = 0;
-               quest[i].complev = 0;
+               quest_type* const q_ptr = &quest[i];
+               
+               q_ptr->status = QUEST_STATUS_UNTAKEN;
+
+               q_ptr->cur_num = 0;
+               q_ptr->max_num = 0;
+               q_ptr->type = 0;
+               q_ptr->level = 0;
+               q_ptr->r_idx = 0;
+               q_ptr->complev = 0;
+               q_ptr->comptime = 0;
        }
 
        /* No weight */
@@ -3530,6 +3546,72 @@ static void init_turn(void)
        dungeon_turn_limit = TURNS_PER_TICK * TOWN_DAWN * (MAX_DAYS - 1) + TURNS_PER_TICK * TOWN_DAWN * 3 / 4;
 }
 
+
+/* 
+ * Try to wield everything wieldable in the inventory. 
+ * Code taken from Angband 3.1.0 under Angband license
+ */ 
+static void wield_all(void) 
+{ 
+       object_type *o_ptr; 
+       object_type *i_ptr; 
+       object_type object_type_body; 
+       int slot; 
+       int item; 
+       /* Scan through the slots backwards */ 
+       for (item = INVEN_PACK - 1; item >= 0; item--) 
+       { 
+               o_ptr = &inventory[item]; 
+               /* Skip non-objects */ 
+               if (!o_ptr->k_idx) continue; 
+               /* Make sure we can wield it and that there's nothing else in that slot */ 
+               slot = wield_slot(o_ptr); 
+               if (slot < INVEN_RARM) continue; 
+               if (slot == INVEN_LITE) continue; /* Does not wield toaches because buys a lantern soon */
+               if (inventory[slot].k_idx) continue; 
+               /* Get local object */ 
+               i_ptr = &object_type_body; 
+               object_copy(i_ptr, o_ptr); 
+               /* Modify quantity */ 
+               i_ptr->number = 1; 
+               /* Decrease the item (from the pack) */ 
+               if (item >= 0) 
+               { 
+                       inven_item_increase(item, -1); 
+                       inven_item_optimize(item); 
+               } 
+               /* Decrease the item (from the floor) */ 
+               else 
+               { 
+                       floor_item_increase(0 - item, -1); 
+                       floor_item_optimize(0 - item); 
+               } 
+               /* Get the wield slot */ 
+               o_ptr = &inventory[slot]; 
+               /* Wear the new stuff */ 
+               object_copy(o_ptr, i_ptr); 
+               /* Increase the weight */ 
+               p_ptr->total_weight += i_ptr->weight; 
+               /* Increment the equip counter by hand */ 
+               equip_cnt++;
+
+       } 
+       return; 
+} 
+
+
 /*
  * Each player starts out with a few items, given as tval/sval pairs.
  * In addition, he always has some food and a few torches.
@@ -3722,6 +3804,12 @@ static byte player_init[MAX_CLASS][3][2] =
                { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
                { TV_SWORD, SV_DAGGER }
        },
+       {
+               /* Sniper */
+               { TV_BOW, SV_LIGHT_XBOW },
+               { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
+               { TV_SWORD, SV_DAGGER }
+       },
 };
 
 
@@ -3753,6 +3841,9 @@ static void add_outfit(object_type *o_ptr)
 
        /* Auto-inscription */
        autopick_alter_item(slot, FALSE);
+
+       /* Now try wielding everything */ 
+       wield_all(); 
 }
 
 
@@ -3954,6 +4045,14 @@ void player_outfit(void)
 
                add_outfit(q_ptr);
        }
+       else if (p_ptr->pclass == CLASS_SNIPER)
+       {
+               /* Hack -- Give the player some bolts */
+               object_prep(q_ptr, lookup_kind(TV_BOLT, SV_AMMO_NORMAL));
+               q_ptr->number = (byte)rand_range(15, 20);
+
+               add_outfit(q_ptr);
+       }
 
        if(p_ptr->pseikaku == SEIKAKU_SEXY)
        {
@@ -4551,7 +4650,7 @@ static bool get_player_seikaku(void)
                if (c == '8')
                {
                        if (cs >= 4) cs -= 4;
-                       if (seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
+                       if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
                        {
                                if((cs - 4) > 0)
                                        cs -= 4;
@@ -4562,7 +4661,7 @@ static bool get_player_seikaku(void)
                if (c == '4')
                {
                        if (cs > 0) cs--;
-                       if (seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
+                       if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
                        {
                                if((cs - 1) > 0)
                                        cs--;
@@ -4573,7 +4672,7 @@ static bool get_player_seikaku(void)
                if (c == '6')
                {
                        if (cs < MAX_SEIKAKU) cs++;
-                       if (seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
+                       if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
                        {
                                if((cs + 1) <= MAX_SEIKAKU)
                                        cs++;
@@ -4584,7 +4683,7 @@ static bool get_player_seikaku(void)
                if (c == '2')
                {
                        if ((cs + 4) <= MAX_SEIKAKU) cs += 4;
-                       if (seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
+                       if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
                        {
                                if((cs + 4) <= MAX_SEIKAKU)
                                        cs += 4;
@@ -4657,7 +4756,7 @@ static bool get_player_seikaku(void)
 static bool get_stat_limits(void)
 {
        int i, j, m, cs, os;
-       int mval[6], cval[6];
+       int cval[6];
        char c;
        char buf[80], cur[80];
        char inp[80];
@@ -4693,9 +4792,6 @@ static bool get_stat_limits(void)
                /* Obtain the "maximal" stat */
                m = adjust_stat(17, j);
 
-               /* Save the maximum */
-               mval[i] = m;
-
                /* Above 18 */
                if (m > 18)
                {
@@ -5291,6 +5387,20 @@ static bool do_cmd_histpref(void)
 
                return FALSE;
        }
+       else if (!histpref_buf[0])
+       {
+#ifdef JP
+               msg_print("Í­¸ú¤ÊÀ¸¤¤Î©¤ÁÀßÄê¤Ï¤³¤Î¥Õ¥¡¥¤¥ë¤Ë¤¢¤ê¤Þ¤»¤ó¡£");
+#else
+               msg_print("There does not exist valid background history preference.");
+#endif
+               msg_print(NULL);
+
+               /* Kill the buffer */
+               histpref_buf = NULL;
+
+               return FALSE;
+       }
 
        /* Clear the previous history strings */
        for (i = 0; i < 4; i++) p_ptr->history[i][0] = '\0';