OSDN Git Service

固定アーティファクトの発動は全部外部フラグ化し終わった。
[hengband/hengband.git] / src / bldg.c
index f538f29..6b95be9 100644 (file)
@@ -129,9 +129,9 @@ static void show_building(building_type* bldg)
                                {
                                        action_color = TERM_YELLOW;
 #ifdef JP
-sprintf(buff, "($%ld)", bldg->member_costs[i]);
+sprintf(buff, "($%ld)", (long int)bldg->member_costs[i]);
 #else
-                                       sprintf(buff, "(%ldgp)", bldg->member_costs[i]);
+                                       sprintf(buff, "(%ldgp)", (long int)bldg->member_costs[i]);
 #endif
 
                                }
@@ -139,9 +139,9 @@ sprintf(buff, "($%ld)", bldg->member_costs[i]);
                                {
                                        action_color = TERM_YELLOW;
 #ifdef JP
-sprintf(buff, "($%ld)", bldg->other_costs[i]);
+sprintf(buff, "($%ld)", (long int)bldg->other_costs[i]);
 #else
-                                       sprintf(buff, "(%ldgp)", bldg->other_costs[i]);
+                                       sprintf(buff, "(%ldgp)", (long int)bldg->other_costs[i]);
 #endif
 
                                }
@@ -168,9 +168,9 @@ strcpy(buff, "(
                                {
                                        action_color = TERM_YELLOW;
 #ifdef JP
-sprintf(buff, "($%ld)", bldg->member_costs[i]);
+sprintf(buff, "($%ld)", (long int)bldg->member_costs[i]);
 #else
-                                       sprintf(buff, "(%ldgp)", bldg->member_costs[i]);
+                                       sprintf(buff, "(%ldgp)", (long int)bldg->member_costs[i]);
 #endif
 
                                }
@@ -178,9 +178,9 @@ sprintf(buff, "($%ld)", bldg->member_costs[i]);
                                {
                                        action_color = TERM_YELLOW;
 #ifdef JP
-sprintf(buff, "($%ld)", bldg->other_costs[i]);
+sprintf(buff, "($%ld)", (long int)bldg->other_costs[i]);
 #else
-                                       sprintf(buff, "(%ldgp)", bldg->other_costs[i]);
+                                       sprintf(buff, "(%ldgp)", (long int)bldg->other_costs[i]);
 #endif
 
                                }
@@ -201,9 +201,9 @@ strcpy(buff, "(
                                {
                                        action_color = TERM_YELLOW;
 #ifdef JP
-sprintf(buff, "($%ld)", bldg->member_costs[i]);
+sprintf(buff, "($%ld)", (long int)bldg->member_costs[i]);
 #else
-                                       sprintf(buff, "(%ldgp)", bldg->member_costs[i]);
+                                       sprintf(buff, "(%ldgp)", (long int)bldg->member_costs[i]);
 #endif
 
                                }
@@ -281,7 +281,14 @@ msg_print("
 #else
                                        if (get_check("Do you fight? "))
 #endif
-                                       {
+                                       {       
+#ifdef JP
+                        msg_print("»à¤Ì¤¬¤è¤¤¡£");
+#else
+                                           msg_print("Die, maggots.");
+#endif
+                                               msg_print(NULL);
+                                       
                                                p_ptr->exit_bldg = FALSE;
                                                reset_tim_flags();
 
@@ -1270,9 +1277,9 @@ static bool gamble_comm(int cmd)
                /* Get the wager */
                strcpy(out_val, "");
 #ifdef JP
-sprintf(tmp_str,"ÅÒ¤±¶â (1-%ld)¡©", maxbet);
+sprintf(tmp_str,"ÅÒ¤±¶â (1-%ld)¡©", (long int)maxbet);
 #else
-               sprintf(tmp_str,"Your wager (1-%ld) ? ", maxbet);
+               sprintf(tmp_str,"Your wager (1-%ld) ? ", (long int)maxbet);
 #endif
 
 
@@ -1303,9 +1310,9 @@ msg_print("
                        else if (wager > maxbet)
                        {
 #ifdef JP
-msg_format("%ld¥´¡¼¥ë¥É¤À¤±¼õ¤±¤è¤¦¡£»Ä¤ê¤Ï¼è¤Ã¤È¤­¤Ê¡£", maxbet);
+msg_format("%ld¥´¡¼¥ë¥É¤À¤±¼õ¤±¤è¤¦¡£»Ä¤ê¤Ï¼è¤Ã¤È¤­¤Ê¡£", (long int)maxbet);
 #else
-                               msg_format("I'll take %ld gold of that. Keep the rest.", maxbet);
+                               msg_format("I'll take %ld gold of that. Keep the rest.", (long int)maxbet);
 #endif
 
                                wager = maxbet;
@@ -1327,17 +1334,17 @@ msg_print("
                        oldgold = p_ptr->au;
 
 #ifdef JP
-sprintf(tmp_str, "¥²¡¼¥àÁ°¤Î½ê»ý¶â: %9ld", oldgold);
+sprintf(tmp_str, "¥²¡¼¥àÁ°¤Î½ê»ý¶â: %9ld", (long int)oldgold);
 #else
-                       sprintf(tmp_str, "Gold before game: %9ld", oldgold);
+                       sprintf(tmp_str, "Gold before game: %9ld", (long int)oldgold);
 #endif
 
                        prt(tmp_str, 20, 2);
 
 #ifdef JP
-sprintf(tmp_str, "¸½ºß¤Î³Ý¤±¶â:     %9ld", wager);
+sprintf(tmp_str, "¸½ºß¤Î³Ý¤±¶â:     %9ld", (long int)wager);
 #else
-                       sprintf(tmp_str, "Current Wager:    %9ld", wager);
+                       sprintf(tmp_str, "Current Wager:    %9ld", (long int)wager);
 #endif
 
                        prt(tmp_str, 21, 2);
@@ -1606,9 +1613,9 @@ prt("
                                        prt("", 17, 37);
                                }
 #ifdef JP
-sprintf(tmp_str, "¸½ºß¤Î½ê»ý¶â:     %9ld", p_ptr->au);
+sprintf(tmp_str, "¸½ºß¤Î½ê»ý¶â:     %9ld", (long int)p_ptr->au);
 #else
-                               sprintf(tmp_str, "Current Gold:     %9ld", p_ptr->au);
+                               sprintf(tmp_str, "Current Gold:     %9ld", (long int)p_ptr->au);
 #endif
 
                                prt(tmp_str, 22, 2);
@@ -1960,9 +1967,9 @@ static bool kakutoujou(void)
                        monster_race *r_ptr = &r_info[battle_mon[i]];
 
 #ifdef JP
-                       sprintf(buf,"%d) %-58s  %4ld.%02ldÇÜ", i+1, format("%s%s",r_name + r_ptr->name, (r_ptr->flags1 & RF1_UNIQUE) ? "¤â¤É¤­" : "      "), mon_odds[i]/100, mon_odds[i]%100);
+                       sprintf(buf,"%d) %-58s  %4ld.%02ldÇÜ", i+1, format("%s%s",r_name + r_ptr->name, (r_ptr->flags1 & RF1_UNIQUE) ? "¤â¤É¤­" : "      "), (long int)mon_odds[i]/100, (long int)mon_odds[i]%100);
 #else
-                       sprintf(buf,"%d) %-58s  %4ld.%02ld", i+1, format("%s%s", (r_ptr->flags1 & RF1_UNIQUE) ? "Fake " : "", r_name + r_ptr->name), mon_odds[i]/100, mon_odds[i]%100);
+                       sprintf(buf,"%d) %-58s  %4ld.%02ld", i+1, format("%s%s", (r_ptr->flags1 & RF1_UNIQUE) ? "Fake " : "", r_name + r_ptr->name), (long int)mon_odds[i]/100, (long int)mon_odds[i]%100);
 #endif
                        prt(buf, 5+i, 1);
                }
@@ -2002,9 +2009,9 @@ static bool kakutoujou(void)
                /* Get the wager */
                strcpy(out_val, "");
 #ifdef JP
-sprintf(tmp_str,"ÅÒ¤±¶â (1-%ld)¡©", maxbet);
+sprintf(tmp_str,"ÅÒ¤±¶â (1-%ld)¡©", (long int)maxbet);
 #else
-               sprintf(tmp_str,"Your wager (1-%ld) ? ", maxbet);
+               sprintf(tmp_str,"Your wager (1-%ld) ? ", (long int)maxbet);
 #endif
 
 
@@ -2035,9 +2042,9 @@ msg_print("
                        else if (wager > maxbet)
                        {
 #ifdef JP
-msg_format("%ld¥´¡¼¥ë¥É¤À¤±¼õ¤±¤è¤¦¡£»Ä¤ê¤Ï¼è¤Ã¤È¤­¤Ê¡£", maxbet);
+msg_format("%ld¥´¡¼¥ë¥É¤À¤±¼õ¤±¤è¤¦¡£»Ä¤ê¤Ï¼è¤Ã¤È¤­¤Ê¡£", (long int)maxbet);
 #else
-                               msg_format("I'll take %ld gold of that. Keep the rest.", maxbet);
+                               msg_format("I'll take %ld gold of that. Keep the rest.",(long int) maxbet);
 #endif
 
                                wager = maxbet;
@@ -2229,7 +2236,7 @@ static bool kankin(void)
                if ((o_ptr->tval == TV_CAPTURE) && (o_ptr->pval == MON_TSUCHINOKO))
                {
                        char buf[MAX_NLEN+20];
-                       object_desc(o_name, o_ptr, TRUE, 3);
+                       object_desc(o_name, o_ptr, 0);
 #ifdef JP
                        sprintf(buf, "%s ¤ò´¹¶â¤·¤Þ¤¹¤«¡©",o_name);
 #else
@@ -2238,9 +2245,9 @@ static bool kankin(void)
                        if (get_check(buf))
                        {
 #ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", 1000000L * o_ptr->number);
+                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (long int)(1000000L * o_ptr->number));
 #else
-                               msg_format("You get %ldgp.", 1000000L * o_ptr->number);
+                               msg_format("You get %ldgp.", (long int)(1000000L * o_ptr->number));
 #endif
                                p_ptr->au += 1000000L * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
@@ -2260,7 +2267,7 @@ static bool kankin(void)
                if ((o_ptr->tval == TV_CORPSE) && (o_ptr->sval == SV_CORPSE) && (o_ptr->pval == MON_TSUCHINOKO))
                {
                        char buf[MAX_NLEN+20];
-                       object_desc(o_name, o_ptr, TRUE, 3);
+                       object_desc(o_name, o_ptr, 0);
 #ifdef JP
                        sprintf(buf, "%s ¤ò´¹¶â¤·¤Þ¤¹¤«¡©",o_name);
 #else
@@ -2269,9 +2276,9 @@ static bool kankin(void)
                        if (get_check(buf))
                        {
 #ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", 200000L * o_ptr->number);
+                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (long int)(200000L * o_ptr->number));
 #else
-                               msg_format("You get %ldgp.", 200000L * o_ptr->number);
+                               msg_format("You get %ldgp.", (long int)(200000L * o_ptr->number));
 #endif
                                p_ptr->au += 200000L * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
@@ -2291,7 +2298,7 @@ static bool kankin(void)
                if ((o_ptr->tval == TV_CORPSE) && (o_ptr->sval == SV_SKELETON) && (o_ptr->pval == MON_TSUCHINOKO))
                {
                        char buf[MAX_NLEN+20];
-                       object_desc(o_name, o_ptr, TRUE, 3);
+                       object_desc(o_name, o_ptr, 0);
 #ifdef JP
                        sprintf(buf, "%s ¤ò´¹¶â¤·¤Þ¤¹¤«¡©",o_name);
 #else
@@ -2300,9 +2307,9 @@ static bool kankin(void)
                        if (get_check(buf))
                        {
 #ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", 100000L * o_ptr->number);
+                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (long int)(100000L * o_ptr->number));
 #else
-                               msg_format("You get %ldgp.", 100000L * o_ptr->number);
+                               msg_format("You get %ldgp.", (long int)(100000L * o_ptr->number));
 #endif
                                p_ptr->au += 100000L * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
@@ -2320,7 +2327,7 @@ static bool kankin(void)
                if ((o_ptr->tval == TV_CORPSE) && (o_ptr->sval == SV_CORPSE) && (streq(r_name + r_info[o_ptr->pval].name, r_name + r_info[today_mon].name)))
                {
                        char buf[MAX_NLEN+20];
-                       object_desc(o_name, o_ptr, TRUE, 3);
+                       object_desc(o_name, o_ptr, 0);
 #ifdef JP
                        sprintf(buf, "%s ¤ò´¹¶â¤·¤Þ¤¹¤«¡©",o_name);
 #else
@@ -2329,9 +2336,9 @@ static bool kankin(void)
                        if (get_check(buf))
                        {
 #ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (r_info[today_mon].level * 50 + 100) * o_ptr->number);
+                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (long int)((r_info[today_mon].level * 50 + 100) * o_ptr->number));
 #else
-                               msg_format("You get %ldgp.", (r_info[today_mon].level * 50 + 100) * o_ptr->number);
+                               msg_format("You get %ldgp.", (long int)((r_info[today_mon].level * 50 + 100) * o_ptr->number));
 #endif
                                p_ptr->au += (r_info[today_mon].level * 50 + 100) * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
@@ -2350,7 +2357,7 @@ static bool kankin(void)
                if ((o_ptr->tval == TV_CORPSE) && (o_ptr->sval == SV_SKELETON) && (streq(r_name + r_info[o_ptr->pval].name, r_name + r_info[today_mon].name)))
                {
                        char buf[MAX_NLEN+20];
-                       object_desc(o_name, o_ptr, TRUE, 3);
+                       object_desc(o_name, o_ptr, 0);
 #ifdef JP
                        sprintf(buf, "%s ¤ò´¹¶â¤·¤Þ¤¹¤«¡©",o_name);
 #else
@@ -2359,9 +2366,9 @@ static bool kankin(void)
                        if (get_check(buf))
                        {
 #ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (r_info[today_mon].level * 30 + 60) * o_ptr->number);
+                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (long int)((r_info[today_mon].level * 30 + 60) * o_ptr->number));
 #else
-                               msg_format("You get %ldgp.", (r_info[today_mon].level * 30 + 60) * o_ptr->number);
+                               msg_format("You get %ldgp.", (long int)((r_info[today_mon].level * 30 + 60) * o_ptr->number));
 #endif
                                p_ptr->au += (r_info[today_mon].level * 30 + 60) * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
@@ -2382,10 +2389,10 @@ static bool kankin(void)
                        if ((o_ptr->tval == TV_CORPSE) && (o_ptr->pval == kubi_r_idx[j]))
                        {
                                char buf[MAX_NLEN+20];
-                               int num, k;
+                               int num, k, item_new;
                                object_type forge;
 
-                               object_desc(o_name, o_ptr, TRUE, 3);
+                               object_desc(o_name, o_ptr, 0);
 #ifdef JP
                                sprintf(buf, "%s¤òÅϤ·¤Þ¤¹¤«¡©",o_name);
 #else
@@ -2393,7 +2400,7 @@ static bool kankin(void)
 #endif
                                if (!get_check(buf)) continue;
 
-#if 0 /* Obsorated */
+#if 0 /* Obsoleted */
 #ifdef JP
                                msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (r_info[kubi_r_idx[j]].level + 1) * 300 * o_ptr->number);
 #else
@@ -2408,7 +2415,7 @@ static bool kankin(void)
                                kubi_r_idx[j] += 10000;
 
                                change = TRUE;
-#endif /* Obsorated */
+#endif /* Obsoleted */
 
                                /* Hand it first */
                                inven_item_increase(i, -o_ptr->number);
@@ -2443,16 +2450,22 @@ static bool kankin(void)
                                 * Since a corpse is handed at first,
                                 * there is at least one empty slot.
                                 */
-                               (void)inven_carry(&forge);
+                               item_new = inven_carry(&forge);
 
                                /* Describe the object */
-                               object_desc(o_name, &forge, TRUE, 3);
+                               object_desc(o_name, &forge, 0);
 #ifdef JP
-                               msg_format("%s ¤òÌã¤Ã¤¿¡£",o_name);
+                               msg_format("%s(%c)¤òÌã¤Ã¤¿¡£", o_name, index_to_label(item_new));
 #else
-                               msg_format("You get %s. ",o_name);
+                               msg_format("You get %s (%c). ", o_name, index_to_label(item_new));
 #endif
 
+                               /* Auto-inscription */
+                               autopick_alter_item(item_new, FALSE);
+
+                               /* Handle stuff */
+                               handle_stuff();
+
                                change = TRUE;
                        }
                }
@@ -2814,7 +2827,7 @@ msg_print("
                        }
                        else
                        {
-                               int oldturn = turn;
+                               s32b oldturn = turn;
                                int prev_day, prev_hour, prev_min;
 
                                extract_day_hour_min(&prev_day, &prev_hour, &prev_min);
@@ -2825,11 +2838,17 @@ msg_print("
                                else do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "stay over night at the inn.");
 #endif
                                turn = (turn / (TURNS_PER_TICK*TOWN_DAWN/2) + 1) * (TURNS_PER_TICK*TOWN_DAWN/2);
+                               if (dungeon_turn < dungeon_turn_limit)
+                               {
+                                       dungeon_turn += MIN(turn - oldturn, TURNS_PER_TICK * 250);
+                                       if (dungeon_turn > dungeon_turn_limit) dungeon_turn = dungeon_turn_limit;
+                               }
+
+                               prevent_turn_overflow();
+
                                if ((prev_hour >= 18) && (prev_hour <= 23)) do_cmd_write_nikki(NIKKI_HIGAWARI, 0, NULL);
                                p_ptr->chp = p_ptr->mhp;
 
-                               dungeon_turn += MIN(turn - oldturn, TURNS_PER_TICK*250);
-
                                if (ironman_nightmare)
                                {
 #ifdef JP
@@ -2906,15 +2925,7 @@ msg_print("
 
                case BACT_RUMORS: /* Listen for rumors */
                        {
-                               char Rumor[1024];
-
-#ifdef JP
-                               if (!get_rnd_line_jonly("rumors_j.txt", 0, Rumor, 10))
-#else
-                               if (!get_rnd_line("rumors.txt", 0, Rumor))
-#endif
-
-                                       msg_format("%s", Rumor);
+                               display_rumor(TRUE);
                                break;
                        }
        }
@@ -2924,25 +2935,9 @@ msg_print("
 
 
 /*
- * Share gold for thieves
- */
-static void share_gold(void)
-{
-       int i = (p_ptr->lev * 2) * 10;
-#ifdef JP
-msg_format("¡ð%d ¤ò¼ê¤ËÆþ¤ì¤¿¡£", i);
-#else
-       msg_format("You collect %d gold pieces", i);
-#endif
-
-       p_ptr->au += i;
-}
-
-
-/*
  * Display quest information
  */
-static void get_questinfo(int questnum)
+static void get_questinfo(int questnum, bool do_init)
 {
        int     i;
        int     old_quest;
@@ -2962,7 +2957,8 @@ static void get_questinfo(int questnum)
        p_ptr->inside_quest = questnum;
 
        /* Get the quest text */
-       init_flags = INIT_SHOW_TEXT | INIT_ASSIGN;
+       init_flags = INIT_SHOW_TEXT;
+       if (do_init) init_flags |= INIT_ASSIGN;
 
        process_dungeon_file("q_info.txt", 0, 0, 0, 0);
 
@@ -3023,14 +3019,14 @@ put_str("
                /* Rewarded quest */
                q_ptr->status = QUEST_STATUS_REWARDED;
 
-               get_questinfo(q_index);
+               get_questinfo(q_index, FALSE);
 
                reinit_wilderness = TRUE;
        }
        /* Failed quest */
        else if (q_ptr->status == QUEST_STATUS_FAILED)
        {
-               get_questinfo(q_index);
+               get_questinfo(q_index, FALSE);
 
                /* Mark quest as done (but failed) */
                q_ptr->status = QUEST_STATUS_FAILED_DONE;
@@ -3103,7 +3099,7 @@ msg_format("
                }
                else
                {
-                       get_questinfo(q_index);
+                       get_questinfo(q_index, TRUE);
                }
        }
 }
@@ -3130,6 +3126,60 @@ static void town_history(void)
 }
 
 
+static s16b calc_expext_cirt(int weight, int plus, int dam, s16b meichuu, bool dokubari)
+{
+       long i,k, num;
+       
+       if(dokubari) return dam;
+       
+       i = weight + (meichuu * 3 + plus * 5) + (p_ptr->lev * 3);
+       k = weight;
+       num=0;
+       
+       if (k < 400)                                            num += (2 * dam + 5) * (400 - k);
+       if (k < 700)                                            num += (2 * dam + 10) * (MIN(700, k+650) - MAX(400, k));
+       if (k > (700-650) && k < 900)           num += (3 * dam + 15) * (MIN(900, k+650) - MAX(700, k));
+       if (k > (900-650) && k < 1300)          num += (3 * dam + 20) * (MIN(1300, k+650) - MAX(900, k));
+       if (k > (1300-650))                                     num += (7 * dam / 2 + 25) * MIN(650, k-(1300-650));
+       
+       if(p_ptr->pclass == CLASS_NINJA)
+       {
+               num *= i;
+               num += (4444 - i) * dam * 650;
+               num /= 4444;
+       }
+       else
+       {
+               num *= i;
+               num += (5000 - i) * dam * 650;
+               num /= 5000;
+       }
+       num /= 650;
+       
+       return num;
+}
+
+static s16b calc_slaydam(int dam, int mult, int div, bool force)
+{
+       int tmp;
+       if(force)
+       {
+               tmp = dam * 60;
+               tmp *= mult * 3;
+               tmp /= div * 2;
+               tmp += dam * 60 * 2;
+               tmp /= 60;
+       }
+       else
+       {
+               tmp = dam * 60;
+               tmp *= mult; 
+               tmp /= div;
+               tmp /= 60;
+       }
+       return tmp;
+}
+
 /*
  * Display the damage figure of an object
  * (used by compare_weapon_aux1)
@@ -3137,29 +3187,22 @@ static void town_history(void)
  * Only accurate for the current weapon, because it includes
  * the current +dam of the player.
  */
-static void compare_weapon_aux2(object_type *o_ptr, int numblows,
-                               int r, int c, int mult, cptr attr,
-                               byte color)
+static void compare_weapon_aux2(int r, int c, int mindam, int maxdam, cptr attr, byte color)
 {
        char tmp_str[80];
 
-       /* Effective dices */
-       int eff_dd = o_ptr->dd + p_ptr->to_dd[0];
-       int eff_ds = o_ptr->ds + p_ptr->to_ds[0];
 
        /* Print the intro text */
        c_put_str(color, attr, r, c);
 
        /* Calculate the min and max damage figures */
 #ifdef JP
-sprintf(tmp_str, "£±¥¿¡¼¥ó: %d-%d ¥À¥á¡¼¥¸",
+       sprintf(tmp_str, "£±¥¿¡¼¥ó: %d-%d ¥À¥á¡¼¥¸",
 #else
        sprintf(tmp_str, "Attack: %d-%d damage",
 #endif
-
-           (numblows * (mult * eff_dd / 60 + o_ptr->to_d + p_ptr->to_d[0])),
-           (numblows * (mult * eff_ds * eff_dd / 60 + o_ptr->to_d + p_ptr->to_d[0])));
-
+                       mindam, maxdam);
+       
        /* Print the damage */
        put_str(tmp_str, r, c + 8);
 }
@@ -3176,70 +3219,554 @@ static void compare_weapon_aux1(object_type *o_ptr, int col, int r)
        int mult = 60;
        u32b flgs[TR_FLAG_SIZE];
        int blow = p_ptr->num_blow[0];
-       bool print_force_weapon = FALSE;
+       bool force = FALSE;
+       bool dokubari = FALSE;
+       
+       /* Effective dices */
+       int eff_dd = o_ptr->dd + p_ptr->to_dd[0];
+       int eff_ds = o_ptr->ds + p_ptr->to_ds[0];
+       
+       int mindice = eff_dd;
+       int maxdice = eff_ds * eff_dd;
+       int mindam = 0;
+       int maxdam = 0;
+       int slaydice_min = 0;
+       int slaydice_max = 0;
+       int critdice_min = 0;
+       int critdice_max = 0;
+       int vorpal_mult = 1;
+       int vorpal_div = 1;
+       
 
        /* Get the flags of the weapon */
        object_flags(o_ptr, flgs);
-
+       
+       if((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI)) dokubari = TRUE;
+       
+       
+       /* Show Critical Damage*/
+       critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, mindice, p_ptr->to_h[0], dokubari);
+       critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, maxdice, p_ptr->to_h[0], dokubari);
+       
+       mindam = blow * (critdice_min+ o_ptr->to_d + p_ptr->to_d[0]);
+       maxdam = blow * (critdice_max+ o_ptr->to_d + p_ptr->to_d[0]);
+       
+#ifdef JP
+       compare_weapon_aux2(r++, col, mindam, maxdam, "²ñ¿´:", TERM_L_RED);
+#else
+       compare_weapon_aux2(r++, col, mindam, maxdam, "Critical:", TERM_L_RED);
+#endif
+       
+       /* Vorpal Hit*/
+       if ((have_flag(flgs, TR_VORPAL) || hex_spelling(HEX_RUNESWORD)))
+       {
+               if((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
+               {
+                       vorpal_mult = 5;
+                       vorpal_div = 3;
+               }
+               else
+               {
+                       vorpal_mult = 11;
+                       vorpal_div = 9;
+               }
+               
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, mindice, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, maxdice, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               
+               #ifdef JP
+                       compare_weapon_aux2(r++, col, mindam, maxdam, "ÀÚ¤ìÌ£:", TERM_L_RED);
+               #else
+                       compare_weapon_aux2(r++, col, mindam, maxdam, "Vorpal:", TERM_L_RED);
+               #endif
+       }       
+       
        if ((p_ptr->pclass != CLASS_SAMURAI) && have_flag(flgs, TR_FORCE_WEAPON) && (p_ptr->csp > (o_ptr->dd * o_ptr->ds / 5)))
        {
-               mult = mult * 7 / 2;
-               print_force_weapon = TRUE;
+               force = TRUE;
+               
+               slaydice_min = calc_slaydam(mindice, 1, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 1, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               
+               /* Print the relevant lines */
+#ifdef JP
+               compare_weapon_aux2(r++, col, mindam, maxdam, "ÍýÎÏ:", TERM_L_BLUE);
+#else
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Force  :", TERM_L_BLUE);
+#endif         
        }
-
+               
        /* Print the relevant lines */
 #ifdef JP
-       if (print_force_weapon)     compare_weapon_aux2(o_ptr, blow, r++, col, 1*mult, "ÍýÎÏ:", TERM_L_BLUE);
-       if (have_flag(flgs, TR_KILL_ANIMAL)) compare_weapon_aux2(o_ptr, blow, r++, col, 4*mult, "ưʪ:", TERM_YELLOW);
-        else if (have_flag(flgs, TR_SLAY_ANIMAL)) compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "ưʪ:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_EVIL))   compare_weapon_aux2(o_ptr, blow, r++, col, 7*mult/2, "¼Ù°­:", TERM_YELLOW);
-        else if (have_flag(flgs, TR_SLAY_EVIL))   compare_weapon_aux2(o_ptr, blow, r++, col, 2*mult, "¼Ù°­:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_HUMAN))   compare_weapon_aux2(o_ptr, blow, r++, col, 4*mult, "¿Í´Ö:", TERM_YELLOW);
-        else if (have_flag(flgs, TR_SLAY_HUMAN))   compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "¿Í´Ö:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_UNDEAD)) compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "ÉÔ»à:", TERM_YELLOW);
-        else if (have_flag(flgs, TR_SLAY_UNDEAD)) compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "ÉÔ»à:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_DEMON))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "°­Ëâ:", TERM_YELLOW);
-        else if (have_flag(flgs, TR_SLAY_DEMON))  compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "°­Ëâ:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_ORC))    compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "¥ª¡¼¥¯:", TERM_YELLOW);
-        else if (have_flag(flgs, TR_SLAY_ORC))    compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "¥ª¡¼¥¯:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_TROLL))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "¥È¥í¥ë:", TERM_YELLOW);
-        else if (have_flag(flgs, TR_SLAY_TROLL))  compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "¥È¥í¥ë:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_GIANT))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "µð¿Í:", TERM_YELLOW);
-        else if (have_flag(flgs, TR_SLAY_GIANT))  compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "µð¿Í:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_DRAGON)) compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "ε:", TERM_YELLOW);
-       else if (have_flag(flgs, TR_SLAY_DRAGON)) compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "ε:", TERM_YELLOW);
-       if (have_flag(flgs, TR_BRAND_ACID))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "»À°À­:", TERM_RED);
-       if (have_flag(flgs, TR_BRAND_ELEC))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "ÅÅ°À­:", TERM_RED);
-       if (have_flag(flgs, TR_BRAND_FIRE))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "±ê°À­:", TERM_RED);
-       if (have_flag(flgs, TR_BRAND_COLD))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "Îä°À­:", TERM_RED);
-       if (have_flag(flgs, TR_BRAND_POIS))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "ÆÇ°À­:", TERM_RED);
-#else
-       if (print_force_weapon)     compare_weapon_aux2(o_ptr, blow, r++, col, 1*mult, "Force  :", TERM_L_BLUE);
-       if (have_flag(flgs, TR_KILL_ANIMAL)) compare_weapon_aux2(o_ptr, blow, r++, col, 4*mult, "Animals:", TERM_YELLOW);
-       else if (have_flag(flgs, TR_SLAY_ANIMAL)) compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "Animals:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_EVIL))   compare_weapon_aux2(o_ptr, blow, r++, col, 7*mult/2, "Evil:", TERM_YELLOW);
-       else if (have_flag(flgs, TR_SLAY_EVIL))   compare_weapon_aux2(o_ptr, blow, r++, col, 2*mult, "Evil:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_HUMAN))   compare_weapon_aux2(o_ptr, blow, r++, col, 4*mult, "Human:", TERM_YELLOW);
-       else if (have_flag(flgs, TR_SLAY_HUMAN))   compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "Human:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_UNDEAD)) compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "Undead:", TERM_YELLOW);
-       else if (have_flag(flgs, TR_SLAY_UNDEAD)) compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "Undead:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_DEMON))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "Demons:", TERM_YELLOW);
-       else if (have_flag(flgs, TR_SLAY_DEMON))  compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "Demons:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_ORC))    compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "Orcs:", TERM_YELLOW);
-       else if (have_flag(flgs, TR_SLAY_ORC))    compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "Orcs:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_TROLL))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "Trolls:", TERM_YELLOW);
-       else if (have_flag(flgs, TR_SLAY_TROLL))  compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "Trolls:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_GIANT))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "Giants:", TERM_YELLOW);
-       else if (have_flag(flgs, TR_SLAY_GIANT))  compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "Giants:", TERM_YELLOW);
-       if (have_flag(flgs, TR_KILL_DRAGON)) compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult, "Dragons:", TERM_YELLOW);
-       else if (have_flag(flgs, TR_SLAY_DRAGON)) compare_weapon_aux2(o_ptr, blow, r++, col, 3*mult, "Dragons:", TERM_YELLOW);
-       if (have_flag(flgs, TR_BRAND_ACID))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "Acid:", TERM_RED);
-       if (have_flag(flgs, TR_BRAND_ELEC))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "Elec:", TERM_RED);
-       if (have_flag(flgs, TR_BRAND_FIRE))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "Fire:", TERM_RED);
-       if (have_flag(flgs, TR_BRAND_COLD))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "Cold:", TERM_RED);
-       if (have_flag(flgs, TR_BRAND_POIS))  compare_weapon_aux2(o_ptr, blow, r++, col, 5*mult/2, "Poison:", TERM_RED);
+       if (have_flag(flgs, TR_KILL_ANIMAL))
+       {
+               slaydice_min = calc_slaydam(mindice, 4, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 4, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "ưʪ:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_ANIMAL)) 
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "ưʪ:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_EVIL))
+       {       
+               slaydice_min = calc_slaydam(mindice, 7, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 7, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "¼Ù°­:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_EVIL))
+       {       
+               slaydice_min = calc_slaydam(mindice, 2, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 2, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "¼Ù°­:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_HUMAN))
+       {       
+               slaydice_min = calc_slaydam(mindice, 4, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 4, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "¿Í´Ö:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_HUMAN))
+       {       
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "¿Í´Ö:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_UNDEAD))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "ÉÔ»à:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_UNDEAD)) 
+       {
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "ÉÔ»à:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_DEMON))
+       {       
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "°­Ëâ:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_DEMON))
+       {       
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "°­Ëâ:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_ORC))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "¥ª¡¼¥¯:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_ORC))
+       {
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "¥ª¡¼¥¯:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_TROLL))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "¥È¥í¥ë:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_TROLL))
+       {
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "¥È¥í¥ë:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_GIANT))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "µð¿Í:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_GIANT))
+       {
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "µð¿Í:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_DRAGON))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "ε:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_DRAGON))
+       {
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "ε:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_BRAND_ACID))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "»À°À­:", TERM_RED);
+       }
+       if (have_flag(flgs, TR_BRAND_ELEC))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "ÅÅ°À­:", TERM_RED);
+       }
+       if (have_flag(flgs, TR_BRAND_FIRE))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "±ê°À­:", TERM_RED);
+       }
+       if (have_flag(flgs, TR_BRAND_COLD))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Îä°À­:", TERM_RED);
+       }
+       if (have_flag(flgs, TR_BRAND_POIS))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "ÆÇ°À­:", TERM_RED);
+       }
+#else
+       if (have_flag(flgs, TR_KILL_ANIMAL))
+       {
+               slaydice_min = calc_slaydam(mindice, 4, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 4, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Animals:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_ANIMAL)) 
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Animals:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_EVIL))
+       {       
+               slaydice_min = calc_slaydam(mindice, 7, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 7, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Evil:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_EVIL))
+       {       
+               slaydice_min = calc_slaydam(mindice, 2, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 2, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Evil:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_HUMAN))
+       {       
+               slaydice_min = calc_slaydam(mindice, 4, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 4, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Human:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_HUMAN))
+       {       
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Human:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_UNDEAD))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Undead:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_UNDEAD)) 
+       {
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Undead:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_DEMON))
+       {       
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Demons:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_DEMON))
+       {       
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Demons:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_ORC))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Orcs:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_ORC))
+       {
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Orcs:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_TROLL))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Trolls:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_TROLL))
+       {
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Trolls:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_GIANT))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Giants:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_GIANT))
+       {
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Giants:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_KILL_DRAGON))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Dragons:", TERM_YELLOW);
+       }
+       else if (have_flag(flgs, TR_SLAY_DRAGON))
+       {
+               slaydice_min = calc_slaydam(mindice, 3, 1, force);
+               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Dragons:", TERM_YELLOW);
+       }
+       if (have_flag(flgs, TR_BRAND_ACID))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Acid:", TERM_RED);
+       }
+       if (have_flag(flgs, TR_BRAND_ELEC))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Elec:", TERM_RED);
+       }
+       if (have_flag(flgs, TR_BRAND_FIRE))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Fire:", TERM_RED);
+       }
+       if (have_flag(flgs, TR_BRAND_COLD))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Cold:", TERM_RED);
+       }
+       if (have_flag(flgs, TR_BRAND_POIS))
+       {
+               slaydice_min = calc_slaydam(mindice, 5, 2, force);
+               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
+               critdice_min = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+               critdice_max = calc_expext_cirt(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
+               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
+               compare_weapon_aux2(r++, col, mindam, maxdam, "Poison:", TERM_RED);
+       }
 #endif
-
+       
 }
 
 static int hit_chance(int to_h, int ac)
@@ -3274,7 +3801,7 @@ static void list_weapon(object_type *o_ptr, int row, int col)
        int eff_ds = o_ptr->ds + p_ptr->to_ds[0];
 
        /* Print the weapon name */
-       object_desc(o_name, o_ptr, TRUE, 0);
+       object_desc(o_name, o_ptr, OD_NAME_ONLY);
        c_put_str(TERM_YELLOW, o_name, row, col);
 
        /* Print the player's number of blows */
@@ -3628,11 +4155,10 @@ static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
        int         maxenchant = (p_ptr->lev / 5);
        char        tmp_str[MAX_NLEN];
 
-
        clear_bldg(4, 18);
 #ifdef JP
-prt(format("¸½ºß¤Î¤¢¤Ê¤¿¤Îµ»Î̤À¤È¡¢+%d ¤Þ¤Ç²þÎɤǤ­¤Þ¤¹¡£", maxenchant), 5, 0);
-prt(format(" ²þÎɤÎÎÁ¶â¤Ï°ì¸Ä¤Ë¤Ä¤­¡ð%d ¤Ç¤¹¡£", cost), 7, 0);
+       prt(format("¸½ºß¤Î¤¢¤Ê¤¿¤Îµ»Î̤À¤È¡¢+%d ¤Þ¤Ç²þÎɤǤ­¤Þ¤¹¡£", maxenchant), 5, 0);
+       prt(format(" ²þÎɤÎÎÁ¶â¤Ï°ì¸Ä¤Ë¤Ä¤­¡ð%d ¤Ç¤¹¡£", cost), 7, 0);
 #else
        prt(format("  Based on your skill, we can improve up to +%d.", maxenchant), 5, 0);
        prt(format("  The price for the service is %d gold per item.", cost), 7, 0);
@@ -3642,8 +4168,8 @@ prt(format(" 
 
        /* Get an item */
 #ifdef JP
-q = "¤É¤Î¥¢¥¤¥Æ¥à¤ò²þÎɤ·¤Þ¤¹¤«¡©";
-s = "²þÎɤǤ­¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£";
+       q = "¤É¤Î¥¢¥¤¥Æ¥à¤ò²þÎɤ·¤Þ¤¹¤«¡©";
+       s = "²þÎɤǤ­¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£";
 #else
        q = "Improve which item? ";
        s = "You have nothing to improve.";
@@ -3657,9 +4183,9 @@ s = "
        /* Check if the player has enough money */
        if (p_ptr->au < (cost * o_ptr->number))
        {
-               object_desc(tmp_str, o_ptr, TRUE, 0);
+               object_desc(tmp_str, o_ptr, OD_NAME_ONLY);
 #ifdef JP
-msg_format("%s¤ò²þÎɤ¹¤ë¤À¤±¤Î¥´¡¼¥ë¥É¤¬¤¢¤ê¤Þ¤»¤ó¡ª", tmp_str);
+               msg_format("%s¤ò²þÎɤ¹¤ë¤À¤±¤Î¥´¡¼¥ë¥É¤¬¤¢¤ê¤Þ¤»¤ó¡ª", tmp_str);
 #else
                msg_format("You do not have the gold to improve %s!", tmp_str);
 #endif
@@ -3714,21 +4240,20 @@ msg_format("%s
 
                /* Message */
 #ifdef JP
-msg_print("²þÎɤ˼ºÇÔ¤·¤¿¡£");
+               msg_print("²þÎɤ˼ºÇÔ¤·¤¿¡£");
 #else
                msg_print("The improvement failed.");
 #endif
 
-
                return (FALSE);
        }
        else
        {
-               object_desc(tmp_str, o_ptr, TRUE, 1);
+               object_desc(tmp_str, o_ptr, OD_NAME_AND_ENCHANT);
 #ifdef JP
-msg_format("¡ð%d ¤Ç%s¤ò²þÎɤ·¤Þ¤·¤¿¡£", cost * o_ptr->number, tmp_str );
+               msg_format("¡ð%d¤Ç%s¤Ë²þÎɤ·¤Þ¤·¤¿¡£", cost * o_ptr->number, tmp_str);
 #else
-               msg_format("Improved %s for %d gold.", tmp_str, cost * o_ptr->number);
+               msg_format("Improved into %s for %d gold.", tmp_str, cost * o_ptr->number);
 #endif
 
                /* Charge the money */
@@ -3807,7 +4332,7 @@ s = "
         * the level of the item or the number of charges.
         */
        /* The item must be "known" */
-       if (!object_known_p(o_ptr))
+       if (!object_is_known(o_ptr))
        {
 #ifdef JP
 msg_format("½¼Å¶¤¹¤ëÁ°¤Ë´ÕÄꤵ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡ª");
@@ -3832,7 +4357,7 @@ get_check("
                        identify_item(o_ptr);
 
                        /* Description */
-                       object_desc(tmp_str, o_ptr, TRUE, 3);
+                       object_desc(tmp_str, o_ptr, 0);
 
 #ifdef JP
 msg_format("%s ¤Ç¤¹¡£", tmp_str);
@@ -3841,7 +4366,7 @@ msg_format("%s 
 #endif
 
                        /* Auto-inscription */
-                       auto_inscribe_item(item, is_autopick(o_ptr));
+                       autopick_alter_item(item, FALSE);
 
                        /* Update the gold display */
                        building_prt_gold();
@@ -3853,7 +4378,7 @@ msg_format("%s 
        }
 
        /* Extract the object "level" */
-       lev = get_object_level(o_ptr);
+       lev = k_info[o_ptr->k_idx].level;
 
        /* Price for a rod */
        if (o_ptr->tval == TV_ROD)
@@ -3879,7 +4404,7 @@ msg_format("
        else if (o_ptr->tval == TV_STAFF)
        {
                /* Price per charge ( = double the price paid by shopkeepers for the charge) */
-               price = (get_object_cost(o_ptr) / 10) * o_ptr->number;
+               price = (k_info[o_ptr->k_idx].cost / 10) * o_ptr->number;
 
                /* Pay at least 10 gold per charge */
                price = MAX(10, price);
@@ -3887,7 +4412,7 @@ msg_format("
        else
        {
                /* Price per charge ( = double the price paid by shopkeepers for the charge) */
-               price = (get_object_cost(o_ptr) / 10);
+               price = (k_info[o_ptr->k_idx].cost / 10);
 
                /* Pay at least 10 gold per charge */
                price = MAX(10, price);
@@ -3939,7 +4464,7 @@ msg_print("
        /* Check if the player has enough money */
        if (p_ptr->au < price)
        {
-               object_desc(tmp_str, o_ptr, TRUE, 0);
+               object_desc(tmp_str, o_ptr, OD_NAME_ONLY);
 #ifdef JP
 msg_format("%s¤òºÆ½¼Å¶¤¹¤ë¤Ë¤Ï¡ð%d É¬ÍפǤ¹¡ª", tmp_str,price );
 #else
@@ -3998,7 +4523,7 @@ charges = get_quantity(format("
        }
 
        /* Give feedback */
-       object_desc(tmp_str, o_ptr, TRUE, 3);
+       object_desc(tmp_str, o_ptr, 0);
 #ifdef JP
 msg_format("%s¤ò¡ð%d ¤ÇºÆ½¼Å¶¤·¤Þ¤·¤¿¡£", tmp_str, price);
 #else
@@ -4057,10 +4582,10 @@ static void building_recharge_all(void)
                if (o_ptr->tval < TV_STAFF || o_ptr->tval > TV_ROD) continue;
 
                /* need identified */
-               if (!object_known_p(o_ptr)) total_cost += 50;
+               if (!object_is_known(o_ptr)) total_cost += 50;
 
                /* Extract the object "level" */
-               lev = get_object_level(o_ptr);
+               lev = k_info[o_ptr->k_idx].level;
 
                k_ptr = &k_info[o_ptr->k_idx];
 
@@ -4072,7 +4597,7 @@ static void building_recharge_all(void)
 
                case TV_STAFF:
                        /* Price per charge ( = double the price paid by shopkeepers for the charge) */
-                       price = (get_object_cost(o_ptr) / 10) * o_ptr->number;
+                       price = (k_info[o_ptr->k_idx].cost / 10) * o_ptr->number;
 
                        /* Pay at least 10 gold per charge */
                        price = MAX(10, price);
@@ -4083,7 +4608,7 @@ static void building_recharge_all(void)
 
                case TV_WAND:
                        /* Price per charge ( = double the price paid by shopkeepers for the charge) */
-                       price = (get_object_cost(o_ptr) / 10);
+                       price = (k_info[o_ptr->k_idx].cost / 10);
 
                        /* Pay at least 10 gold per charge */
                        price = MAX(10, price);
@@ -4137,12 +4662,12 @@ static void building_recharge_all(void)
                if (o_ptr->tval < TV_STAFF || o_ptr->tval > TV_ROD) continue;
 
                /* Identify it */
-               if (!object_known_p(o_ptr))
+               if (!object_is_known(o_ptr))
                {
                        identify_item(o_ptr);
 
                        /* Auto-inscription */
-                       auto_inscribe_item(i, is_autopick(o_ptr));
+                       autopick_alter_item(i, FALSE);
                }
 
                /* Recharge */
@@ -4444,9 +4969,9 @@ sprintf(buf, "%c - %s", sym, "̵
                                if (isupper(temp2[xx])) temp2[xx] = tolower(temp2[xx]);
 
 #ifdef JP
-                       if (strstr(temp2, temp) || strstr_j(r_name + r_ptr->name, temp))
+                       if (my_strstr(temp2, temp) || my_strstr(r_name + r_ptr->name, temp))
 #else
-                       if (strstr(temp2, temp))
+                       if (my_strstr(temp2, temp))
 #endif
                                who[n++] = i;
                }
@@ -4670,11 +5195,11 @@ msg_print("
                paid = compare_weapons();
                break;
        case BACT_ENCHANT_WEAPON:
-               item_tester_hook = item_tester_hook_melee_weapon;
+               item_tester_hook = object_allow_enchant_melee_weapon;
                enchant_item(bcost, 1, 1, 0);
                break;
        case BACT_ENCHANT_ARMOR:
-               item_tester_hook = item_tester_hook_armour;
+               item_tester_hook = object_is_armour;
                enchant_item(bcost, 0, 0, 1);
                break;
        case BACT_RECHARGE:
@@ -4719,21 +5244,6 @@ msg_print("
                if (do_res_stat(A_CON)) paid = TRUE;
                if (do_res_stat(A_CHR)) paid = TRUE;
                break;
-       case BACT_GOLD: /* set timed reward flag */
-               if (!p_ptr->rewards[BACT_GOLD])
-               {
-                       share_gold();
-                       p_ptr->rewards[BACT_GOLD] = TRUE;
-               }
-               else
-               {
-#ifdef JP
-                       msg_print("º£Æü¤Îʬ¤±Á°¤Ï¤¹¤Ç¤Ë»Ùʧ¤Ã¤¿¤¾¡ª");
-#else
-                       msg_print("You just had your daily allowance!");
-#endif
-               }
-               break;
        case BACT_ENCHANT_ARROWS:
                item_tester_hook = item_tester_hook_ammo;
                enchant_item(bcost, 1, 1, 0);
@@ -4779,7 +5289,7 @@ msg_print("
                        p_ptr->word_recall = 1;
                        p_ptr->recall_dungeon = select_dungeon;
                        max_dlv[p_ptr->recall_dungeon] = ((amt > d_info[select_dungeon].maxdepth) ? d_info[select_dungeon].maxdepth : ((amt < d_info[select_dungeon].mindepth) ? d_info[select_dungeon].mindepth : amt));
-                       if (record_maxdeapth)
+                       if (record_maxdepth)
 #ifdef JP
                                do_cmd_write_nikki(NIKKI_TRUMP, select_dungeon, "¥È¥é¥ó¥×¥¿¥ï¡¼¤Ç");
 #else
@@ -4879,7 +5389,7 @@ void do_cmd_quest(void)
 {
        energy_use = 100;
 
-       if (cave[py][px].feat != FEAT_QUEST_ENTER)
+       if (!cave_have_flag_bold(py, px, FF_QUEST_ENTER))
        {
 #ifdef JP
 msg_print("¤³¤³¤Ë¤Ï¥¯¥¨¥¹¥È¤ÎÆþ¸ý¤Ï¤Ê¤¤¡£");
@@ -4928,11 +5438,10 @@ void do_cmd_bldg(void)
 
        energy_use = 100;
 
-       if (!((cave[py][px].feat >= FEAT_BLDG_HEAD) &&
-                 (cave[py][px].feat <= FEAT_BLDG_TAIL)))
+       if (!cave_have_flag_bold(py, px, FF_BLDG))
        {
 #ifdef JP
-msg_print("¤³¤³¤Ë¤Ï·úʪ¤Ï¤Ê¤¤¡£");
+               msg_print("¤³¤³¤Ë¤Ï·úʪ¤Ï¤Ê¤¤¡£");
 #else
                msg_print("You see no building here.");
 #endif
@@ -4940,7 +5449,7 @@ msg_print("
                return;
        }
 
-       which = (cave[py][px].feat - FEAT_BLDG_HEAD);
+       which = f_info[cave[py][px].feat].subtype;
 
        bldg = &building[which];
 
@@ -4950,35 +5459,36 @@ msg_print("
        if ((which == 2) && (p_ptr->arena_number < 0))
        {
 #ifdef JP
-msg_print("¡ÖÇÔ¼Ô¤ËÍѤϤʤ¤¡£¡×");
+               msg_print("¡ÖÇÔ¼Ô¤ËÍѤϤʤ¤¡£¡×");
 #else
                msg_print("'There's no place here for a LOSER like you!'");
 #endif
                return;
        }
-       else if ((which == 2) && p_ptr->inside_arena && !p_ptr->exit_bldg)
+       else if ((which == 2) && p_ptr->inside_arena)
        {
+               if (!p_ptr->exit_bldg && m_cnt > 0)
+               {
 #ifdef JP
-prt("¥²¡¼¥È¤ÏÊĤޤäƤ¤¤ë¡£¥â¥ó¥¹¥¿¡¼¤¬¤¢¤Ê¤¿¤òÂԤäƤ¤¤ë¡ª",0,0);
+                       prt("¥²¡¼¥È¤ÏÊĤޤäƤ¤¤ë¡£¥â¥ó¥¹¥¿¡¼¤¬¤¢¤Ê¤¿¤òÂԤäƤ¤¤ë¡ª", 0, 0);
 #else
-               prt("The gates are closed.  The monster awaits!", 0, 0);
+                       prt("The gates are closed.  The monster awaits!", 0, 0);
 #endif
+               }
+               else
+               {
+                       /* Don't save the arena as saved floor */
+                       prepare_change_floor_mode(CFM_SAVE_FLOORS | CFM_NO_RETURN);
 
-               return;
-       }
-       else if ((which == 2) && p_ptr->inside_arena)
-       {
-               /* Don't save the arena as saved floor */
-               prepare_change_floor_mode(CFM_SAVE_FLOORS | CFM_NO_RETURN);
-
-               p_ptr->inside_arena = FALSE;
-               p_ptr->leaving = TRUE;
+                       p_ptr->inside_arena = FALSE;
+                       p_ptr->leaving = TRUE;
 
-               /* Re-enter the arena */
-               command_new = SPECIAL_KEY_BUILDING;
+                       /* Re-enter the arena */
+                       command_new = SPECIAL_KEY_BUILDING;
 
-               /* No energy needed to re-enter the arena */
-               energy_use = 0;
+                       /* No energy needed to re-enter the arena */
+                       energy_use = 0;
+               }
 
                return;
        }