OSDN Git Service

Use const pointer for many times referred quest[*]
[hengband/hengband.git] / src / birth.c
index 1f61609..ef07044 100644 (file)
@@ -728,7 +728,7 @@ static hist_type bg[] =
 
 
 #ifdef JP
-       {"¤¢¤Ê¤¿¤Ï½÷²¦¥¯¥é¥³¥ó¤Î²¿¿Í¤«¤Î»Ò¶¡¤Î¤¦¤Á¤Î°ì¿Í¤Ç¤¹¡£"
+       {"¤¢¤Ê¤¿¤Ï½÷²¦¥¯¥é¥å³¥ó¤Î²¿¿Í¤«¤Î»Ò¶¡¤Î¤¦¤Á¤Î°ì¿Í¤Ç¤¹¡£"
        , 100, 84, 85, 50 },
 
        {"¤¢¤Ê¤¿¤ÏÀÖ¤¤È©¤È", 40, 85, 86, 50 },
@@ -1353,7 +1353,7 @@ static hist_type bg[] =
        {"¤¢¤Ê¤¿¤Ï°­¤òÌǤܤ¹¤¿¤á¤Ë¤³¤ÎÃϤËÁ÷¤é¤ì¤Æ¤­¤Þ¤·¤¿¡£", 100, 143, 144, 80},
        {"¤³¤ÎÌÜŪ¤òÀ®¤·¿ë¤²¤ë¤Þ¤Ç¤ÏµÙ¤à¤³¤È¤Ïµö¤µ¤ì¤Þ¤»¤ó¡£", 100, 144, 0, 80},
 #else
-       {"You are of the blessed host of heaven.", 100, 142, 143, 80},
+       {"You are of the blessed host of heaven.  ", 100, 142, 143, 80},
        {"You have been sent to earth to eradicate the wicked, ", 100, 143, 144, 80},
        {"and shall not rest until you have succeeded.", 100, 144, 0, 80},
 #endif
@@ -1619,7 +1619,7 @@ static cptr race_jouhou[MAX_RACES] =
   
 "¥¨¥ë¥Õ¤Ï¿Í´Ö¤è¤êÎɤ¤ËâË¡»È¤¤¤Ë¤Ê¤ì¤Þ¤¹¤¬¡¢ÀïÆ®¤Ï¶ì¼ê¤Ç¤¹¡£Èà¤é¤Ï¿Í´Ö¤ä¥Ï¡¼¥Õ¥¨¥ë¥Õ¤è¤ê¤âƬ¤¬Îɤ¯¡¢¹â¤¤¸­¤µ¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£¥¨¥ë¥Õ¤Ïõº÷, ²ò½ü, ÃγÐ, ±£Ì©¹ÔÆ°, ¼Í·â, ¤½¤·¤ÆËâË¡Æ»¶ñ»ÈÍѤÇÍ¥¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢Éð´ï¤Î°·¤¤¤ÏÆÀ°Õ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£Èà¤é¤ÏÀ¸¤Þ¤ì¤Ä¤­¸÷¤ËÂФ¹¤ëÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£",
   
-"¥Û¥Ó¥Ã¥È¡¢¤Þ¤¿¤Ï¥Ï¡¼¥Õ¥ê¥ó¥°¤ÏµÝ¤äÅêÚ³¤ËŤ±¡¢ËâË¡Ëɸæ¤âÍ¥¤ì¤Æ¤¤¤Þ¤¹¡£¤Þ¤¿¡¢Ãµº÷, ²ò½ü, ÃγÐ, ¤½¤·¤Æ±£Ì©¹ÔÆ°¤Ç¤â¤È¤Æ¤âÎɤ¤Ç½ÎϤò¼¨¤·¤Þ¤¹¡£¤½¤Î¤¿¤á¡¢Èà¤é¤ÏÍ¥¤ì¤¿Åð±¤È¤Ê¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡Ê¤·¤«¤·¡¢¡ÖǦ¤Ó¤Î¼Ô¡×¤È¸Æ¤Ð¤ì¤ë¤³¤È¤ò¹¥¤ß¤Þ¤¹¡Ë¡£¥Û¥Ó¥Ã¥È¤Ï¿Í´Ö¤è¤êÍÚ¤«¤ËÉϼå¤Ç¡¢Àï»Î¤È¤·¤Æ¤Ï¤Æ¤ó¤Ç¥À¥á¤Ç¤¹¡£Èà¤é¤Ï¤«¤Ê¤êÎɤ¤ÀÖ³°Àþ»ëÎϤò»ý¤Ã¤Æ¤ª¤ê¡¢²¹·ìưʪ¤òÎ¥¤ì¤¿¾ì½ê¤«¤é¸«¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥Û¥Ó¥Ã¥È¤Ï´ïÍѤµ¤ò²¼¤²¤é¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤»¤ó¡£",
+"¥Û¥Ó¥Ã¥È¡¢¤Þ¤¿¤Ï¥Ï¡¼¥Õ¥ê¥ó¥°¤ÏµÝ¤äÅêÚ³¤ËŤ±¡¢ËâË¡Ëɸæ¤âÍ¥¤ì¤Æ¤¤¤Þ¤¹¡£¤Þ¤¿¡¢Ãµº÷, ²ò½ü, ÃγÐ, ¤½¤·¤Æ±£Ì©¹ÔÆ°¤Ç¤â¤È¤Æ¤âÎɤ¤Ç½ÎϤò¼¨¤·¤Þ¤¹¡£¤½¤Î¤¿¤á¡¢Èà¤é¤ÏÍ¥¤ì¤¿Åð±¤È¤Ê¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡Ê¤·¤«¤·¡¢¡ÖǦ¤Ó¤Î¼Ô¡×¤È¸Æ¤Ð¤ì¤ë¤³¤È¤ò¹¥¤ß¤Þ¤¹¡Ë¡£¥Û¥Ó¥Ã¥È¤Ï¿Í´Ö¤è¤êÍÚ¤«¤ËÉϼå¤Ç¡¢Àï»Î¤È¤·¤Æ¤Ï¤Æ¤ó¤Ç¥À¥á¤Ç¤¹¡£Èà¤é¤Ï¤«¤Ê¤êÎɤ¤ÀÖ³°Àþ»ëÎϤò»ý¤Ã¤Æ¤ª¤ê¡¢²¹·ìưʪ¤òÎ¥¤ì¤¿¾ì½ê¤«¤é¸«¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£Èà¤é¤ÏÀ¸Ì¿ÎϤòÊÝ»ý¤¹¤ëÎϤ¬¶¯¤¯¡¢À¸Ì¿Îϵۼý¹¶·â¤ËÂФ·¤ÆÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£",
   
 "¥Î¡¼¥à¤Ï¥É¥ï¡¼¥Õ¤è¤ê¾®¤µ¤¤¤Ç¤¹¤¬¡¢¥Û¥Ó¥Ã¥È¤è¤ê¤ÏÂ礭¤¤¼ï²¤Ç¤¹¡£Èà¤é¤Ï¥Û¥Ó¥Ã¥ÈƱÍÍÃÏɽ¤Îƶ·ê¤Î¤è¤¦¤Ê²È¤Ë½»¤ó¤Ç¤¤¤Þ¤¹¡£¥Î¡¼¥à¤Ï¤È¤Æ¤âÎɤ¤ËâË¡Ëɸæ¤ò»ý¤Á¡¢Ãµº÷, ²ò½ü, ÃγÐ, ±£Ì©¹ÔÆ°¤Ç¤âÍ¥¤ì¤Æ¤¤¤Þ¤¹¡£Èà¤é¤Ï¿Í´Ö¤è¤êÄ㤤ÏÓÎϤò»ý¤Á¡¢Éð´ï¤ò»ý¤Ã¤Æ¤ÎÀïÆ®¤Ï¶ì¼ê¤Ç¤¹¡£¥Î¡¼¥à¤Ï¤«¤Ê¤êÎɤ¤ÀÖ³°Àþ»ëÎϤò»ý¤Ã¤Æ¤ª¤ê¡¢²¹·ìưʪ¤òÎ¥¤ì¤¿¾ì½ê¤«¤é¸«¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥Î¡¼¥à¤ÏÀ¸¤Þ¤ì¤Ä¤­Ëãáã¤ËÂФ¹¤ëÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£",
   
@@ -1695,7 +1695,7 @@ static cptr race_jouhou[MAX_RACES] =
 
 "Elves are better magicians then humans, but not as good at fighting.  They tend to be smarter and faster than either humans or half-elves and also have better wisdom.  Elves are better at searching, disarming, perception, stealth, bows, and magic, but they are not as good at hand weapons.  They resist light effects intrinsically.",
 
-"Hobbits, or Halflings, are very good at bows, throwing, and have good saving throws.  They also are very good at searching, disarming, perception, and stealth; so they make excellent rogues, but prefer to be called burglars.  They are much weaker than humans, and no good at melee fighting.  Halflings have fair infravision, so they can detect warm creatures at a distance.  They have their dexterity sustained.",
+"Hobbits, or Halflings, are very good at bows, throwing, and have good saving throws.  They also are very good at searching, disarming, perception, and stealth; so they make excellent rogues, but prefer to be called burglars.  They are much weaker than humans, and no good at melee fighting.  Halflings have fair infravision, so they can detect warm creatures at a distance.  They have a strong hold on their life force, and are thus intrinsically resistant to life draining.",
 
 "Gnomes are smaller than dwarves but larger than Halflings.  They, like the hobbits, live in the earth in burrow-like homes.  Gnomes make excellent mages, and have very good saving throws.  They are good at searching, disarming, perception, and stealth.  They have lower strength than humans so they are not very good at fighting with hand weapons.  Gnomes have fair infra-vision, so they can detect warm-blooded creatures at a distance.  Gnomes are intrinsically protected against paralysis.",
 
@@ -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.",
@@ -1981,19 +1986,21 @@ static cptr realm_jouhou[VALID_REALM] =
 
 "Arcane magic is a general purpose realm of magic.  It attempts to encompass all 'useful' spells from all realms.  This is the downside of Arcane magic: while Arcane does have all the necessary 'tool' spells for a dungeon delver, it has no ultra-powerful high level spells.  As a consequence, all Arcane spellbooks can be bought in town.  It should also be noted that the 'specialized' realms usually offer the same spell at a lower level and cost. ",
 
-"Craft magic can strengthen the caster or equipments.  These spells greatly improve the caster's fighting ability, but spells that hurts opponents directly is not exist.",
+"Craft magic can strengthen the caster or the equipments.  These spells can greatly improve the caster's fighting ability.  Using them against opponents directly is not possible.",
 
 "Demon is a very evil realm, same as Death.  It provides various attack spells and devilish detection spells.  at higher levels, Demon magic provides ability to dominate demons, and to polymorph yourself into a demon.",
 
-"Crusade is a realm of 'Justice'; It does have many attack spells which are mostly used for harming and banishing foul minions of evil, and these spells are not so effective for good monsters.",
+"Crusade is a magic of 'Justice'.  It includes damage spells, which are greatly effective against foul and evil monsters, but have poor effects against good monsters.",
 
 "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 describes various combat technique.  it need to read the books when one studys the techniques, but it doesn't need to take around the books to use the techniques after one momorizes it.  It need a weapon wielded to use the techniques."
+"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
 };
 
@@ -2030,7 +2039,12 @@ static char realm_subinfo[VALID_REALM][41] =
  */
 static s16b stat_limit[6];
 
-static s16b chara_limit[6];
+static struct {
+       s16b agemin, agemax;
+       s16b htmin, htmax;
+       s16b wtmin, wtmax;
+       s16b scmin, scmax;
+} chara_limit;
 
 /*
  * Autoroll matches
@@ -2119,7 +2133,7 @@ static byte choose_realm(s32b choices, int *count)
        if (choices & CH_ENCHANT)
        {
                (*count)++;
-               auto_select = REALM_ENCHANT;
+               auto_select = REALM_CRAFT;
        }
        if (choices & CH_DAEMON)
        {
@@ -2141,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);
 
@@ -2171,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)
                        {
@@ -2185,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;
@@ -2230,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;
@@ -2297,7 +2315,7 @@ static byte choose_realm(s32b choices, int *count)
                else k = -1;
                if (c == '?')
                {
-#ifdef JP                 
+#ifdef JP
                        show_help("jmagic.txt#MagicRealms");
 #else
                        show_help("magic.txt#MagicRealms");
@@ -2307,9 +2325,9 @@ static byte choose_realm(s32b choices, int *count)
                {
                        screen_save();
 #ifdef JP
-                       do_cmd_options_aux(6, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
 #else
-                       do_cmd_options_aux(6, "Startup Opts((*)s effect score)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth option((*)s effect score)");
 #endif
 
                        screen_load();
@@ -2341,7 +2359,7 @@ static bool get_player_realms(void)
        p_ptr->realm2 = 255;
        while (1)
        {
-               char temp[80*8];
+               char temp[80*10];
                cptr t;
                count = 0;
                p_ptr->realm1 = choose_realm(realm_choices1[p_ptr->pclass], &count);
@@ -2357,7 +2375,7 @@ static bool get_player_realms(void)
 
                roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm1)-1], 74, temp, sizeof(temp));
                t = temp;
-               for (i = 0; i< 6; i++)
+               for (i = 0; i < 10; i++)
                {
                        if(t[0] == 0)
                                break; 
@@ -2567,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);
        }
 }
 
@@ -2718,6 +2736,9 @@ void get_max_stats(void)
                        p_ptr->stat_cur[i] = j;
        }
        p_ptr->knowledge &= ~(KNOW_STAT);
+
+       /* Redisplay the stats later */
+       p_ptr->redraw |= (PR_STATS);
 }
 
 
@@ -2751,9 +2772,9 @@ static void get_extra(bool roll_hitdie)
        for (i = 0; i < 5; i++)
                for (j = 0; j < 64; j++)
                        p_ptr->weapon_exp[i][j] = s_info[p_ptr->pclass].w_start[i][j];
-       if ((p_ptr->pseikaku == SEIKAKU_SEXY) && (p_ptr->weapon_exp[TV_HAFTED-TV_BOW][SV_WHIP] < WEAPON_EXP_BEGINNER))
+       if ((p_ptr->pseikaku == SEIKAKU_SEXY) && (p_ptr->weapon_exp[TV_HAFTED-TV_WEAPON_BEGIN][SV_WHIP] < WEAPON_EXP_BEGINNER))
        {
-               p_ptr->weapon_exp[TV_HAFTED-TV_BOW][SV_WHIP] = WEAPON_EXP_BEGINNER;
+               p_ptr->weapon_exp[TV_HAFTED-TV_WEAPON_BEGIN][SV_WHIP] = WEAPON_EXP_BEGINNER;
        }
 
        for (i = 0; i < 10; i++)
@@ -2959,7 +2980,7 @@ static void get_history(void)
                        chart = 148;
                        break;
                }
-               case RACE_KUTA:
+               case RACE_KUTAR:
                {
                        chart = 154;
                        break;
@@ -3032,36 +3053,46 @@ static void get_history(void)
 
 
 /*
- * Computes character's age, height, and weight
- * by henkma
+ * Get character's height and weight
  */
-static void get_ahw(void)
+void get_height_weight(void)
 {
-  int h_percent; /* ¿ÈŤ¬Ê¿¶Ñ¤Ë¤¯¤é¤Ù¤Æ¤É¤Î¤¯¤é¤¤°ã¤¦¤«. */
+       int h_percent; /* ¿ÈŤ¬Ê¿¶Ñ¤Ë¤¯¤é¤Ù¤Æ¤É¤Î¤¯¤é¤¤°ã¤¦¤«. */
 
-
-  /* Calculate the age */
-  p_ptr->age = rp_ptr->b_age + randint1(rp_ptr->m_age);
-  
-  /* Calculate the height/weight for males */
-  if (p_ptr->psex == SEX_MALE)
+       /* Calculate the height/weight for males */
+       if (p_ptr->psex == SEX_MALE)
        {
-         p_ptr->ht = randnor(rp_ptr->m_b_ht, rp_ptr->m_m_ht);
-         h_percent = (int)(p_ptr->ht) * 100 / (int)(rp_ptr->m_b_ht);
-         p_ptr->wt = randnor((int)(rp_ptr->m_b_wt) * h_percent /100
-                                                 , (int)(rp_ptr->m_m_wt) * h_percent / 300 );
+               p_ptr->ht = randnor(rp_ptr->m_b_ht, rp_ptr->m_m_ht);
+               h_percent = (int)(p_ptr->ht) * 100 / (int)(rp_ptr->m_b_ht);
+               p_ptr->wt = randnor((int)(rp_ptr->m_b_wt) * h_percent /100
+                                   , (int)(rp_ptr->m_m_wt) * h_percent / 300 );
        }
   
-  /* Calculate the height/weight for females */
-  else if (p_ptr->psex == SEX_FEMALE)
+       /* Calculate the height/weight for females */
+       else if (p_ptr->psex == SEX_FEMALE)
        {
-         p_ptr->ht = randnor(rp_ptr->f_b_ht, rp_ptr->f_m_ht);
-         h_percent = (int)(p_ptr->ht) * 100 / (int)(rp_ptr->f_b_ht);
-         p_ptr->wt = randnor((int)(rp_ptr->f_b_wt) * h_percent /100
-                                                 , (int)(rp_ptr->f_m_wt) * h_percent / 300 );
+               p_ptr->ht = randnor(rp_ptr->f_b_ht, rp_ptr->f_m_ht);
+               h_percent = (int)(p_ptr->ht) * 100 / (int)(rp_ptr->f_b_ht);
+               p_ptr->wt = randnor((int)(rp_ptr->f_b_wt) * h_percent /100
+                                   , (int)(rp_ptr->f_m_wt) * h_percent / 300 );
        }
 }
 
+
+/*
+ * Computes character's age, height, and weight
+ * by henkma
+ */
+static void get_ahw(void)
+{
+       /* Get character's age */
+       p_ptr->age = rp_ptr->b_age + randint1(rp_ptr->m_age);
+
+       /* Get character's height and weight */
+       get_height_weight();
+}
+
+
 /*
  * Get the player's starting money
  */
@@ -3161,6 +3192,24 @@ static void birth_put_stats(void)
 }
 
 
+static void k_info_reset(void)
+{
+       int i;
+
+       /* Reset the "objects" */
+       for (i = 1; i < max_k_idx; i++)
+       {
+               object_kind *k_ptr = &k_info[i];
+
+               /* Reset "tried" */
+               k_ptr->tried = FALSE;
+
+               /* Reset "aware" */
+               k_ptr->aware = FALSE;
+       }
+}
+
+
 /*
  * Clear all the global "character" data
  */
@@ -3168,6 +3217,8 @@ static void player_wipe(void)
 {
        int i;
 
+       /* Hack -- free the "last message" string */
+       if (p_ptr->last_message) string_free(p_ptr->last_message);
 
        /* Hack -- zero the struct */
        (void)WIPE(p_ptr, player_type);
@@ -3181,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 */
@@ -3228,10 +3282,15 @@ static void player_wipe(void)
 
                /* Hack -- Reset the max counter */
                if (r_ptr->flags1 & RF1_UNIQUE) r_ptr->max_num = 1;
-               if (r_ptr->flags7 & RF7_UNIQUE_7) r_ptr->max_num = 5;
 
-               /* Clear player kills */
+               /* Hack -- Non-unique Nazguls are semi-unique */
+               else if (r_ptr->flags7 & RF7_NAZGUL) r_ptr->max_num = MAX_NAZGUL_NUM;
+
+               /* Clear visible kills in this life */
                r_ptr->r_pkills = 0;
+
+               /* Clear all kills in this life */
+               r_ptr->r_akills = 0;
        }
 
 
@@ -3311,7 +3370,6 @@ static void player_wipe(void)
        p_ptr->arena_number = 0;
        p_ptr->inside_arena = FALSE;
        p_ptr->inside_quest = 0;
-       p_ptr->leftbldg = FALSE;
        for (i = 0; i < MAX_MANE; i++)
        {
                p_ptr->mane_spell[i] = -1;
@@ -3320,12 +3378,6 @@ static void player_wipe(void)
        p_ptr->mane_num = 0;
        p_ptr->exit_bldg = TRUE; /* only used for arena now -KMW- */
 
-       /* Reset rewards */
-       for (i = 0; i < MAX_BACT; i++)
-       {
-               p_ptr->rewards[i] = 0;
-       }
-
        /* Bounty */
        p_ptr->today_mon = 0;
 
@@ -3353,73 +3405,102 @@ static void player_wipe(void)
        }
 }
 
+
 /*
- *  Initialize random quests and final quests
+ *  Hook function for quest monsters
  */
-static void init_dungeon_quests(int number_of_quests)
+static bool mon_hook_quest(int r_idx)
 {
-       int i;
-       monster_race    *r_ptr;
+       monster_race *r_ptr = &r_info[r_idx];
 
-       /* Init the random quests */
-       init_flags = INIT_ASSIGN;
-       p_ptr->inside_quest = MIN_RANDOM_QUEST;
+       /* Random quests are in the dungeon */
+       if (r_ptr->flags8 & RF8_WILD_ONLY) return FALSE;
 
-       process_dungeon_file("q_info.txt", 0, 0, 0, 0);
+       /* No random quests for aquatic monsters */
+       if (r_ptr->flags7 & RF7_AQUATIC) return FALSE;
 
-       p_ptr->inside_quest = 0;
+       /* No random quests for multiplying monsters */
+       if (r_ptr->flags2 & RF2_MULTIPLY) return FALSE;
+
+       /* No quests to kill friendly monsters */
+       if (r_ptr->flags7 & RF7_FRIENDLY) return FALSE;
+
+       return TRUE;
+}
+
+
+/*
+ * Determine the random quest uniques
+ */
+void determine_random_questor(quest_type *q_ptr)
+{
+       int          r_idx;
+       monster_race *r_ptr;
 
        /* Prepare allocation table */
-       get_mon_num_prep(monster_quest, NULL);
+       get_mon_num_prep(mon_hook_quest, NULL);
 
-       /* Remove QUESTOR flag */
-       for (i = 1; i < max_r_idx; i++)
+       while (1)
        {
-               r_ptr = &r_info[i];
-               if (r_ptr->flags1 & RF1_QUESTOR) r_ptr->flags1 &= ~RF1_QUESTOR;
-       }
+               /*
+                * Random monster 5 - 10 levels out of depth
+                * (depending on level)
+                */
+               r_idx = get_mon_num(q_ptr->level + 5 + randint1(q_ptr->level / 10));
+               r_ptr = &r_info[r_idx];
 
-       /* Generate quests */
-       for (i = MIN_RANDOM_QUEST + number_of_quests - 1; i >= MIN_RANDOM_QUEST; i--)
-       {
-               quest_type      *q_ptr = &quest[i];
-               monster_race    *quest_r_ptr;
-               int             r_idx;
+               if (!(r_ptr->flags1 & RF1_UNIQUE)) continue;
 
-               q_ptr->status = QUEST_STATUS_TAKEN;
+               if (r_ptr->flags1 & RF1_QUESTOR) continue;
 
-               while (1)
-               {
-                       /*
-                        * Random monster 5 - 10 levels out of depth
-                        * (depending on level)
-                        */
-                       r_idx = get_mon_num(q_ptr->level + 5 + randint1(q_ptr->level / 10));
-                       r_ptr = &r_info[r_idx];
+               if (r_ptr->rarity > 100) continue;
 
-                       if(!(r_ptr->flags1 & RF1_UNIQUE)) continue;
+               if (r_ptr->flags7 & RF7_FRIENDLY) continue;
 
-                       if(r_ptr->flags1 & RF1_QUESTOR) continue;
+               if (r_ptr->flags7 & RF7_AQUATIC) continue;
 
-                       if(r_ptr->flags6 & RF6_SPECIAL) continue;
+               if (r_ptr->flags8 & RF8_WILD_ONLY) continue;
 
-                       if(r_ptr->flags7 & RF7_FRIENDLY) continue;
+               if (no_questor_or_bounty_uniques(r_idx)) continue;
 
-                       if(r_ptr->flags7 & RF7_AQUATIC) continue;
+               /*
+                * Accept monsters that are 2 - 6 levels
+                * out of depth depending on the quest level
+                */
+               if (r_ptr->level > (q_ptr->level + (q_ptr->level / 20))) break;
+       }
 
-                       if(r_ptr->flags8 & RF8_WILD_ONLY) continue;
+       q_ptr->r_idx = r_idx;
+}
 
-                       /*
-                        * Accept monsters that are 2 - 6 levels
-                        * out of depth depending on the quest level
-                        */
-                       if (r_ptr->level > (q_ptr->level + (q_ptr->level / 20))) break;
-               }
 
-               q_ptr->r_idx = r_idx;
-               quest_r_ptr = &r_info[q_ptr->r_idx];
+/*
+ *  Initialize random quests and final quests
+ */
+static void init_dungeon_quests(void)
+{
+       int number_of_quests = MAX_RANDOM_QUEST - MIN_RANDOM_QUEST + 1;
+       int i;
+
+       /* Init the random quests */
+       init_flags = INIT_ASSIGN;
+       p_ptr->inside_quest = MIN_RANDOM_QUEST;
+
+       process_dungeon_file("q_info.txt", 0, 0, 0, 0);
+
+       p_ptr->inside_quest = 0;
+
+       /* Generate quests */
+       for (i = MIN_RANDOM_QUEST + number_of_quests - 1; i >= MIN_RANDOM_QUEST; i--)
+       {
+               quest_type      *q_ptr = &quest[i];
+               monster_race    *quest_r_ptr;
+
+               q_ptr->status = QUEST_STATUS_TAKEN;
+               determine_random_questor(q_ptr);
 
                /* Mark uniques */
+               quest_r_ptr = &r_info[q_ptr->r_idx];
                quest_r_ptr->flags1 |= RF1_QUESTOR;
 
                q_ptr->max_num = 1;
@@ -3453,15 +3534,84 @@ static void init_turn(void)
        {
                /* Undead start just after midnight */
                turn = (TURNS_PER_TICK*3 * TOWN_DAWN) / 4 + 1;
+               turn_limit = TURNS_PER_TICK * TOWN_DAWN * MAX_DAYS + TURNS_PER_TICK * TOWN_DAWN * 3 / 4;
        }
        else
        {
                turn = 1;
+               turn_limit = TURNS_PER_TICK * TOWN_DAWN * (MAX_DAYS - 1) + TURNS_PER_TICK * TOWN_DAWN * 3 / 4;
        }
 
        dungeon_turn = 1;
+       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.
@@ -3588,7 +3738,7 @@ static byte player_init[MAX_CLASS][3][2] =
        },
 
        {
-               /* Harper */
+               /* Bard */
                { TV_MUSIC_BOOK, 0 },
                { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR},
                { TV_SWORD, SV_SHORT_SWORD },
@@ -3623,7 +3773,7 @@ static byte player_init[MAX_CLASS][3][2] =
        },
 
        {
-               /* Kihei */
+               /* Cavalry */
                { TV_BOW, SV_SHORT_BOW },
                { TV_SOFT_ARMOR, SV_LEATHER_SCALE_MAIL},
                { TV_POLEARM, SV_BROAD_SPEAR}
@@ -3637,7 +3787,7 @@ static byte player_init[MAX_CLASS][3][2] =
        },
 
        {
-               /* Kaji */
+               /* Weaponsmith */
                { TV_RING, SV_RING_RES_FEAR }, /* Warriors need it! */
                { TV_HARD_ARMOR, SV_CHAIN_MAIL },
                { TV_POLEARM, SV_BROAD_AXE }
@@ -3654,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 }
+       },
 };
 
 
@@ -3666,13 +3822,32 @@ static bool monster_hook_human(int r_idx)
 
        if (r_ptr->flags1 & (RF1_UNIQUE)) return FALSE;
 
-       if (strchr("pht", r_ptr->d_char)) return TRUE;
+       if (my_strchr("pht", r_ptr->d_char)) return TRUE;
 
        return FALSE;
 }
 
 
 /*
+ * Add an outfit object
+ */
+static void add_outfit(object_type *o_ptr)
+{
+       s16b slot;
+
+       object_aware(o_ptr);
+       object_known(o_ptr);
+       slot = inven_carry(o_ptr);
+
+       /* Auto-inscription */
+       autopick_alter_item(slot, FALSE);
+
+       /* Now try wielding everything */ 
+       wield_all(); 
+}
+
+
+/*
  * Init players with some belongings
  *
  * Having an item makes the player "aware" of its purpose.
@@ -3707,7 +3882,7 @@ void player_outfit(void)
                        object_prep(q_ptr, lookup_kind(TV_CORPSE, SV_CORPSE));
                        q_ptr->pval = get_mon_num(2);
                        q_ptr->number = 1;
-                       (void)inven_carry(q_ptr);
+                       add_outfit(q_ptr);
                }
                break;
 
@@ -3716,9 +3891,7 @@ void player_outfit(void)
                /* Some Skeletons */
                object_prep(q_ptr, lookup_kind(TV_SKELETON, SV_ANY));
                q_ptr->number = (byte)rand_range(7, 12);
-               object_aware(q_ptr);
-               object_known(q_ptr);
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
                break;
 #endif
        case RACE_SKELETON:
@@ -3728,19 +3901,15 @@ void player_outfit(void)
                /* Staff (of Nothing) */
                object_prep(q_ptr, lookup_kind(TV_STAFF, SV_STAFF_NOTHING));
                q_ptr->number = 1;
-               object_aware(q_ptr);
-               object_known(q_ptr);
 
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
                break;
 
        case RACE_ENT:
                /* Potions of Water */
                object_prep(q_ptr, lookup_kind(TV_POTION, SV_POTION_WATER));
                q_ptr->number = (byte)rand_range(15, 23);
-               object_aware(q_ptr);
-               object_known(q_ptr);
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
 
                break;
 
@@ -3749,12 +3918,10 @@ void player_outfit(void)
                object_prep(q_ptr, lookup_kind(TV_FLASK, SV_ANY));
 
                /* Fuel with oil (move pval to xtra4) */
-               apply_magic(q_ptr, 1, 0L);
+               apply_magic(q_ptr, 1, AM_NO_FIXED_ART);
 
                q_ptr->number = (byte)rand_range(7, 12);
-               object_aware(q_ptr);
-               object_known(q_ptr);
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
 
                break;
 
@@ -3762,10 +3929,8 @@ void player_outfit(void)
                /* Food rations */
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_RATION));
                q_ptr->number = (byte)rand_range(3, 7);
-               object_aware(q_ptr);
-               object_known(q_ptr);
 
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
        }
 
        /* Get local object */
@@ -3778,10 +3943,7 @@ void player_outfit(void)
 
                q_ptr->number = (byte)rand_range(2, 5);
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
        }
        else if (p_ptr->pclass != CLASS_NINJA)
        {
@@ -3789,10 +3951,8 @@ void player_outfit(void)
                object_prep(q_ptr, lookup_kind(TV_LITE, SV_LITE_TORCH));
                q_ptr->number = (byte)rand_range(3, 7);
                q_ptr->xtra4 = rand_range(3, 7) * 500;
-               object_aware(q_ptr);
-               object_known(q_ptr);
 
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
        }
 
        /* Get local object */
@@ -3804,20 +3964,14 @@ void player_outfit(void)
                object_prep(q_ptr, lookup_kind(TV_ARROW, SV_AMMO_NORMAL));
                q_ptr->number = (byte)rand_range(15, 20);
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
        }
        if (p_ptr->pclass == CLASS_RANGER)
        {
                /* Hack -- Give the player some arrows */
                object_prep(q_ptr, lookup_kind(TV_BOW, SV_SHORT_BOW));
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
        }
        else if (p_ptr->pclass == CLASS_ARCHER)
        {
@@ -3825,10 +3979,7 @@ void player_outfit(void)
                object_prep(q_ptr, lookup_kind(TV_ARROW, SV_AMMO_NORMAL));
                q_ptr->number = (byte)rand_range(15, 20);
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
        }
        else if (p_ptr->pclass == CLASS_HIGH_MAGE)
        {
@@ -3837,10 +3988,7 @@ void player_outfit(void)
                q_ptr->number = 1;
                q_ptr->pval = (byte)rand_range(25, 30);
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
        }
        else if (p_ptr->pclass == CLASS_SORCERER)
        {
@@ -3850,10 +3998,7 @@ void player_outfit(void)
                        object_prep(q_ptr, lookup_kind(i, 0));
                        q_ptr->number = 1;
 
-                       object_aware(q_ptr);
-                       object_known(q_ptr);
-
-                       (void)inven_carry(q_ptr);
+                       add_outfit(q_ptr);
                }
        }
        else if (p_ptr->pclass == CLASS_TOURIST)
@@ -3864,51 +4009,33 @@ void player_outfit(void)
                        object_prep(q_ptr, lookup_kind(TV_SHOT, SV_AMMO_LIGHT));
                        q_ptr->number = (byte)rand_range(15, 20);
 
-                       object_aware(q_ptr);
-                       object_known(q_ptr);
-
-                       (void)inven_carry(q_ptr);
+                       add_outfit(q_ptr);
                }
 
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_BISCUIT));
                q_ptr->number = (byte)rand_range(2, 4);
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
 
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_WAYBREAD));
                q_ptr->number = (byte)rand_range(2, 4);
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
 
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_JERKY));
                q_ptr->number = (byte)rand_range(1, 3);
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
 
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_PINT_OF_ALE));
                q_ptr->number = (byte)rand_range(2, 4);
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
 
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_PINT_OF_WINE));
                q_ptr->number = (byte)rand_range(2, 4);
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
        }
        else if (p_ptr->pclass == CLASS_NINJA)
        {
@@ -3916,10 +4043,15 @@ void player_outfit(void)
                object_prep(q_ptr, lookup_kind(TV_SPIKE, 0));
                q_ptr->number = (byte)rand_range(15, 20);
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
+               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);
 
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
        }
 
        if(p_ptr->pseikaku == SEIKAKU_SEXY)
@@ -3965,10 +4097,7 @@ void player_outfit(void)
                        q_ptr->name2 = EGO_BRAND_POIS;
                }
 
-               object_aware(q_ptr);
-               object_known(q_ptr);
-
-               (void)inven_carry(q_ptr);
+               add_outfit(q_ptr);
        }
 
        /* Hack -- make aware of the water */
@@ -4132,7 +4261,7 @@ static bool get_player_race(void)
                else k = -1;
                if (c == '?')
                {
-#ifdef JP                 
+#ifdef JP
                        show_help("jraceclas.txt#TheRaces");
 #else
                        show_help("raceclas.txt#TheRaces");
@@ -4142,9 +4271,9 @@ static bool get_player_race(void)
                {
                        screen_save();
 #ifdef JP
-                       do_cmd_options_aux(6, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
 #else
-                       do_cmd_options_aux(6, "Startup Opts((*)s effect score)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth Option((*)s effect score)");
 #endif
                        screen_load();
                }
@@ -4155,10 +4284,9 @@ static bool get_player_race(void)
        p_ptr->prace = k;
 
        rp_ptr = &race_info[p_ptr->prace];
-       str = rp_ptr->title;
 
        /* Display */
-       c_put_str(TERM_L_BLUE, str, 4, 15);
+       c_put_str(TERM_L_BLUE, rp_ptr->title, 4, 15);
 
        /* Success */
        return TRUE;
@@ -4347,7 +4475,7 @@ static bool get_player_class(void)
                else k = -1;
                if (c == '?')
                {
-#ifdef JP                 
+#ifdef JP
                        show_help("jraceclas.txt#TheClasses");
 #else
                        show_help("raceclas.txt#TheClasses");
@@ -4357,9 +4485,9 @@ static bool get_player_class(void)
                {
                        screen_save();
 #ifdef JP
-                       do_cmd_options_aux(6, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
 #else
-                       do_cmd_options_aux(6, "Startup Opts((*)s effect score)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth Option((*)s effect score)");
 #endif
 
                        screen_load();
@@ -4371,15 +4499,10 @@ static bool get_player_class(void)
        p_ptr->pclass = k;
        cp_ptr = &class_info[p_ptr->pclass];
        mp_ptr = &m_info[p_ptr->pclass];
-       str = cp_ptr->title;
 
 
        /* Display */
-#ifdef JP
-       c_put_str(TERM_L_BLUE, str, 5, 15);
-#else
        c_put_str(TERM_L_BLUE, cp_ptr->title, 5, 15);
-#endif
 
        return TRUE;
 }
@@ -4527,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;
@@ -4538,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--;
@@ -4549,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++;
@@ -4560,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;
@@ -4589,7 +4712,7 @@ static bool get_player_seikaku(void)
                else k = -1;
                if (c == '?')
                {
-#ifdef JP                 
+#ifdef JP
                        show_help("jraceclas.txt#ThePersonalities");
 #else
                        show_help("raceclas.txt#ThePersonalities");
@@ -4599,9 +4722,9 @@ static bool get_player_seikaku(void)
                {
                        screen_save();
 #ifdef JP
-                       do_cmd_options_aux(6, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
 #else
-                       do_cmd_options_aux(6, "Startup Opts((*)s effect score)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth Option((*)s effect score)");
 #endif
 
                        screen_load();
@@ -4633,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];
@@ -4669,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)
                {
@@ -4861,20 +4981,18 @@ static bool get_stat_limits(void)
                        }
                        break;
                case '?':
-               {
-#ifdef JP                 
+#ifdef JP
                        show_help("jbirth.txt#AutoRoller");
 #else
                        show_help("birth.txt#AutoRoller");
 #endif
-               }
                        break;
                case '=':
                        screen_save();
 #ifdef JP
-                       do_cmd_options_aux(6, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
 #else
-                       do_cmd_options_aux(6, "Startup Opts((*)s effect score)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth Option((*)s effect score)");
 #endif
 
                        screen_load();
@@ -4899,17 +5017,21 @@ static bool get_stat_limits(void)
 #ifdef ALLOW_AUTOROLLER
 static bool get_chara_limits(void)
 {
+#define MAXITEMS 8
+
        int i, j, m, cs, os;
-       int mval[6], cval[6];
+       int mval[MAXITEMS], cval[MAXITEMS];
        int max_percent, min_percent;
        char c;
        char buf[80], cur[80];
-       char param[3][80] = {
+       cptr itemname[] = {
 #ifdef JP
+               "ǯÎð",
                "¿ÈĹ(¥¤¥ó¥Á)",
                "ÂνÅ(¥Ý¥ó¥É)",
                "¼Ò²ñŪÃÏ°Ì"
 #else
+               "age",
                "height",
                "weight",
                "social class"
@@ -4948,31 +5070,38 @@ static bool get_chara_limits(void)
 #endif
 
        /* Output the maximum stats */
-       for (i = 0; i < 6; i++)
+       for (i = 0; i < MAXITEMS; i++)
        {
                /* Obtain the "maximal" stat */
                switch (i)
                {
-               case 0: /* Minimum height */
+               case 0: /* Minimum age */
+                       m = rp_ptr->b_age + 1;
+                       break;
+               case 1: /* Maximum age */
+                       m = rp_ptr->b_age + rp_ptr->m_age;
+                       break;
+
+               case 2: /* Minimum height */
                        if (p_ptr->psex == SEX_MALE) m = rp_ptr->m_b_ht-rp_ptr->m_m_ht*4+1;
                        else m = rp_ptr->f_b_ht-rp_ptr->f_m_ht*4+1;
                        break;
-               case 1: /* Maximum height */
+               case 3: /* Maximum height */
                        if (p_ptr->psex == SEX_MALE) m = rp_ptr->m_b_ht+rp_ptr->m_m_ht*4-1;
                        else m = rp_ptr->f_b_ht+rp_ptr->f_m_ht*4-1;
                        break;
-               case 2: /* Minimum weight */
+               case 4: /* Minimum weight */
                        if (p_ptr->psex == SEX_MALE) m = (rp_ptr->m_b_wt * min_percent / 100) - (rp_ptr->m_m_wt * min_percent / 75) +1;
                        else m = (rp_ptr->f_b_wt * min_percent / 100) - (rp_ptr->f_m_wt * min_percent / 75) +1;
                        break;
-               case 3: /* Maximum weight */
+               case 5: /* Maximum weight */
                        if (p_ptr->psex == SEX_MALE) m = (rp_ptr->m_b_wt * max_percent / 100) + (rp_ptr->m_m_wt * max_percent / 75) -1;
                        else m = (rp_ptr->f_b_wt * max_percent / 100) + (rp_ptr->f_m_wt * max_percent / 75) -1;
                        break;
-               case 4: /* Minimum social class */
+               case 6: /* Minimum social class */
                        m = 1;
                        break;
-               case 5: /* Maximum social class */
+               case 7: /* Maximum social class */
                        m = 100;
                        break;
                default:
@@ -4985,10 +5114,10 @@ static bool get_chara_limits(void)
                cval[i] = m;
        }
 
-       for (i = 0; i < 3; i++)
+       for (i = 0; i < 4; i++)
        {
                /* Prepare a prompt */
-               sprintf(buf, "%-12s (%3d - %3d)", param[i], mval[i*2], mval[i*2+1]);
+               sprintf(buf, "%-12s (%3d - %3d)", itemname[i], mval[i*2], mval[i*2+1]);
 
                /* Dump the prompt */
                put_str(buf, 14 + i, 20);
@@ -5002,30 +5131,29 @@ static bool get_chara_limits(void)
        
        /* Get a minimum stat */
        cs = 0;
-       os = 6;
+       os = MAXITEMS;
        while (TRUE)
        {
                /* Move Cursol */
                if (cs != os)
                {
-                       if(os == 6)
-                       {
 #ifdef JP
-                               c_put_str(TERM_WHITE, "·èÄꤹ¤ë", 18, 35);
+                       const char accept[] = "·èÄꤹ¤ë";
 #else
-                               c_put_str(TERM_WHITE, "Accept", 18, 35);
+                       const char accept[] = "Accept";
 #endif
+                       if(os == MAXITEMS)
+                       {
+                               c_put_str(TERM_WHITE, accept, 19, 35);
                        }
-                       else if(os < 6)
+                       else
+                       {
                                c_put_str(TERM_WHITE, cur, 14 + os/2, 45 + 8 * (os%2));
+                       }
                        
-                       if(cs == 6)
+                       if(cs == MAXITEMS)
                        {
-#ifdef JP
-                               c_put_str(TERM_YELLOW, "·èÄꤹ¤ë", 18, 35);
-#else
-                               c_put_str(TERM_YELLOW, "Accept", 18, 35);
-#endif
+                               c_put_str(TERM_YELLOW, accept, 19, 35);
                        }
                        else
                        {
@@ -5048,7 +5176,7 @@ static bool get_chara_limits(void)
                case ' ':
                case '\r':
                case '\n':
-                       if(cs == 6) break;
+                       if(cs == MAXITEMS) break;
                        cs++;
                        c = '6';
                        break;
@@ -5058,8 +5186,8 @@ static bool get_chara_limits(void)
                        break;
                case '2':
                case 'j':
-                       if (cs < 6) cs += 2;
-                       if (cs > 6) cs = 6;
+                       if (cs < MAXITEMS) cs += 2;
+                       if (cs > MAXITEMS) cs = MAXITEMS;
                        break;
                case '4':
                case 'h':
@@ -5067,11 +5195,11 @@ static bool get_chara_limits(void)
                        break;
                case '6':
                case 'l':
-                       if (cs < 6) cs++;
+                       if (cs < MAXITEMS) cs++;
                        break;
                case '-':
                case '<':
-                       if (cs != 6)
+                       if (cs != MAXITEMS)
                        {
                                if(cs%2)
                                {
@@ -5093,7 +5221,7 @@ static bool get_chara_limits(void)
                        break;
                case '+':
                case '>':
-                       if (cs != 6)
+                       if (cs != MAXITEMS)
                        {
                                if(cs%2)
                                {
@@ -5114,7 +5242,7 @@ static bool get_chara_limits(void)
                        }
                        break;
                case 'm':
-                       if(cs != 6)
+                       if(cs != MAXITEMS)
                        {
                                if(cs%2)
                                {
@@ -5135,7 +5263,7 @@ static bool get_chara_limits(void)
                        }
                        break;
                case 'n':
-                       if(cs != 6)
+                       if(cs != MAXITEMS)
                        {
                                if(cs%2)
                                {
@@ -5156,7 +5284,7 @@ static bool get_chara_limits(void)
                        }
                        break;
                case '?':
-#ifdef JP                 
+#ifdef JP
                        show_help("jbirth.txt#AutoRoller");
 #else
                        show_help("birth.txt#AutoRoller");
@@ -5165,9 +5293,9 @@ static bool get_chara_limits(void)
                case '=':
                        screen_save();
 #ifdef JP
-                       do_cmd_options_aux(6, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
 #else
-                       do_cmd_options_aux(6, "Startup Opts((*)s effect score)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth Option((*)s effect score)");
 #endif
 
                        screen_load();
@@ -5176,47 +5304,35 @@ static bool get_chara_limits(void)
                        bell();
                        break;
                }
-               if(c == ESCAPE || ((c == ' ' || c == '\r' || c == '\n') && cs == 6))break;
+               if(c == ESCAPE || ((c == ' ' || c == '\r' || c == '\n') && cs == MAXITEMS))break;
        }
 
        /* Input the minimum stats */
-       for (i = 0; i < 6; i++)
-       {
-               /* Save the minimum stat */
-               chara_limit[i] = (cval[i] > 0) ? cval[i] : 0;
-       }
+       chara_limit.agemin = cval[0];
+       chara_limit.agemax = cval[1];
+       chara_limit.htmin = cval[2];
+       chara_limit.htmax = cval[3];
+       chara_limit.wtmin = cval[4];
+       chara_limit.wtmax = cval[5];
+       chara_limit.scmin = cval[6];
+       chara_limit.scmax = cval[7];
+
        return TRUE;
 }
 #endif
 
-static char histpref_buf[240];
+#define HISTPREF_LIMIT 1024
+static char *histpref_buf = NULL;
 
+/*
+ * Hook function for reading the histpref.prf file.
+ */
 void add_history_from_pref_line(cptr t)
 {
-       int  limit = (sizeof histpref_buf) - 1;
-       int  i;
-
-       for (i = strlen(histpref_buf); *t && (i < limit); t++)
-       {
-#ifdef JP
-               if (iskanji(*t) || isprint(*t))
-#else
-               if (isprint(*t))
-#endif
-               {
-#ifdef JP
-                       if (iskanji(*t))
-                       {
-                               if (i + 1 >= limit) break;
-                               histpref_buf[i++] = *(t++);
-                       }
-#endif
-                       histpref_buf[i++] = *t;
-               }
-       }
+       /* Do nothing if the buffer is not ready */
+       if (!histpref_buf) return;
 
-       /* Terminate */
-       histpref_buf[(i < limit) ? i : limit] = '\0';
+       my_strcat(histpref_buf, t, HISTPREF_LIMIT);
 }
 
 
@@ -5227,6 +5343,7 @@ static bool do_cmd_histpref(void)
        int i, j, n;
        char *s, *t;
        char temp[64 * 4];
+       char histbuf[HISTPREF_LIMIT];
 
 #ifdef JP
        if (!get_check("À¸¤¤Î©¤ÁÀßÄê¥Õ¥¡¥¤¥ë¤ò¥í¡¼¥É¤·¤Þ¤¹¤«? ")) return FALSE;
@@ -5234,13 +5351,14 @@ static bool do_cmd_histpref(void)
        if (!get_check("Load background history preference file? ")) return FALSE;
 #endif
 
-       /* Init buffer */
-       histpref_buf[0] = '\0';
+       /* Prepare the buffer */
+       histbuf[0] = '\0';
+       histpref_buf = histbuf;
 
 #ifdef JP
-       sprintf(buf, "histedit-%s.prf", player_name);
+       sprintf(buf, "histedit-%s.prf", player_base);
 #else
-       sprintf(buf, "histpref-%s.prf", player_name);
+       sprintf(buf, "histpref-%s.prf", player_base);
 #endif
        err = process_histpref_file(buf);
 
@@ -5259,15 +5377,28 @@ static bool do_cmd_histpref(void)
        {
 #ifdef JP
                msg_print("À¸¤¤Î©¤ÁÀßÄê¥Õ¥¡¥¤¥ë¤ÎÆɤ߹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£");
-               msg_print("histedit.prf¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó¡£");
 #else
                msg_print("Failed to load background history preference.");
-               msg_print("Can't find histpref.prf");
 #endif
                msg_print(NULL);
 
-               /* Terminate buffer */
-               histpref_buf[0] = '\0';
+               /* Kill the buffer */
+               histpref_buf = NULL;
+
+               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;
        }
 
@@ -5295,7 +5426,7 @@ static bool do_cmd_histpref(void)
                }
        }
 
-       /* Turn 0 to space */
+       /* Fill the remaining spaces */
        for (i = 0; i < 4; i++)
        {
                for (j = 0; p_ptr->history[i][j]; j++) /* loop */;
@@ -5304,8 +5435,8 @@ static bool do_cmd_histpref(void)
                p_ptr->history[i][59] = '\0';
        }
 
-       /* Terminate buffer */
-       histpref_buf[0] = '\0';
+       /* Kill the buffer */
+       histpref_buf = NULL;
 
        return TRUE;
 }
@@ -5316,7 +5447,6 @@ static bool do_cmd_histpref(void)
 static void edit_history(void)
 {
        char old_history[4][60];
-       char c;
        int y = 0, x = 0;
        int i, j;
 
@@ -5336,14 +5466,17 @@ static void edit_history(void)
        display_player(1);
 #ifdef JP
        c_put_str(TERM_L_GREEN, "(¥­¥ã¥é¥¯¥¿¡¼¤ÎÀ¸¤¤Î©¤Á - ÊÔ½¸¥â¡¼¥É)", 11, 20);
-       put_str("[ 2/4/6/8¤Ç°ÜÆ°¡¢Enter¤Ç½ªÎ»¡¢Ctrl-F¤Ç¥Õ¥¡¥¤¥ëÆɤ߹þ¤ß ]", 17, 10);
+       put_str("[ ¥«¡¼¥½¥ë¥­¡¼¤Ç°ÜÆ°¡¢Enter¤Ç½ªÎ»¡¢Ctrl-A¤Ç¥Õ¥¡¥¤¥ëÆɤ߹þ¤ß ]", 17, 10);
 #else
        c_put_str(TERM_L_GREEN, "(Character Background - Edit Mode)", 11, 20);
-       put_str("[ 2/4/6/8 for Move, Enter for End, Ctrl-F for Read pref ]", 17, 10);
+       put_str("[ Cursor key for Move, Enter for End, Ctrl-A for Read pref ]", 17, 10);
 #endif
 
        while (TRUE)
        {
+               int skey;
+               char c;
+
                for (i = 0; i < 4; i++)
                {
                        put_str(p_ptr->history[i], i + 12, 10);
@@ -5358,9 +5491,14 @@ static void edit_history(void)
                /* Place cursor just after cost of current stat */
                Term_gotoxy(x + 10, y + 12);
 
-               c = inkey();
+               /* Get special key code */
+               skey = inkey_special(TRUE);
 
-               if (c == '8')
+               /* Get a character code */
+               if (!(skey & SKEY_MASK)) c = (char)skey;
+               else c = 0;
+
+               if (skey == SKEY_UP || c == KTRL('p'))
                {
                        y--;
                        if (y < 0) y = 3;
@@ -5368,7 +5506,7 @@ static void edit_history(void)
                        if ((x > 0) && (iskanji2(p_ptr->history[y], x-1))) x--;
 #endif
                }
-               else if (c == '2')
+               else if (skey == SKEY_DOWN || c == KTRL('n'))
                {
                        y++;
                        if (y > 3) y = 0;
@@ -5376,7 +5514,7 @@ static void edit_history(void)
                        if ((x > 0) && (iskanji2(p_ptr->history[y], x-1))) x--;
 #endif
                }
-               else if (c == '6')
+               else if (skey == SKEY_RIGHT || c == KTRL('f'))
                {
 #ifdef JP
                        if (iskanji2(p_ptr->history[y], x)) x++;
@@ -5388,7 +5526,7 @@ static void edit_history(void)
                                if (y < 3) y++;
                        }
                }
-               else if (c == '4')
+               else if (skey == SKEY_LEFT || c == KTRL('b'))
                {
                        x--;
                        if (x < 0)
@@ -5405,7 +5543,7 @@ static void edit_history(void)
                        if ((x > 0) && (iskanji2(p_ptr->history[y], x-1))) x--;
 #endif
                }
-               else if (c == '\r')
+               else if (c == '\r' || c == '\n')
                {
                        Term_erase(0, 11, 255);
                        Term_erase(0, 17, 255);
@@ -5432,7 +5570,7 @@ static void edit_history(void)
                        }
                        break;
                }
-               else if (c == KTRL('F'))
+               else if (c == KTRL('A'))
                {
                        if (do_cmd_histpref())
                        {
@@ -5517,7 +5655,6 @@ static void edit_history(void)
 static bool player_birth_aux(void)
 {
        int i, k, n, cs, os;
-       int number_of_quests;
 
        int mode = 0;
 
@@ -5537,7 +5674,6 @@ static bool player_birth_aux(void)
        char b2 = ']';
 
        char buf[80], cur[80];
-       char inp[80];
 
 
        /*** Intro ***/
@@ -5600,14 +5736,12 @@ static bool player_birth_aux(void)
        {
                /* Analyze */
                sp_ptr = &sex_info[n];
-               str = sp_ptr->title;
-
 
                /* Display */
 #ifdef JP
-               sprintf(buf, "%c%c%s", I2A(n), p2, str);
+               sprintf(buf, "%c%c%s", I2A(n), p2, sp_ptr->title);
 #else
-               sprintf(buf, "%c%c %s", I2A(n), p2, str);
+               sprintf(buf, "%c%c %s", I2A(n), p2, sp_ptr->title);
 #endif
                put_str(buf, 12 + (n/5), 2 + 15 * (n%5));
        }
@@ -5692,9 +5826,9 @@ static bool player_birth_aux(void)
                {
                        screen_save();
 #ifdef JP
-                       do_cmd_options_aux(6, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
 #else
-                       do_cmd_options_aux(6, "Startup Opts((*)s effect score)");
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth Option((*)s effect score)");
 #endif
 
                        screen_load();
@@ -5705,11 +5839,9 @@ static bool player_birth_aux(void)
        /* Set sex */
        p_ptr->psex = k;
        sp_ptr = &sex_info[p_ptr->psex];
-       str = sp_ptr->title;
-
 
        /* Display */
-       c_put_str(TERM_L_BLUE, str, 3, 15);
+       c_put_str(TERM_L_BLUE, sp_ptr->title, 3, 15);
 
        /* Clean up */
        clear_from(10);
@@ -5825,9 +5957,9 @@ static bool player_birth_aux(void)
 
        screen_save();
 #ifdef JP
-       do_cmd_options_aux(6, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
+       do_cmd_options_aux(OPT_PAGE_BIRTH, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
 #else
-       do_cmd_options_aux(6, "Startup Opts((*)s effect score)");
+       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth Option((*)s effect score)");
 #endif
 
        screen_load();
@@ -5855,80 +5987,6 @@ static bool player_birth_aux(void)
 
 #endif /* ALLOW_AUTOROLLER */
 
-       /* Clean up */
-       clear_from(10);
-
-       /*** User enters number of quests ***/
-       /* Heino Vander Sanden and Jimmy De Laet */
-
-       /* Extra info */
-#ifdef JP
-       put_str("ɬ¿Ü¤Î¥¯¥¨¥¹¥È(¥ª¥Ù¥í¥óµÚ¤Óº®Æ٤Υµ¡¼¥Ú¥ó¥È)¤Ë²Ã¤¨¤Æ¡¢ÄɲäΥ¯¥¨¥¹¥È¤Î", 10, 5);
-       put_str("¿ô¤òÀßÄꤹ¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£", 11, 5);
-       put_str("Äɲ寥¨¥¹¥È¤ò¹Ô¤Ê¤¤¤¿¤¯¤Ê¤¤¾ì¹ç¤Ï '0'¤òÆþÎϤ·¤Æ²¼¤µ¤¤¡£", 12, 5);
-       put_str("¥é¥ó¥À¥à¤Ë·èÄꤹ¤ë¤Ë¤Ï'*'¤òÆþÎϤ·¤Æ²¼¤µ¤¤¡£", 13, 5);
-#else
-       put_str("You can enter the number of quests you'd like to perform in addition", 10, 5);
-       put_str("to the two obligatory ones ( Oberon and the Serpent of Chaos )", 11, 5);
-       put_str("In case you do not want any additional quests, just enter 0", 12, 5);
-       put_str("If you want a random number of random quests, just enter *", 13, 5);
-#endif
-
-       /* Ask the number of additional quests */
-       while (TRUE)
-       {
-
-#ifdef JP
-               put_str(format("Äɲ寥¨¥¹¥È¤Î¿ô (%u°Ê²¼) ", MAX_RANDOM_QUEST - MIN_RANDOM_QUEST + 1), 15, 5);
-#else
-               put_str(format("Number of additional quests? (<%u) ", MAX_RANDOM_QUEST - MIN_RANDOM_QUEST + 2), 15, 5);
-#endif
-
-
-               /* Get a the number of additional quest */
-               while (TRUE)
-               {
-                       /* Move the cursor */
-                       put_str("", 15, 40);
-
-                       /* Default */
-                       strcpy(inp, "10");
-
-                       /* Get a response (or escape) */
-                       if (!askfor_aux(inp, 2)) strcpy(inp, "10");
-
-                       /* Quit */
-                       if (inp[0] == 'Q') birth_quit();
-
-                       /* Start over */
-                       if (inp[0] == 'S') return (FALSE);
-
-                       /* Check for random number of quests */
-                       if (inp[0] == '*')
-                       {
-                               /* 0 to 10 random quests */
-                               number_of_quests = randint0(11);
-                       }
-                       else if (inp[0] == '?')
-                       {
-#ifdef JP                 
-                               show_help("jbirth.txt#RandomQuests");
-#else
-                               show_help("birth.txt#RandomQuests");
-#endif
-                               continue;
-                       }
-                       else
-                       {
-                               number_of_quests = atoi(inp);
-                       }
-
-                       /* Break on valid input */
-                       if ((number_of_quests <= MAX_RANDOM_QUEST - MIN_RANDOM_QUEST + 1) && (number_of_quests >= 0)) break;
-               }
-               break;
-       }
-
        /* Clear */
        clear_from(10);
 
@@ -6079,9 +6137,10 @@ static bool player_birth_aux(void)
 
                                if (autochara)
                                {
-                                       if ((p_ptr->ht < chara_limit[0]) || (p_ptr->ht > chara_limit[1])) accept = FALSE;
-                                       if ((p_ptr->wt < chara_limit[2]) || (p_ptr->wt > chara_limit[3])) accept = FALSE;
-                                       if ((p_ptr->sc < chara_limit[4]) || (p_ptr->sc > chara_limit[5])) accept = FALSE;
+                                       if ((p_ptr->age < chara_limit.agemin) || (p_ptr->age > chara_limit.agemax)) accept = FALSE;
+                                       if ((p_ptr->ht < chara_limit.htmin) || (p_ptr->ht > chara_limit.htmax)) accept = FALSE;
+                                       if ((p_ptr->wt < chara_limit.wtmin) || (p_ptr->wt > chara_limit.wtmax)) accept = FALSE;
+                                       if ((p_ptr->sc < chara_limit.scmin) || (p_ptr->sc > chara_limit.scmax)) accept = FALSE;
                                }
                                if (accept) break;
                        }
@@ -6228,7 +6287,7 @@ static bool player_birth_aux(void)
                        /* Help */
                        if (c == '?')
                        {
-#ifdef JP                 
+#ifdef JP
                                show_help("jbirth.txt#AutoRoller");
 #else
                                show_help("birth.txt#AutoRoller");
@@ -6239,9 +6298,9 @@ static bool player_birth_aux(void)
                        {
                                screen_save();
 #ifdef JP
-                               do_cmd_options_aux(6, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
+                               do_cmd_options_aux(OPT_PAGE_BIRTH, "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)");
 #else
-                               do_cmd_options_aux(6, "Startup Opts((*)s effect score)");
+                               do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth Option((*)s effect score)");
 #endif
 
                                screen_load();
@@ -6271,6 +6330,12 @@ static bool player_birth_aux(void)
        /* Clear prompt */
        clear_from(23);
 
+       /* Get a name, recolor it, prepare savefile */
+       get_name();
+
+       /* Process the player name */
+       process_player_name(creating_savefile);
+
        /*** Edit character background ***/
        edit_history();
 
@@ -6278,10 +6343,6 @@ static bool player_birth_aux(void)
 
        get_max_stats();
 
-       /* Get a name, recolor it, prepare savefile */
-
-       get_name();
-
        get_virtues();
 
        /* Prompt for it */
@@ -6301,16 +6362,14 @@ static bool player_birth_aux(void)
        /* Start over */
        if (c == 'S') return (FALSE);
 
-       init_dungeon_quests(number_of_quests);
+
+       /* Initialize random quests */
+       init_dungeon_quests();
 
        /* Save character data for quick start */
        save_prev_data(&previous_char);
-       previous_char.quests = number_of_quests;
        previous_char.quick_ok = TRUE;
 
-       /* Process the player name */
-       process_player_name(FALSE);
-
        /* Accept */
        return (TRUE);
 }
@@ -6351,7 +6410,7 @@ static bool ask_quick_start(void)
                else if (c == 'S') return (FALSE);
                else if (c == '?')
                {
-#ifdef JP                 
+#ifdef JP
                        show_help("jbirth.txt#QuickStart");
 #else
                        show_help("birth.txt#QuickStart");
@@ -6370,7 +6429,7 @@ static bool ask_quick_start(void)
        }
 
        load_prev_data(FALSE);
-       init_dungeon_quests(previous_char.quests);
+       init_dungeon_quests();
        init_turn();
 
        sp_ptr = &sex_info[p_ptr->psex];
@@ -6414,12 +6473,6 @@ void player_birth(void)
 
        playtime = 0;
 
-       /*
-        * Paranoia - wipe the pets
-        * For accuracy of precalc_cur_num_of_pet() called from wipe_m_list()
-        */
-       C_WIPE(party_mon, MAX_PARTY_MON, monster_type);
-
        /* 
         * Wipe monsters in old dungeon
         * This wipe destroys value of m_list[].cur_num .