char b2 = ']';
char f = ' ';
- static char tmp[8];
+ static char tmp[10];
/* Initial */
s = (*sp);
else
v = "0";
}
+
+ /* Money */
+ else if (streq(b+1, "MONEY"))
+ {
+ sprintf(tmp, "%09ld", (long int)p_ptr->au);
+ v = tmp;
+ }
}
/* Constant */
{29, 10, 21, "£È£Ð"},
{29, 11, 21, "£Í£Ð"},
{29, 20, 21, "¥×¥ì¥¤»þ´Ö"},
- {53, 10, -1, "ÂǷ⹶·â :"},
- {53, 11, -1, "¼Í·â¹¶·â :"},
+ {53, 10, -1, "ÂÇ·âÌ¿Ãæ :"},
+ {53, 11, -1, "¼Í·âÌ¿Ãæ :"},
{53, 12, -1, "ËâË¡Ëɸæ :"},
{53, 13, -1, "±£Ì©¹ÔÆ° :"},
{53, 15, -1, "ÃγР:"},
/* Hack -- add in weapon info if known */
if (object_is_known(o_ptr)) show_tohit += o_ptr->to_h;
if (object_is_known(o_ptr)) show_todam += o_ptr->to_d;
-
+
+ show_tohit += p_ptr->skill_thn / BTH_PLUS_ADJ;
+
/* Melee attacks */
sprintf(buf, "(%+d,%+d)", show_tohit, show_todam);
show_tohit += p_ptr->weapon_exp[0][o_ptr->sval] / 400;
else
show_tohit += (p_ptr->weapon_exp[0][o_ptr->sval] - (WEAPON_EXP_MASTER / 2)) / 200;
-
+
+ show_tohit += p_ptr->skill_thb / BTH_PLUS_ADJ;
+
/* Range attacks */
display_player_one_line(ENTRY_SHOOT_HIT_DAM, format("(%+d,%+d)", show_tohit, show_todam), TERM_L_BLUE);
*/
static void display_player_various(void)
{
- int tmp, damage[2], blows1, blows2, i, basedam;
+ int tmp, damage[2], to_h[2], blows1, blows2, i, basedam;
int xthn, xthb, xfos, xsrh;
int xdis, xdev, xsav, xstl;
cptr desc;
int muta_att = 0;
u32b flgs[TR_FLAG_SIZE];
int shots, shot_frac;
+ bool dokubari;
object_type *o_ptr;
/* Average damage per round */
if (o_ptr->k_idx)
{
- if (object_is_known(o_ptr)) damage[i] += o_ptr->to_d * 100;
+ to_h[i] = 0;
+ dokubari = FALSE;
+
+ if((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI)) dokubari = TRUE;
+ if (object_is_known(o_ptr))
+ {
+ damage[i] += o_ptr->to_d * 100;
+ to_h[i] += o_ptr->to_h;
+ }
basedam = ((o_ptr->dd + p_ptr->to_dd[i]) * (o_ptr->ds + p_ptr->to_ds[i] + 1)) * 50;
object_flags_known(o_ptr, flgs);
+
+ basedam = calc_expect_crit(o_ptr->weight, to_h[i], basedam, p_ptr->dis_to_h[i], dokubari);
if ((o_ptr->ident & IDENT_MENTAL) && ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)))
{
/* vorpal blade */
case RACE_S_FAIRY:
add_flag(flgs, TR_LEVITATION);
break;
- case RACE_KUTA:
+ case RACE_KUTAR:
add_flag(flgs, TR_RES_CONF);
break;
case RACE_ANDROID:
add_flag(flgs, TR_SUST_CON);
add_flag(flgs, TR_SUST_CHR);
}
+
+ /* Hex bonuses */
+ if (p_ptr->realm1 == REALM_HEX)
+ {
+ if (hex_spelling(HEX_DEMON_AURA))
+ {
+ add_flag(flgs, TR_SH_FIRE);
+ add_flag(flgs, TR_REGEN);
+ }
+ if (hex_spelling(HEX_ICE_ARMOR)) add_flag(flgs, TR_SH_COLD);
+ if (hex_spelling(HEX_SHOCK_CLOAK)) add_flag(flgs, TR_SH_ELEC);
+ }
}
int i;
bool vuln = FALSE;
int max_i;
+ byte header_color = TERM_L_DARK;
+ int header_col = col;
if (have_flag(f->player_vuln, flag1) &&
!(have_flag(f->known_obj_imm, flag1) ||
have_flag(f->tim_player_imm, flag1)))
vuln = TRUE;
- /* Header */
- if (!(mode & DP_IMM)) c_put_str(TERM_WHITE, header, row, col);
-
/* Advance */
col += strlen(header) + 1;
/* Check flags */
if (mode & DP_CURSE)
{
- if ((mode & DP_CURSE) && (o_ptr->curse_flags & (TRC_CURSED | TRC_HEAVY_CURSE)))
+ if (have_flag(flgs, TR_ADD_L_CURSE) || have_flag(flgs, TR_ADD_H_CURSE))
+ {
+ c_put_str(TERM_L_DARK, "+", row, col);
+ header_color = TERM_WHITE;
+ }
+ if (o_ptr->curse_flags & (TRC_CURSED | TRC_HEAVY_CURSE))
+ {
c_put_str(TERM_WHITE, "+", row, col);
- if ((mode & DP_CURSE) && (o_ptr->curse_flags & TRC_PERMA_CURSE))
+ header_color = TERM_WHITE;
+ }
+ if (o_ptr->curse_flags & TRC_PERMA_CURSE)
+ {
c_put_str(TERM_WHITE, "*", row, col);
+ header_color = TERM_WHITE;
+ }
}
else
{
if (have_flag(flgs, flag1))
+ {
c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE),
(mode & DP_IMM) ? "*" : "+", row, col);
+ header_color = TERM_WHITE;
+ }
}
/* Advance */
}
/* Assume that player flag is already written */
- if (mode & DP_IMM) return;
+ if (mode & DP_IMM)
+ {
+ if (header_color != TERM_L_DARK)
+ {
+ /* Overwrite Header Color */
+ c_put_str(header_color, header, row, header_col);
+ }
+ return;
+ }
/* Default */
c_put_str((byte)(vuln ? TERM_RED : TERM_SLATE), ".", row, col);
/* Player flags */
- if (have_flag(f->player_flags, flag1)) c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE), "+", row, col);
+ if (have_flag(f->player_flags, flag1))
+ {
+ c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE), "+", row, col);
+ header_color = TERM_WHITE;
+ }
/* Timed player flags */
- if (have_flag(f->tim_player_flags, flag1)) c_put_str((byte)(vuln ? TERM_ORANGE : TERM_YELLOW), "#", row, col);
+ if (have_flag(f->tim_player_flags, flag1))
+ {
+ c_put_str((byte)(vuln ? TERM_ORANGE : TERM_YELLOW), "#", row, col);
+ header_color = TERM_WHITE;
+ }
/* Immunity */
- if (have_flag(f->tim_player_imm, flag1)) c_put_str(TERM_YELLOW, "*", row, col);
- if (have_flag(f->player_imm, flag1)) c_put_str(TERM_WHITE, "*", row, col);
+ if (have_flag(f->tim_player_imm, flag1))
+ {
+ c_put_str(TERM_YELLOW, "*", row, col);
+ header_color = TERM_WHITE;
+ }
+ if (have_flag(f->player_imm, flag1))
+ {
+ c_put_str(TERM_WHITE, "*", row, col);
+ header_color = TERM_WHITE;
+ }
/* Vulnerability */
if (vuln) c_put_str(TERM_RED, "v", row, col + 1);
+
+ /* Header */
+ c_put_str(header_color, header, row, header_col);
}
row = 3;
col = col + 12 + 7;
- display_player_equippy(row-2, col+12, 0);
- c_put_str(TERM_WHITE, "abcdefghijkl@", row-1, col+12);
-
-#ifdef JP
- display_flag_aux(row+ 0, col, "¥Æ¥ì¥Ñ¥·¡¼:", TR_TELEPATHY, &f, 0);
- display_flag_aux(row+ 1, col, "¼Ù°ESP :", TR_ESP_EVIL, &f, 0);
- display_flag_aux(row+ 2, col, "̵À¸ÊªESP :", TR_ESP_NONLIVING, &f, 0);
- display_flag_aux(row+ 3, col, "Á±ÎÉESP :", TR_ESP_GOOD, &f, 0);
- display_flag_aux(row+ 4, col, "ÉÔ»àESP :", TR_ESP_UNDEAD, &f, 0);
- display_flag_aux(row+ 5, col, "°ËâESP :", TR_ESP_DEMON, &f, 0);
- display_flag_aux(row+ 6, col, "ζESP :", TR_ESP_DRAGON, &f, 0);
- display_flag_aux(row+ 7, col, "¿Í´ÖESP :", TR_ESP_HUMAN, &f, 0);
- display_flag_aux(row+ 8, col, "ưʪESP :", TR_ESP_ANIMAL, &f, 0);
- display_flag_aux(row+ 9, col, "¥ª¡¼¥¯ESP :", TR_ESP_ORC, &f, 0);
- display_flag_aux(row+10, col, "¥È¥í¥ëESP :", TR_ESP_TROLL, &f, 0);
- display_flag_aux(row+11, col, "µð¿ÍESP :", TR_ESP_GIANT, &f, 0);
-
- display_flag_aux(row+13, col, "ÏÓÎÏ°Ý»ý :", TR_SUST_STR, &f, 0);
- display_flag_aux(row+14, col, "ÃÎÎÏ°Ý»ý :", TR_SUST_INT, &f, 0);
- display_flag_aux(row+15, col, "¸¤µ°Ý»ý :", TR_SUST_WIS, &f, 0);
- display_flag_aux(row+16, col, "´ïÍÑ°Ý»ý :", TR_SUST_DEX, &f, 0);
- display_flag_aux(row+17, col, "Âѵװݻý :", TR_SUST_CON, &f, 0);
- display_flag_aux(row+18, col, "Ì¥ÎÏ°Ý»ý :", TR_SUST_CHR, &f, 0);
-#else
- display_flag_aux(row+ 0, col, "Telepathy :", TR_TELEPATHY, &f, 0);
- display_flag_aux(row+ 1, col, "ESP Evil :", TR_ESP_EVIL, &f, 0);
- display_flag_aux(row+ 2, col, "ESP Noliv.:", TR_ESP_NONLIVING, &f, 0);
- display_flag_aux(row+ 3, col, "ESP Good :", TR_ESP_GOOD, &f, 0);
- display_flag_aux(row+ 4, col, "ESP Undead:", TR_ESP_UNDEAD, &f, 0);
- display_flag_aux(row+ 5, col, "ESP Demon :", TR_ESP_DEMON, &f, 0);
- display_flag_aux(row+ 6, col, "ESP Dragon:", TR_ESP_DRAGON, &f, 0);
- display_flag_aux(row+ 7, col, "ESP Human :", TR_ESP_HUMAN, &f, 0);
- display_flag_aux(row+ 8, col, "ESP Animal:", TR_ESP_ANIMAL, &f, 0);
- display_flag_aux(row+ 9, col, "ESP Orc :", TR_ESP_ORC, &f, 0);
- display_flag_aux(row+10, col, "ESP Troll :", TR_ESP_TROLL, &f, 0);
- display_flag_aux(row+11, col, "ESP Giant :", TR_ESP_GIANT, &f, 0);
-
- display_flag_aux(row+13, col, "Sust Str :", TR_SUST_STR, &f, 0);
- display_flag_aux(row+14, col, "Sust Int :", TR_SUST_INT, &f, 0);
- display_flag_aux(row+15, col, "Sust Wis :", TR_SUST_WIS, &f, 0);
- display_flag_aux(row+16, col, "Sust Dex :", TR_SUST_DEX, &f, 0);
- display_flag_aux(row+17, col, "Sust Con :", TR_SUST_CON, &f, 0);
- display_flag_aux(row+18, col, "Sust Chr :", TR_SUST_CHR, &f, 0);
+ display_player_equippy(row-2, col+13, 0);
+ c_put_str(TERM_WHITE, "abcdefghijkl@", row-1, col+13);
+
+#ifdef JP
+ display_flag_aux(row+ 0, col, "¥Æ¥ì¥Ñ¥·¡¼ :", TR_TELEPATHY, &f, 0);
+ display_flag_aux(row+ 1, col, "¼Ù°ESP :", TR_ESP_EVIL, &f, 0);
+ display_flag_aux(row+ 2, col, "̵À¸ÊªESP :", TR_ESP_NONLIVING, &f, 0);
+ display_flag_aux(row+ 3, col, "Á±ÎÉESP :", TR_ESP_GOOD, &f, 0);
+ display_flag_aux(row+ 4, col, "ÉÔ»àESP :", TR_ESP_UNDEAD, &f, 0);
+ display_flag_aux(row+ 5, col, "°ËâESP :", TR_ESP_DEMON, &f, 0);
+ display_flag_aux(row+ 6, col, "ζESP :", TR_ESP_DRAGON, &f, 0);
+ display_flag_aux(row+ 7, col, "¿Í´ÖESP :", TR_ESP_HUMAN, &f, 0);
+ display_flag_aux(row+ 8, col, "ưʪESP :", TR_ESP_ANIMAL, &f, 0);
+ display_flag_aux(row+ 9, col, "¥ª¡¼¥¯ESP :", TR_ESP_ORC, &f, 0);
+ display_flag_aux(row+10, col, "¥È¥í¥ëESP :", TR_ESP_TROLL, &f, 0);
+ display_flag_aux(row+11, col, "µð¿ÍESP :", TR_ESP_GIANT, &f, 0);
+ display_flag_aux(row+12, col, "¥æ¥Ë¡¼¥¯ESP:", TR_ESP_UNIQUE, &f, 0);
+ display_flag_aux(row+13, col, "ÏÓÎÏ°Ý»ý :", TR_SUST_STR, &f, 0);
+ display_flag_aux(row+14, col, "ÃÎÎÏ°Ý»ý :", TR_SUST_INT, &f, 0);
+ display_flag_aux(row+15, col, "¸¤µ°Ý»ý :", TR_SUST_WIS, &f, 0);
+ display_flag_aux(row+16, col, "´ïÍÑ°Ý»ý :", TR_SUST_DEX, &f, 0);
+ display_flag_aux(row+17, col, "Âѵװݻý :", TR_SUST_CON, &f, 0);
+ display_flag_aux(row+18, col, "Ì¥ÎÏ°Ý»ý :", TR_SUST_CHR, &f, 0);
+#else
+ display_flag_aux(row+ 0, col, "Telepathy :", TR_TELEPATHY, &f, 0);
+ display_flag_aux(row+ 1, col, "ESP Evil :", TR_ESP_EVIL, &f, 0);
+ display_flag_aux(row+ 2, col, "ESP Noliv. :", TR_ESP_NONLIVING, &f, 0);
+ display_flag_aux(row+ 3, col, "ESP Good :", TR_ESP_GOOD, &f, 0);
+ display_flag_aux(row+ 4, col, "ESP Undead :", TR_ESP_UNDEAD, &f, 0);
+ display_flag_aux(row+ 5, col, "ESP Demon :", TR_ESP_DEMON, &f, 0);
+ display_flag_aux(row+ 6, col, "ESP Dragon :", TR_ESP_DRAGON, &f, 0);
+ display_flag_aux(row+ 7, col, "ESP Human :", TR_ESP_HUMAN, &f, 0);
+ display_flag_aux(row+ 8, col, "ESP Animal :", TR_ESP_ANIMAL, &f, 0);
+ display_flag_aux(row+ 9, col, "ESP Orc :", TR_ESP_ORC, &f, 0);
+ display_flag_aux(row+10, col, "ESP Troll :", TR_ESP_TROLL, &f, 0);
+ display_flag_aux(row+11, col, "ESP Giant :", TR_ESP_GIANT, &f, 0);
+ display_flag_aux(row+12, col, "ESP Unique :", TR_ESP_UNIQUE, &f, 0);
+ display_flag_aux(row+13, col, "Sust Str :", TR_SUST_STR, &f, 0);
+ display_flag_aux(row+14, col, "Sust Int :", TR_SUST_INT, &f, 0);
+ display_flag_aux(row+15, col, "Sust Wis :", TR_SUST_WIS, &f, 0);
+ display_flag_aux(row+16, col, "Sust Dex :", TR_SUST_DEX, &f, 0);
+ display_flag_aux(row+17, col, "Sust Con :", TR_SUST_CON, &f, 0);
+ display_flag_aux(row+18, col, "Sust Chr :", TR_SUST_CHR, &f, 0);
#endif
{
/* Get the quest text */
/* Bewere that INIT_ASSIGN resets the cur_num. */
- init_flags = INIT_ASSIGN;
+ init_flags = INIT_NAME_ONLY;
process_dungeon_file("q_info.txt", 0, 0, 0, 0);
quest_text_line = 0;
/* Get the quest text */
- init_flags = INIT_SHOW_TEXT;
+ init_flags = INIT_NAME_ONLY;
process_dungeon_file("q_info.txt", 0, 0, 0, 0);
*/
static void dump_aux_display_player(FILE *fff)
{
- int x, y, i;
+ int x, y;
byte a;
char c;
char buf[1024];
fprintf(fff, "%s\n", buf);
}
- for (i = 0; (unsigned int) i < (p_ptr->count / 80); i++)
- fprintf(fff, " ");
fprintf(fff, "\n");
- for (i = 0; (unsigned int) i < (p_ptr->count % 80); i++)
- fprintf(fff, " ");
}
for (i=0;i<=col;i++)
{
- fprintf(fff, p[i]);
+ fputs(p[i], fff);
}
}
else if (p_ptr->pclass == CLASS_MAGIC_EATER)
else
{
/* Disturb the player */
- disturb(1, 0);
+ disturb(1, 1);
}
/* Clear messages */
prt("", 0, 0);
/* Hack -- turn off some things */
- disturb(1, 0);
+ disturb(1, 1);
/* Mega-Hack -- Delay death */
if (p_ptr->chp < 0) p_ptr->is_dead = FALSE;