{
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
}
{
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
}
{
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
}
{
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
}
{
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
}
#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();
/* 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
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;
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);
- /* Prevent savefile-scumming of the casino */
-/* Rand_quick = TRUE; */
- Rand_value = time(NULL);
-
do
{
-#ifdef JP /* Prevent random seed cracking of the casino */
- clock_t clk;
- clk = clock();
- Rand_value *= clk;
-#endif
p_ptr->au -= wager;
switch (cmd)
{
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);
}
} while ((again == 'y') || (again == 'Y'));
- /* Switch back to complex RNG */
- Rand_quick = FALSE;
-
prt("", 18, 37);
if (p_ptr->au >= oldgold)
{
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);
}
/* 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
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;
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);
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);
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);
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);
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);
}
else
{
- int oldturn = turn;
+ s32b oldturn = turn;
int prev_day, prev_hour, prev_min;
extract_day_hour_min(&prev_day, &prev_hour, &prev_min);
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
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;
}
}
/*
* Display quest information
*/
-static void get_questinfo(int questnum)
+static void get_questinfo(int questnum, bool do_init)
{
int i;
int old_quest;
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);
/* 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;
}
else
{
- get_questinfo(q_index);
+ get_questinfo(q_index, TRUE);
}
}
}
screen_load();
}
+s16b calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow, int dam)
+{
+ u32b num;
+ int i, k, crit;
+
+ /* Extract "shot" power */
+ i = p_ptr->to_h_b * 4 + plus_ammo + (p_ptr->lev * 2);
+
+ /* Snipers can shot more critically with crossbows */
+ if (p_ptr->concent) i += ((i * p_ptr->concent) / 5);
+ if ((p_ptr->pclass == CLASS_SNIPER) && (p_ptr->tval_ammo == TV_BOLT)) i *= 2;
+
+ /* Good bow makes more critical */
+ i += MAX(0, plus_bow - 15) * 4 * (p_ptr->concent ? p_ptr->concent + 5 : 5);
+
+ if (i < 0) i = 0;
+
+ k = 0;
+ num = 0;
+
+ crit = MIN(500, 900/weight);
+ num += dam * 3 /2 * crit;
+ k = crit;
+
+ crit = MIN(500, 1350/weight);
+ crit -= k;
+ num += dam * 2 * crit;
+ k += crit;
+
+ if(k < 500)
+ {
+ crit = 500 - k;
+ num += dam * 3 * crit;
+ }
+
+ num /= 500;
+
+ num *= i;
+ num += (5000 - i) * dam;
+ num /= 5000;
+
+ return num;
+}
+
+s16b calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari)
+{
+ u32b k, num;
+ int i;
+
+ if(dokubari) return dam;
+
+ i = weight + (meichuu * 3 + plus * 5) + (p_ptr->lev * 3);
+ if (i < 0) i = 0;
+
+ 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));
+
+ num /= 650;
+ if(p_ptr->pclass == CLASS_NINJA)
+ {
+ num *= i;
+ num += (4444 - i) * dam;
+ num /= 4444;
+ }
+ else
+ {
+ num *= i;
+ num += (5000 - i) * dam;
+ num /= 5000;
+ }
+
+ 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
* 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);
}
*/
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_expect_crit(o_ptr->weight, o_ptr->to_h, mindice, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, mindice, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
+ critdice_max = calc_expect_crit(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)
* Copies the weapons to compare into the weapon-slot and
* compares the values for both weapons.
*/
-static bool compare_weapons(void)
+static int compare_weapons(int bcost)
{
+ int i, n;
int item, item2;
- object_type *o1_ptr, *o2_ptr;
+ object_type *o_ptr[2];
object_type orig_weapon;
object_type *i_ptr;
cptr q, s;
int row = 2;
+ int wid = 38, mgn = 2;
bool old_character_xtra = character_xtra;
+ char ch;
+ int total = 0;
+ int cost = 0; /* First time no price */
+ /* Save the screen */
screen_save();
+
/* Clear the screen */
clear_bldg(0, 22);
i_ptr = &inventory[INVEN_RARM];
object_copy(&orig_weapon, i_ptr);
- item_tester_no_ryoute = TRUE;
/* Only compare melee weapons */
+ item_tester_no_ryoute = TRUE;
item_tester_hook = item_tester_hook_melee_weapon;
/* Get the first weapon */
-#ifdef JP
-q = "Âè°ì¤ÎÉð´ï¤Ï¡©";
-s = "Èæ¤Ù¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£";
-#else
- q = "What is your first weapon? ";
- s = "You have nothing to compare.";
-#endif
+ q = _("Âè°ì¤ÎÉð´ï¤Ï¡©", "What is your first weapon? ");
+ s = _("Èæ¤Ù¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£", "You have nothing to compare.");
if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN)))
{
screen_load();
- return (FALSE);
+ return (0);
}
/* Get the item (in the pack) */
- o1_ptr = &inventory[item];
-
- /* Clear the screen */
- clear_bldg(0, 22);
-
- item_tester_no_ryoute = TRUE;
- /* Only compare melee weapons */
- item_tester_hook = item_tester_hook_melee_weapon;
+ o_ptr[0] = &inventory[item];
+ n = 1;
+ total = bcost;
- /* Get the second weapon */
-#ifdef JP
-q = "ÂèÆó¤ÎÉð´ï¤Ï¡©";
-s = "Èæ¤Ù¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£";
-#else
- q = "What is your second weapon? ";
- s = "You have nothing to compare.";
-#endif
-
- if (!get_item(&item2, q, s, (USE_EQUIP | USE_INVEN)))
+ while (TRUE)
{
- screen_load();
- return (FALSE);
- }
-
- /* Get the item (in the pack) */
- o2_ptr = &inventory[item2];
+ /* Clear the screen */
+ clear_bldg(0, 22);
- /* Clear the screen */
- clear_bldg(0, 22);
+ /* Only compare melee weapons */
+ item_tester_no_ryoute = TRUE;
+ item_tester_hook = item_tester_hook_melee_weapon;
- /* Copy first weapon into the weapon slot (if it's not already there) */
- if (o1_ptr != i_ptr)
- object_copy(i_ptr, o1_ptr);
+ /* Hack -- prevent "icky" message */
+ character_xtra = TRUE;
- /* Hack -- prevent "icky" message */
- character_xtra = TRUE;
+ /* Diaplay selected weapon's infomation */
+ for (i = 0; i < n; i++)
+ {
+ int col = (wid * i + mgn);
- /* Get the new values */
- calc_bonuses();
+ /* Copy i-th weapon into the weapon slot (if it's not already there) */
+ if (o_ptr[i] != i_ptr) object_copy(i_ptr, o_ptr[i]);
- character_xtra = old_character_xtra;
+ /* Get the new values */
+ calc_bonuses();
- /* List the new values */
- list_weapon(o1_ptr, row, 2);
- compare_weapon_aux1(o1_ptr, 2, row + 8);
+ /* List the new values */
+ list_weapon(o_ptr[i], row, col);
+ compare_weapon_aux1(o_ptr[i], col, row + 8);
- /* Copy second weapon into the weapon slot (if it's not already there) */
- if (o2_ptr != i_ptr)
- object_copy(i_ptr, o2_ptr);
- else
- object_copy(i_ptr, &orig_weapon);
+ /* Copy back the original weapon into the weapon slot */
+ object_copy(i_ptr, &orig_weapon);
+ }
- /* Hack -- prevent "icky" message */
- character_xtra = TRUE;
+ /* Reset the values for the old weapon */
+ calc_bonuses();
- /* Get the new values */
- calc_bonuses();
+ character_xtra = old_character_xtra;
- character_xtra = old_character_xtra;
+#ifdef JP
+ put_str(format("[ Èæ³ÓÂоÝ: 's'¤ÇÊѹ¹ ($%d) ]", cost), 1, (wid + mgn));
+ put_str("(°ìÈֹ⤤¥À¥á¡¼¥¸¤¬Å¬ÍѤµ¤ì¤Þ¤¹¡£Ê£¿ô¤ÎÇÜÂǸú²Ì¤Ï¤·»»¤µ¤ì¤Þ¤»¤ó¡£)", row + 4, 0);
+ prt("¸½ºß¤Îµ»Î̤«¤éȽÃǤ¹¤ë¤È¡¢¤¢¤Ê¤¿¤ÎÉð´ï¤Ï°Ê²¼¤Î¤è¤¦¤Ê°ÒÎϤòȯ´ø¤·¤Þ¤¹:", 0, 0);
+#else
+ put_str(format("[ 's' Select secondary weapon($%d) ]", cost), row + 1, (wid * i + mgn));
+ put_str("(Only highest damage applies per monster. Special damage not cumulative.)", row + 4, 0);
+ prt("Based on your current abilities, here is what your weapons will do", 0, 0);
+#endif
- /* List the new values */
- list_weapon(o2_ptr, row, 40);
- compare_weapon_aux1(o2_ptr, 40, row + 8);
+ flush();
+ ch = inkey();
- /* Copy back the original weapon into the weapon slot */
- object_copy(i_ptr, &orig_weapon);
+ if (ch == 's')
+ {
+ if (total + cost > p_ptr->au)
+ {
+ msg_print(_("¤ª¶â¤¬Â¤ê¤Þ¤»¤ó¡ª", "You don't have enough money!"));
+ msg_print(NULL);
+ continue;
+ }
- /* Reset the values for the old weapon */
- calc_bonuses();
+ q = _("ÂèÆó¤ÎÉð´ï¤Ï¡©", "What is your second weapon? ");
+ s = _("Èæ¤Ù¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£", "You have nothing to compare.");
-#ifdef JP
-put_str("(°ìÈֹ⤤¥À¥á¡¼¥¸¤¬Å¬ÍѤµ¤ì¤Þ¤¹¡£Ê£¿ô¤ÎÇÜÂǸú²Ì¤Ï¤·»»¤µ¤ì¤Þ¤»¤ó¡£)", row + 4, 0);
-#else
- put_str("(Only highest damage applies per monster. Special damage not cumulative.)", row + 4, 0);
-#endif
+ /* Get the second weapon */
+ if (!get_item(&item2, q, s, (USE_EQUIP | USE_INVEN))) continue;
-#ifdef JP
-msg_print("¸½ºß¤Îµ»Î̤«¤éȽÃǤ¹¤ë¤È¡¢¤¢¤Ê¤¿¤ÎÉð´ï¤Ï°Ê²¼¤Î¤è¤¦¤Ê°ÒÎϤòȯ´ø¤·¤Þ¤¹:");
-#else
- msg_print("Based on your current abilities, here is what your weapons will do");
-#endif
+ total += cost;
+ cost = bcost / 2;
+ /* Get the item (in the pack) */
+ o_ptr[1] = &inventory[item2];
+ n = 2;
+ }
+ else
+ {
+ break;
+ }
+ }
- flush();
- (void)inkey();
+ /* Restore the screen */
screen_load();
/* Done */
- return (TRUE);
+ return (total);
}
/*
+ * Hook to specify "broken weapon"
+ */
+static bool item_tester_hook_broken_weapon(object_type *o_ptr)
+{
+ if (o_ptr->tval != TV_SWORD) return FALSE;
+
+ switch (o_ptr->sval)
+ {
+ case SV_BROKEN_DAGGER:
+ case SV_BROKEN_SWORD:
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static void give_one_ability_of_object(object_type *to_ptr, object_type *from_ptr)
+{
+ int i, n = 0;
+ int cand[TR_FLAG_MAX];
+ u32b to_flgs[TR_FLAG_SIZE];
+ u32b from_flgs[TR_FLAG_SIZE];
+
+ object_flags(to_ptr, to_flgs);
+ object_flags(from_ptr, from_flgs);
+
+ for (i = 0; i < TR_FLAG_MAX; i++)
+ {
+ switch (i)
+ {
+ case TR_IGNORE_ACID:
+ case TR_IGNORE_ELEC:
+ case TR_IGNORE_FIRE:
+ case TR_IGNORE_COLD:
+ case TR_ACTIVATE:
+ case TR_RIDING:
+ case TR_THROW:
+ case TR_SHOW_MODS:
+ case TR_HIDE_TYPE:
+ case TR_ES_ATTACK:
+ case TR_ES_AC:
+ case TR_FULL_NAME:
+ case TR_FIXED_FLAVOR:
+ break;
+ default:
+ if (have_flag(from_flgs, i) && !have_flag(to_flgs, i))
+ {
+ if (!(is_pval_flag(i) && (from_ptr->pval < 1))) cand[n++] = i;
+ }
+ }
+ }
+
+ if (n > 0)
+ {
+ int bmax;
+ int tr_idx = cand[randint0(n)];
+ add_flag(to_ptr->art_flags, tr_idx);
+ if (is_pval_flag(tr_idx)) to_ptr->pval = MAX(to_ptr->pval, 1);
+ bmax = MIN(3, MAX(1, 40 / (to_ptr->dd * to_ptr->ds)));
+ if (tr_idx == TR_BLOWS) to_ptr->pval = MIN(to_ptr->pval, bmax);
+ if (tr_idx == TR_SPEED) to_ptr->pval = MIN(to_ptr->pval, 4);
+ }
+
+ return;
+}
+
+/*
+ * Repair broken weapon
+ */
+static int repair_broken_weapon_aux(int bcost)
+{
+ s32b cost;
+ int item, mater;
+ object_type *o_ptr, *mo_ptr; /* broken weapon and material weapon */
+ object_kind *k_ptr;
+ int i, k_idx, dd_bonus, ds_bonus;
+ char basenm[MAX_NLEN];
+ cptr q, s; /* For get_item prompt */
+ int row = 7;
+
+ /* Clear screen */
+ clear_bldg(0, 22);
+
+ /* Notice */
+ prt(_("½¤Éü¤Ë¤ÏºàÎÁ¤È¤Ê¤ë¤â¤¦1¤Ä¤ÎÉð´ï¤¬É¬ÍפǤ¹¡£", "Hand one material weapon to repair a broken weapon."), row, 2);
+ prt(_("ºàÎÁ¤Ë»ÈÍѤ·¤¿Éð´ï¤Ï¤Ê¤¯¤Ê¤ê¤Þ¤¹¡ª", "The material weapon will disappear after repairing!!"), row+1, 2);
+
+ /* Get an item */
+ q = _("¤É¤ÎÀޤ줿Éð´ï¤ò½¤Éü¤·¤Þ¤¹¤«¡©", "Repair which broken weapon? ");
+ s = _("½¤Éü¤Ç¤¤ëÀޤ줿Éð´ï¤¬¤¢¤ê¤Þ¤»¤ó¡£", "You have no broken weapon to repair.");
+
+ /* Only forge broken weapons */
+ item_tester_hook = item_tester_hook_broken_weapon;
+
+ if (!get_item(&item, q, s, (USE_INVEN | USE_EQUIP))) return (0);
+
+ /* Get the item (in the pack) */
+ o_ptr = &inventory[item];
+
+ /* It is worthless */
+ if (!object_is_ego(o_ptr) && !object_is_artifact(o_ptr))
+ {
+ msg_format(_("¤½¤ì¤Ïľ¤·¤Æ¤â¤·¤ç¤¦¤¬¤Ê¤¤¤¼¡£", "It is worthless to repair."));
+ return (0);
+ }
+
+ /* They are too many */
+ if (o_ptr->number > 1)
+ {
+ msg_format(_("°ìÅÙ¤ËÊ£¿ô¤ò½¤Éü¤¹¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡ª", "They are too many to repair at once!"));
+ return (0);
+ }
+
+ /* Display item name */
+ object_desc(basenm, o_ptr, OD_NAME_ONLY);
+ prt(format(_("½¤Éü¤¹¤ëÉð´ï¡¡¡§ %s", "Repairing: %s"), basenm), row+3, 2);
+
+ /* Get an item */
+ q = _("ºàÎÁ¤È¤Ê¤ëÉð´ï¤Ï¡©", "Which weapon for material? ");
+ s = _("ºàÎÁ¤È¤Ê¤ëÉð´ï¤¬¤¢¤ê¤Þ¤»¤ó¡£", "You have no material to repair.");
+
+ /* Only forge broken weapons */
+ item_tester_hook = item_tester_hook_melee_weapon;
+
+ if (!get_item(&mater, q, s, (USE_INVEN | USE_EQUIP))) return (0);
+ if (mater == item)
+ {
+ msg_print(_("¥¯¥é¥¤¥ó¤ÎÄÛ¤¸¤ã¤Ê¤¤¡ª", "This is not a klein bottle!"));
+ return (0);
+ }
+
+ /* Get the item (in the pack) */
+ mo_ptr = &inventory[mater];
+
+ /* Display item name */
+ object_desc(basenm, mo_ptr, OD_NAME_ONLY);
+ prt(format(_("ºàÎÁ¤È¤¹¤ëÉð´ï¡§ %s", "Material : %s"), basenm), row+4, 2);
+
+ /* Get the value of one of the items (except curses) */
+ cost = bcost + object_value_real(o_ptr) * 2;
+
+#ifdef JP
+ if (!get_check(format("¡ð%d¤«¤«¤ê¤Þ¤¹¤¬¤è¤í¤·¤¤¤Ç¤¹¤«¡© ", cost))) return (0);
+#else
+ if (!get_check(format("Costs %d gold, okay? ", cost))) return (0);
+#endif
+
+ /* Check if the player has enough money */
+ if (p_ptr->au < cost)
+ {
+ object_desc(basenm, o_ptr, OD_NAME_ONLY);
+ msg_format(_("%s¤ò½¤Éü¤¹¤ë¤À¤±¤Î¥´¡¼¥ë¥É¤¬¤¢¤ê¤Þ¤»¤ó¡ª",
+ "You do not have the gold to repair %s!"), basenm);
+ msg_print(NULL);
+ return (0);
+ }
+
+ if (o_ptr->sval == SV_BROKEN_DAGGER)
+ {
+ int i, n = 1;
+
+ /* Suppress compiler warning */
+ k_idx = 0;
+
+ for (i = 1; i < max_k_idx; i++)
+ {
+ object_kind *k_ptr = &k_info[i];
+
+ if (k_ptr->tval != TV_SWORD) continue;
+ if ((k_ptr->sval == SV_BROKEN_DAGGER) ||
+ (k_ptr->sval == SV_BROKEN_SWORD) ||
+ (k_ptr->sval == SV_DOKUBARI)) continue;
+ if (k_ptr->weight > 99) continue;
+
+ if (one_in_(n))
+ {
+ k_idx = i;
+ n++;
+ }
+ }
+ }
+ else /* TV_BROKEN_SWORD */
+ {
+ /* Repair to a sword or sometimes material's type weapon */
+ int tval = (one_in_(5) ? mo_ptr->tval : TV_SWORD);
+
+ while(1)
+ {
+ object_kind *ck_ptr;
+
+ k_idx = lookup_kind(tval, SV_ANY);
+ ck_ptr = &k_info[k_idx];
+
+ if (tval == TV_SWORD)
+ {
+ if ((ck_ptr->sval == SV_BROKEN_DAGGER) ||
+ (ck_ptr->sval == SV_BROKEN_SWORD) ||
+ (ck_ptr->sval == SV_DIAMOND_EDGE) ||
+ (ck_ptr->sval == SV_DOKUBARI)) continue;
+ }
+ if (tval == TV_POLEARM)
+ {
+ if ((ck_ptr->sval == SV_DEATH_SCYTHE) ||
+ (ck_ptr->sval == SV_TSURIZAO)) continue;
+ }
+ if (tval == TV_HAFTED)
+ {
+ if ((ck_ptr->sval == SV_GROND) ||
+ (ck_ptr->sval == SV_WIZSTAFF) ||
+ (ck_ptr->sval == SV_NAMAKE_HAMMER)) continue;
+ }
+
+ break;
+ }
+ }
+
+ /* Calculate dice bonuses */
+ dd_bonus = o_ptr->dd - k_info[o_ptr->k_idx].dd;
+ ds_bonus = o_ptr->ds - k_info[o_ptr->k_idx].ds;
+ dd_bonus += mo_ptr->dd - k_info[mo_ptr->k_idx].dd;
+ ds_bonus += mo_ptr->ds - k_info[mo_ptr->k_idx].ds;
+
+ /* Change base object */
+ k_ptr = &k_info[k_idx];
+ o_ptr->k_idx = k_idx;
+ o_ptr->weight = k_ptr->weight;
+ o_ptr->tval = k_ptr->tval;
+ o_ptr->sval = k_ptr->sval;
+ o_ptr->dd = k_ptr->dd;
+ o_ptr->ds = k_ptr->ds;
+
+ /* Copy base object's ability */
+ for (i = 0; i < TR_FLAG_SIZE; i++) o_ptr->art_flags[i] |= k_ptr->flags[i];
+ if (k_ptr->pval) o_ptr->pval = MAX(o_ptr->pval, randint1(k_ptr->pval));
+ if (have_flag(k_ptr->flags, TR_ACTIVATE)) o_ptr->xtra2 = k_ptr->act_idx;
+
+ /* Dice up */
+ if (dd_bonus > 0)
+ {
+ o_ptr->dd++;
+ for (i = 0; i < dd_bonus; i++)
+ {
+ if (one_in_(o_ptr->dd + i)) o_ptr->dd++;
+ }
+ }
+ if (ds_bonus > 0)
+ {
+ o_ptr->ds++;
+ for (i = 0; i < ds_bonus; i++)
+ {
+ if (one_in_(o_ptr->ds + i)) o_ptr->ds++;
+ }
+ }
+
+ /* */
+ if (have_flag(k_ptr->flags, TR_BLOWS))
+ {
+ int bmax = MIN(3, MAX(1, 40 / (o_ptr->dd * o_ptr->ds)));
+ o_ptr->pval = MIN(o_ptr->pval, bmax);
+ }
+
+ /* Add one random ability from material weapon */
+ give_one_ability_of_object(o_ptr, mo_ptr);
+
+ /* Add to-dam, to-hit and to-ac from material weapon */
+ o_ptr->to_d += MAX(0, (mo_ptr->to_d / 3));
+ o_ptr->to_h += MAX(0, (mo_ptr->to_h / 3));
+ o_ptr->to_a += MAX(0, (mo_ptr->to_a));
+
+ if ((o_ptr->name1 == ART_NARSIL) ||
+ (object_is_random_artifact(o_ptr) && one_in_(1)) ||
+ (object_is_ego(o_ptr) && one_in_(7)))
+ {
+ /* Forge it */
+ if (object_is_ego(o_ptr))
+ {
+ add_flag(o_ptr->art_flags, TR_IGNORE_FIRE);
+ add_flag(o_ptr->art_flags, TR_IGNORE_ACID);
+ }
+
+ /* Add one random ability from material weapon */
+ give_one_ability_of_object(o_ptr, mo_ptr);
+
+ /* Add one random activation */
+ if (!activation_index(o_ptr)) one_activation(o_ptr);
+
+ /* Narsil */
+ if (o_ptr->name1 == ART_NARSIL)
+ {
+ one_high_resistance(o_ptr);
+ one_ability(o_ptr);
+ }
+
+ msg_print(_("¤³¤ì¤Ï¤«¤Ê¤ê¤Î¶Èʪ¤À¤Ã¤¿¤è¤¦¤À¡£", "This blade seems to be exceptionally."));
+ }
+
+ object_desc(basenm, o_ptr, OD_NAME_ONLY);
+#ifdef JP
+ msg_format("¡ð%d¤Ç%s¤Ë½¤Éü¤·¤Þ¤·¤¿¡£", cost, basenm);
+#else
+ msg_format("Repaired into %s for %d gold.", basenm, cost);
+#endif
+ msg_print(NULL);
+
+ /* Remove BROKEN flag */
+ o_ptr->ident &= ~(IDENT_BROKEN);
+
+ /* Add repaired flag */
+ o_ptr->discount = 99;
+
+ /* Decrease material object */
+ inven_item_increase(mater, -1);
+ inven_item_optimize(mater);
+
+ /* Copyback */
+ p_ptr->update |= PU_BONUS;
+ handle_stuff();
+
+ /* Something happened */
+ return (cost);
+}
+
+static int repair_broken_weapon(int bcost)
+{
+ int cost;
+
+ screen_save();
+ cost = repair_broken_weapon_aux(bcost);
+ screen_load();
+ return cost;
+}
+
+
+/*
* Enchant item
*/
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);
/* Get an item */
#ifdef JP
-q = "¤É¤Î¥¢¥¤¥Æ¥à¤ò²þÎɤ·¤Þ¤¹¤«¡©";
-s = "²þÎɤǤ¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£";
+ q = "¤É¤Î¥¢¥¤¥Æ¥à¤ò²þÎɤ·¤Þ¤¹¤«¡©";
+ s = "²þÎɤǤ¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£";
#else
q = "Improve which item? ";
s = "You have nothing to improve.";
{
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
/* Message */
#ifdef JP
-msg_print("²þÎɤ˼ºÇÔ¤·¤¿¡£");
+ msg_print("²þÎɤ˼ºÇÔ¤·¤¿¡£");
#else
msg_print("The improvement failed.");
#endif
-
return (FALSE);
}
else
{
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 */
paid = research_mon();
break;
case BACT_COMPARE_WEAPONS:
- paid = compare_weapons();
+ paid = TRUE;
+ bcost = compare_weapons(bcost);
break;
case BACT_ENCHANT_WEAPON:
item_tester_hook = object_allow_enchant_melee_weapon;
case BACT_EVAL_AC:
paid = eval_ac(p_ptr->dis_ac + p_ptr->dis_to_a);
break;
+ case BACT_BROKEN_WEAPON:
+ paid = TRUE;
+ bcost = repair_broken_weapon(bcost);
+ break;
}
if (paid)
return;
}
- which = f_info[cave[py][px].feat].power;
+ which = f_info[cave[py][px].feat].subtype;
bldg = &building[which];
}
else if ((which == 2) && p_ptr->inside_arena)
{
- if (!p_ptr->exit_bldg)
+ if (!p_ptr->exit_bldg && m_cnt > 0)
{
#ifdef JP
prt("¥²¡¼¥È¤ÏÊĤޤäƤ¤¤ë¡£¥â¥ó¥¹¥¿¡¼¤¬¤¢¤Ê¤¿¤òÂԤäƤ¤¤ë¡ª", 0, 0);