OSDN Git Service

- オプション名confirm_wear の変数名が wear_confirm だったので、オプション名に合わせた。
[hengband/hengband.git] / src / flavor.c
index 71f4a0e..92823f8 100644 (file)
@@ -39,8 +39,9 @@
  * Rings (adjectives and colors)
  */
 
-static cptr ring_adj[MAX_ROCKS] =
-{
+static cptr ring_adj[MAX_ROCKS]
+#ifndef JP
+= {
        "Alexandrite", "Amethyst", "Aquamarine", "Azurite", "Beryl",
        "Bloodstone", "Calcite", "Carnelian", "Corundum", "Diamond",
        "Emerald", "Fluorite", "Garnet", "Granite", "Jade",
@@ -56,10 +57,8 @@ static cptr ring_adj[MAX_ROCKS] =
        "Rusty","Transparent", "Steel", "Tanzanite",
        "Nephrite",
 };
-
-#ifdef JP
-static cptr J_ring_adj[MAX_ROCKS] =
-{
+#else
+= {
     "¶âÎÐÀФÎ","¥¢¥á¥¸¥¹¥È¤Î","¥¢¥¯¥¢¥Þ¥ê¥ó¤Î","¤á¤Î¤¦¤Î","ÎÐÃìÀФÎ",
     "·ì¶Ì¿ï¤Î","Êý²òÀФÎ","ÀÖ¤á¤Î¤¦¤Î","¹Ë¶Ì¤Î","¥À¥¤¥¢¥â¥ó¥É¤Î",
     "¥¨¥á¥é¥ë¥É¤Î","¥Û¥¿¥ëÀФÎ","¥¬¡¼¥Í¥Ã¥È¤Î","¸æ±ÆÀФÎ","¤Ò¤¹¤¤¤Î",
@@ -76,6 +75,7 @@ static cptr J_ring_adj[MAX_ROCKS] =
     "Æð¶Ì¤Î",
 };
 #endif
+
 static byte ring_col[MAX_ROCKS] =
 {
        TERM_GREEN, TERM_VIOLET, TERM_L_BLUE, TERM_L_BLUE, TERM_L_GREEN,
@@ -98,8 +98,9 @@ static byte ring_col[MAX_ROCKS] =
 /*
  * Amulets (adjectives and colors)
  */
-static cptr amulet_adj[MAX_AMULETS] =
-{
+static cptr amulet_adj[MAX_AMULETS]
+#ifndef JP
+= {
        "Amber", "Driftwood", "Coral", "Agate", "Ivory",
        "Obsidian", "Bone", "Brass", "Bronze", "Pewter",
        "Tortoise Shell", "Golden", "Azure", "Crystal", "Silver",
@@ -107,10 +108,8 @@ static cptr amulet_adj[MAX_AMULETS] =
        "Curved", "Dragon's claw", "Rosary", "Jade", "Mithril",
        "Ruby"
 };
-
-#ifdef JP
-static cptr J_amulet_adj[MAX_AMULETS] =
-{
+#else
+= {
     "àèàá¤Î","ήÌÚ¤Î","¥µ¥ó¥´¤Î","¤á¤Î¤¦¤Î","¾Ý²ç¤Î",
     "¹õÍËÀФÎ","¹ü¤Î","¿¿ï«¤Î","ÀÄƼ¤Î","¤·¤í¤á¤Î",
     "¤Ù¤Ã¹Ã¤Î","¶â¤Î","ÎÜÍþ¤Î","¿å¾½¤Î","¶ä¤Î",
@@ -119,6 +118,7 @@ static cptr J_amulet_adj[MAX_AMULETS] =
     "¥ë¥Ó¡¼¤Î"
 };
 #endif
+
 static byte amulet_col[MAX_AMULETS] =
 {
        TERM_YELLOW, TERM_L_UMBER, TERM_WHITE, TERM_L_WHITE, TERM_WHITE,
@@ -133,8 +133,9 @@ static byte amulet_col[MAX_AMULETS] =
 /*
  * Staffs (adjectives and colors)
  */
-static cptr staff_adj[MAX_WOODS] =
-{
+static cptr staff_adj[MAX_WOODS]
+#ifndef JP
+= {
        "Aspen", "Balsa", "Banyan", "Birch", "Cedar",
        "Cottonwood", "Cypress", "Dogwood", "Elm", "Eucalyptus",
        "Hemlock", "Hickory", "Ironwood", "Locust", "Mahogany",
@@ -143,10 +144,8 @@ static cptr staff_adj[MAX_WOODS] =
        "Mistletoe", "Hawthorn", "Bamboo", "Silver", "Runed",
        "Golden", "Ashen", "Ivory","Gnarled"/*,"Willow"*/
 };
-
-#ifdef JP
-static cptr J_staff_adj[MAX_WOODS] =
-{
+#else
+= {
     "¥Ý¥×¥é¤Î","¥Ð¥ë¥µ¤Î","¥Ð¥ó¥ä¥ó¤Î","¥«¥Ð¤Î","À¾ÍÎ¥¹¥®¤Î",
     "ÛؤÎ","¥¤¥È¥¹¥®¤Î","¥ß¥º¥­¤Î","¥Ë¥ì¤Î","¥æ¡¼¥«¥ê¤Î",
     "¥Ä¥¬¤Î","¥Ö¥Ê¤Î","¹õÃɤÎ","¥¢¥«¥·¥¢¤Î","¥Þ¥Û¥¬¥Ë¡¼¤Î",
@@ -156,6 +155,7 @@ static cptr J_staff_adj[MAX_WOODS] =
     "¶â¤Î","¥È¥Í¥ê¥³¤Î", "¾Ý²ç¤Î", "·î·Ë¼ù¤Î"
 };
 #endif
+
 static byte staff_col[MAX_WOODS] =
 {
        TERM_L_UMBER, TERM_L_UMBER, TERM_L_UMBER, TERM_L_UMBER, TERM_L_UMBER,
@@ -171,8 +171,9 @@ static byte staff_col[MAX_WOODS] =
 /*
  * Wands (adjectives and colors)
  */
-static cptr wand_adj[MAX_METALS] =
-{
+static cptr wand_adj[MAX_METALS]
+#ifndef JP
+= {
        "Aluminum", "Cast Iron", "Chromium", "Copper", "Gold",
        "Iron", "Magnesium", "Molybdenum", "Nickel", "Rusty",
        "Silver", "Steel", "Tin", "Titanium", "Tungsten",
@@ -182,10 +183,8 @@ static cptr wand_adj[MAX_METALS] =
        "Platinum", "Lead","Lead-Plated", "Ivory" , "Adamantite",
        "Uridium", "Long", "Short", "Hexagonal", "Carbonized"
 };
-
-#ifdef JP
-static cptr J_wand_adj[MAX_METALS] =
-{
+#else
+= {
     "¥¢¥ë¥ß¤Î","ÃòÅ´¤Î","¥¯¥í¥à¤Î","Ƽ¤Î","¶â¤Î",
     "Å´¤Î","¥Þ¥°¥Í¥·¥¦¥à¤Î","¥â¥ê¥Ö¥Ç¥ó¤Î","¥Ë¥Ã¥±¥ë¤Î","»¬¤Ó¤¿",
     "¶ä¤Î","¹ÝÅ´¤Î","¥Ö¥ê¥­¤Î","¥Á¥¿¥ó¤Î","¥¿¥ó¥°¥¹¥Æ¥ó¤Î",
@@ -196,6 +195,7 @@ static cptr J_wand_adj[MAX_METALS] =
     "¥¤¥ê¥Â¥¦¥à¤Î","Ť¤","û¤¤","Ï»³Ñ·Á¤Î", "úÁǤÎ"
 };
 #endif
+
 static byte wand_col[MAX_METALS] =
 {
        TERM_L_BLUE, TERM_L_DARK, TERM_WHITE, TERM_L_UMBER, TERM_YELLOW,
@@ -216,9 +216,6 @@ static byte wand_col[MAX_METALS] =
 
 static cptr rod_adj[MAX_METALS];
 
-#ifdef JP
-static cptr J_rod_adj[MAX_METALS];
-#endif
 static byte rod_col[MAX_METALS];
 
 
@@ -226,23 +223,23 @@ static byte rod_col[MAX_METALS];
  * Mushrooms (adjectives and colors)
  */
 
-static cptr food_adj[MAX_SHROOM] =
-{
+static cptr food_adj[MAX_SHROOM]
+#ifndef JP
+= {
        "Blue", "Black", "Black Spotted", "Brown", "Dark Blue",
        "Dark Green", "Dark Red", "Yellow", "Furry", "Green",
        "Grey", "Light Blue", "Light Green", "Violet", "Red",
        "Slimy", "Tan", "White", "White Spotted", "Wrinkled",
 };
-
-#ifdef JP
-static cptr J_food_adj[MAX_SHROOM] =
-{
+#else
+= {
     "ÀĤ¤","¹õ¤¤","¹õÈäÎ","Ã㿧¤Î","·²ÀĤÎ",
     "¿¼ÎФÎ","¹È¿§¤Î","²«¿§¤¤","Âݤष¤¿","ÎФÎ",
     "¥°¥ì¡¼¤Î","¶õ¿§¤Î","²«ÎФÎ","¥¹¥ß¥ì¿§¤Î","ÀÖ¤¤",
     "¤Í¤Ð¤Í¤Ð¤·¤¿","²«³ì¿§¤Î","Çò¤¤","ÇòÈäÎ","¤·¤ï¤·¤ï¤Î",
 };
 #endif
+
 static byte food_col[MAX_SHROOM] =
 {
        TERM_BLUE, TERM_L_DARK, TERM_L_DARK, TERM_UMBER, TERM_BLUE,
@@ -258,8 +255,9 @@ static byte food_col[MAX_SHROOM] =
  * (water, apple juice, slime mold juice, something)
  */
 
-static cptr potion_adj[MAX_COLORS] =
-{
+static cptr potion_adj[MAX_COLORS]
+#ifndef JP
+= {
        "Clear", "Light Brown", "Icky Green", "xxx",
        "Azure", "Blue", "Blue Speckled", "Black", "Brown", "Brown Speckled",
        "Bubbling", "Chartreuse", "Cloudy", "Copper Speckled", "Crimson", "Cyan",
@@ -275,10 +273,8 @@ static cptr potion_adj[MAX_COLORS] =
        "Manly", "Stinking", "Oily Black", "Ichor", "Ivory White", "Sky Blue",
        "Gray", "Silver", "Bronze", "Flashing",
 };
-
-#ifdef JP
-static cptr J_potion_adj[MAX_COLORS] =
-{
+#else
+= {
     "Æ©ÌÀ¤Ê","ÇöÃ㿧¤Î","¤è¤É¤ó¤ÀÎФÎ","¼¿¹õ¤Î",
     "º°ÊˤÎ","ÀĤ¤","ÀÄÈäÎ","¹õ¤¤","Ã㿧¤Î","ÃãÈäÎ",
     "Ë¢¤À¤Ã¤¿","Çö²«Î理Î","Âù¤Ã¤¿","ƼÈäÎ","¹È¿§¤Î","¥·¥¢¥ó¿§¤Î",
@@ -296,6 +292,7 @@ static cptr J_potion_adj[MAX_COLORS] =
     "¥­¥é¥­¥é¸÷¤ë"
 };
 #endif
+
 static byte potion_col[MAX_COLORS] =
 {
        TERM_WHITE, TERM_L_UMBER, TERM_GREEN, 0,
@@ -320,9 +317,9 @@ static byte potion_col[MAX_COLORS] =
  * Syllables for scrolls (must be 1-4 letters each)
  */
 
+static cptr syllables[MAX_SYLLABLES]
 #ifdef JP
-static cptr J_syllables[MAX_SYLLABLES] =
-{
+= {
        "Å·", "ÃÏ", "̵", "ÍÑ", "°ì", "Åá", "ξ", "ÃÇ",
        "°á", "Ë¥", "Æü", "Àé", "½©", "Ëþ", "¿È", "ÁÏ",
        "áØ", "¼·", "ž", "Ȭ", "ÅÝ", "²é", "¿Å",
@@ -346,8 +343,7 @@ static cptr J_syllables[MAX_SYLLABLES] =
        "Íî", "±¢", "ÍÛ"
 };
 #else
-static cptr syllables[MAX_SYLLABLES] =
-{
+= {
        "a", "ab", "ag", "aks", "ala", "an", "ankh", "app",
        "arg", "arze", "ash", "aus", "ban", "bar", "bat", "bek",
        "bie", "bin", "bit", "bjor", "blu", "bot", "bu",
@@ -453,8 +449,7 @@ static bool object_flavor(int k_idx)
 
                case TV_RING:
                {
-                       if ((k_ptr->sval == SV_RING_POWER) || (k_ptr->sval == SV_RING_AHO)) return (0x90 + TERM_YELLOW);
-                       else return (0x90 + ring_col[k_ptr->sval]);
+                       return (0x90 + ring_col[k_ptr->sval]);
                }
 
                case TV_STAFF:
@@ -509,19 +504,19 @@ void get_table_name(char *out_string)
        strcat(out_string, Syllable);
        strcat(out_string, "¡Ù");
 #else
-       int testcounter = randint(3) + 1;
+       int testcounter = randint1(3) + 1;
 
        strcpy(out_string, "'");
 
-       if (randint(3) == 2)
+       if (randint1(3) == 2)
        {
                while (testcounter--)
-                       strcat(out_string, syllables[rand_int(MAX_SYLLABLES)]);
+                       strcat(out_string, syllables[randint0(MAX_SYLLABLES)]);
        }
        else
        {
                char Syllable[80];
-               testcounter = randint(2) + 1;
+               testcounter = randint1(2) + 1;
                while (testcounter--)
                {
                        (void)get_rnd_line("elvish.txt", 0, Syllable);
@@ -592,9 +587,6 @@ void flavor_init(void)
        for (i = 0; i < MAX_METALS; i++)
        {
                rod_adj[i] = wand_adj[i];
-#ifdef JP
-                J_rod_adj[i] = J_wand_adj[i];
-#endif
                rod_col[i] = wand_col[i];
        }
 
@@ -602,32 +594,39 @@ void flavor_init(void)
        /* Rings have "ring colors" */
        for (i = 0; i < MAX_ROCKS; i++)
        {
-               j = rand_int(MAX_ROCKS);
+               j = randint0(MAX_ROCKS);
                temp_adj = ring_adj[i];
                ring_adj[i] = ring_adj[j];
                ring_adj[j] = temp_adj;
-#ifdef JP
-                temp_adj = J_ring_adj[i];
-                J_ring_adj[i] = J_ring_adj[j];
-                J_ring_adj[j] = temp_adj;
-#endif
+
                temp_col = ring_col[i];
                ring_col[i] = ring_col[j];
                ring_col[j] = temp_col;
        }
 
+       /* Hack -- The One Ring */
+#ifdef JP
+       ring_adj[SV_RING_POWER] = "¶â̵¹¤¤Î";
+       ring_adj[SV_RING_AHO] = "¶âÍ­¹¤¤Î";
+#else
+       ring_adj[SV_RING_POWER] = "Plain Gold";
+       ring_adj[SV_RING_AHO] = "Plain Goldarn";
+#endif
+
+       if (!use_graphics)
+       {
+               ring_col[SV_RING_POWER] = TERM_YELLOW;
+               ring_col[SV_RING_AHO] = TERM_YELLOW;
+       }
+
        /* Amulets have "amulet colors" */
        for (i = 0; i < MAX_AMULETS; i++)
        {
-               j = rand_int(MAX_AMULETS);
+               j = randint0(MAX_AMULETS);
                temp_adj = amulet_adj[i];
                amulet_adj[i] = amulet_adj[j];
                amulet_adj[j] = temp_adj;
-#ifdef JP
-                temp_adj = J_amulet_adj[i];
-                J_amulet_adj[i] = J_amulet_adj[j];
-                J_amulet_adj[j] = temp_adj;
-#endif
+
                temp_col = amulet_col[i];
                amulet_col[i] = amulet_col[j];
                amulet_col[j] = temp_col;
@@ -636,15 +635,11 @@ void flavor_init(void)
        /* Staffs */
        for (i = 0; i < MAX_WOODS; i++)
        {
-               j = rand_int(MAX_WOODS);
+               j = randint0(MAX_WOODS);
                temp_adj = staff_adj[i];
                staff_adj[i] = staff_adj[j];
                staff_adj[j] = temp_adj;
-#ifdef JP
-                temp_adj = J_staff_adj[i];
-                J_staff_adj[i] = J_staff_adj[j];
-                J_staff_adj[j] = temp_adj;
-#endif
+
                temp_col = staff_col[i];
                staff_col[i] = staff_col[j];
                staff_col[j] = temp_col;
@@ -653,15 +648,11 @@ void flavor_init(void)
        /* Wands */
        for (i = 0; i < MAX_METALS; i++)
        {
-               j = rand_int(MAX_METALS);
+               j = randint0(MAX_METALS);
                temp_adj = wand_adj[i];
                wand_adj[i] = wand_adj[j];
                wand_adj[j] = temp_adj;
-#ifdef JP
-                temp_adj = J_wand_adj[i];
-                J_wand_adj[i] = J_wand_adj[j];
-                J_wand_adj[j] = temp_adj;
-#endif
+
                temp_col = wand_col[i];
                wand_col[i] = wand_col[j];
                wand_col[j] = temp_col;
@@ -670,15 +661,11 @@ void flavor_init(void)
        /* Rods */
        for (i = 0; i < MAX_METALS; i++)
        {
-               j = rand_int(MAX_METALS);
+               j = randint0(MAX_METALS);
                temp_adj = rod_adj[i];
                rod_adj[i] = rod_adj[j];
                rod_adj[j] = temp_adj;
-#ifdef JP
-                temp_adj = J_rod_adj[i];
-                J_rod_adj[i] = J_rod_adj[j];
-                J_rod_adj[j] = temp_adj;
-#endif
+
                temp_col = rod_col[i];
                rod_col[i] = rod_col[j];
                rod_col[j] = temp_col;
@@ -687,15 +674,11 @@ void flavor_init(void)
        /* Foods (Mushrooms) */
        for (i = 0; i < MAX_SHROOM; i++)
        {
-               j = rand_int(MAX_SHROOM);
+               j = randint0(MAX_SHROOM);
                temp_adj = food_adj[i];
                food_adj[i] = food_adj[j];
                food_adj[j] = temp_adj;
-#ifdef JP
-                temp_adj = J_food_adj[i];
-                J_food_adj[i] = J_food_adj[j];
-                J_food_adj[j] = temp_adj;
-#endif
+
                temp_col = food_col[i];
                food_col[i] = food_col[j];
                food_col[j] = temp_col;
@@ -704,15 +687,11 @@ void flavor_init(void)
        /* Potions */
        for (i = 4; i < MAX_COLORS; i++)
        {
-               j = rand_int(MAX_COLORS - 4) + 4;
+               j = randint0(MAX_COLORS - 4) + 4;
                temp_adj = potion_adj[i];
                potion_adj[i] = potion_adj[j];
                potion_adj[j] = temp_adj;
-#ifdef JP
-                temp_adj = J_potion_adj[i];
-                J_potion_adj[i] = J_potion_adj[j];
-                J_potion_adj[j] = temp_adj;
-#endif
+
                temp_col = potion_col[i];
                potion_col[i] = potion_col[j];
                potion_col[j] = temp_col;
@@ -742,17 +721,13 @@ void flavor_init(void)
                                tmp[0] = '\0';
 
                                /* Choose one or two syllables */
-                               s = ((rand_int(100) < 30) ? 1 : 2);
+                               s = ((randint0(100) < 30) ? 1 : 2);
 
                                /* Add a one or two syllable word */
                                for (q = 0; q < s; q++)
                                {
                                        /* Add the syllable */
-#ifdef JP
-                                       strcat(tmp, J_syllables[rand_int(MAX_SYLLABLES)]);
-#else
-                                       strcat(tmp, syllables[rand_int(MAX_SYLLABLES)]);
-#endif
+                                       strcat(tmp, syllables[randint0(MAX_SYLLABLES)]);
                                }
 
                                /* Stop before getting too long */
@@ -1281,14 +1256,10 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                        /* Known artifacts */
                        if (artifact_p(o_ptr) && aware) break;
 
-                       if ((k_ptr->flags3 & TR3_INSTA_ART) && aware) break;
+                       if ((k_ptr->gen_flags & TRG_INSTA_ART) && aware) break;
 
                        /* Color the object */
-#ifdef JP
-                       modstr = J_amulet_adj[indexx];
-#else
                        modstr = amulet_adj[indexx];
-#endif
 
                        if (aware) append_name = TRUE;
 
@@ -1312,14 +1283,10 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                        /* Known artifacts */
                        if (artifact_p(o_ptr) && aware) break;
 
-                       if ((k_ptr->flags3 & TR3_INSTA_ART) && aware) break;
+                       if ((k_ptr->gen_flags & TRG_INSTA_ART) && aware) break;
 
                        /* Color the object */
-#ifdef JP
-                       modstr = J_ring_adj[indexx];
-#else
                        modstr = ring_adj[indexx];
-#endif
 
                        if (aware) append_name = TRUE;
 
@@ -1334,15 +1301,6 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                                basenm = aware ? "& # Ring~" : "& # Ring~";
 #endif
 
-
-                       /* Hack -- The One Ring */
-#ifdef JP
-                       if (!aware && (o_ptr->sval == SV_RING_POWER)) modstr = "¶â̵¹¤¤Î";
-                       if (!aware && (o_ptr->sval == SV_RING_AHO)) modstr = "¶âÍ­¹¤¤Î";
-#else
-                       if (!aware && (o_ptr->sval == SV_RING_POWER)) modstr = "Plain Gold";
-                       if (!aware && (o_ptr->sval == SV_RING_AHO)) modstr = "Plain Goldarn";
-#endif
                        if (!k_ptr->to_h && !k_ptr->to_d && (o_ptr->to_h || o_ptr->to_d)) show_weapon = TRUE;
 
                        break;
@@ -1356,11 +1314,7 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                case TV_STAFF:
                {
                        /* Color the object */
-#ifdef JP
-                       modstr = J_staff_adj[indexx];
-#else
                        modstr = staff_adj[indexx];
-#endif
 
                        if (aware) append_name = TRUE;
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
@@ -1380,11 +1334,7 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                case TV_WAND:
                {
                        /* Color the object */
-#ifdef JP
-                       modstr = J_wand_adj[indexx];
-#else
                        modstr = wand_adj[indexx];
-#endif
 
                        if (aware) append_name = TRUE;
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
@@ -1404,11 +1354,7 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                case TV_ROD:
                {
                        /* Color the object */
-#ifdef JP
-                       modstr = J_rod_adj[indexx];
-#else
                        modstr = rod_adj[indexx];
-#endif
 
                        if (aware) append_name = TRUE;
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
@@ -1447,11 +1393,7 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                case TV_POTION:
                {
                        /* Color the object */
-#ifdef JP
-                       modstr = J_potion_adj[indexx];
-#else
                        modstr = potion_adj[indexx];
-#endif
 
                        if (aware) append_name = TRUE;
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
@@ -1474,11 +1416,7 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                        if (o_ptr->sval >= SV_FOOD_MIN_FOOD) break;
 
                        /* Color the object */
-#ifdef JP
-                       modstr = J_food_adj[indexx];
-#else
                        modstr = food_adj[indexx];
-#endif
 
                        if (aware) append_name = TRUE;
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
@@ -1701,7 +1639,7 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
        }
        else if (o_ptr->number > 1)
        {
-               if ( old_way_of_kaz == FALSE ){
+               if ( change_numeral == FALSE ){
                        t = object_desc_num(t, o_ptr->number);
                        if (o_ptr->number > 9)
                                t = object_desc_str(t, "¸Ä¤Î ");
@@ -2153,6 +2091,16 @@ t = object_desc_str(t, "(
 
                                        break;
                                }
+                               case CHEST_ALARM:
+                               {
+#ifdef JP
+t = object_desc_str(t, "(·ÙÊóÁõÃÖ)");
+#else
+                                       t = object_desc_str(t, " (Alarm)");
+#endif
+
+                                       break;
+                               }
                                default:
                                {
 #ifdef JP
@@ -2317,7 +2265,33 @@ t = object_desc_str(t, "(
 
                t = object_desc_chr(t, p2);
        }
+       else if ((p_ptr->pclass == CLASS_NINJA) && (o_ptr->tval == TV_SPIKE))
+       {
+               int avgdam;
+               s16b energy_fire;
+
+               if (p_ptr->mighty_throw)
+                       avgdam =  1 + 3;
+               else
+                       avgdam =  1;
+               avgdam += ((p_ptr->lev+30)*(p_ptr->lev+30)-900)/55;
+
+               energy_fire = 100 - p_ptr->lev;
 
+               /* display (shot damage/ avg damage) */
+               t = object_desc_chr(t, ' ');
+               t = object_desc_chr(t, p1);
+               t = object_desc_num(t, avgdam);
+               t = object_desc_chr(t, '/');
+
+               /* calc effects of energy */
+               avgdam = 100 * avgdam / energy_fire;
+
+               t = object_desc_num(t, avgdam);
+
+               t = object_desc_chr(t, p2);
+       }
+              
 
        /* Add the armor bonuses */
        if (known)