extract_day_hour_min(&day, &hour, &min);
/* Dump the info itself */
- c_put_str(TERM_WHITE, format(
#ifdef JP
- "%2dÆüÌÜ",
+ if (day < 1000) c_put_str(TERM_WHITE, format("%2dÆüÌÜ", day), ROW_DAY, COL_DAY);
+ else c_put_str(TERM_WHITE, "***ÆüÌÜ", ROW_DAY, COL_DAY);
#else
- "Day %-2d",
+ if (day < 1000) c_put_str(TERM_WHITE, format("Day%3d", day), ROW_DAY, COL_DAY);
+ else c_put_str(TERM_WHITE, "Day***", ROW_DAY, COL_DAY);
#endif
- day), ROW_DAY, COL_DAY);
-
+
c_put_str(TERM_WHITE, format("%2d:%02d", hour, min), ROW_DAY, COL_DAY+7);
}
#define BAR_SUPERSTEALTH 50
#define BAR_RECALL 51
#define BAR_ALTER 52
-
+#define BAR_SHCOLD 53
+#define BAR_SHELEC 54
+#define BAR_SHSHADOW 55
+#define BAR_MIGHT 56
+#define BAR_BUILD 57
+#define BAR_ANTIMULTI 58
+#define BAR_ANTITELE 59
+#define BAR_ANTIMAGIC 60
+#define BAR_PATIENCE 61
+#define BAR_REVENGE 62
+#define BAR_RUNESWORD 63
+#define BAR_VAMPILIC 64
+#define BAR_CURE 65
+#define BAR_ESP_EVIL 66
static struct {
byte attr;
{TERM_YELLOW, "±£", "Ķ±£Ì©"},
{TERM_WHITE, "µ¢", "µ¢´Ô"},
{TERM_WHITE, "¸½", "¸½¼ÂÊÑÍÆ"},
+ /* Hex */
+ {TERM_WHITE, "¥ª", "ɹ¥ª¡¼¥é"},
+ {TERM_BLUE, "¥ª", "ÅÅ¥ª¡¼¥é"},
+ {TERM_L_DARK, "¥ª", "±Æ¥ª¡¼¥é"},
+ {TERM_YELLOW, "ÏÓ", "ÏÓÎ϶¯²½"},
+ {TERM_RED, "Æù", "ÆùÂζ¯²½"},
+ {TERM_L_DARK, "¿£", "È¿Áý¿£"},
+ {TERM_ORANGE, "¥Æ", "È¿¥Æ¥ì¥Ý"},
+ {TERM_RED, "Ëâ", "È¿ËâË¡"},
+ {TERM_SLATE, "²æ", "²æËý"},
+ {TERM_SLATE, "Àë", "Àë¹ð"},
+ {TERM_L_DARK, "·õ", "Ëâ·õ²½"},
+ {TERM_RED, "µÛ", "µÛ·ìÂÇ·â"},
+ {TERM_WHITE, "²ó", "²óÉü"},
+ {TERM_L_DARK, "´¶", "¼Ù°´¶ÃÎ"},
{0, NULL, NULL}
};
#else
= {
{TERM_YELLOW, "Ts", "Tsuyoshi"},
- {TERM_VIOLET, "Hu", "Hullc"},
+ {TERM_VIOLET, "Ha", "Halluc"},
{TERM_L_DARK, "Bl", "Blind"},
{TERM_RED, "Pa", "Paralyzed"},
{TERM_VIOLET, "Cf", "Confused"},
{TERM_YELLOW, "Stlt", "Stealth"},
{TERM_WHITE, "Rc", "Recall"},
{TERM_WHITE, "Al", "Alter"},
+ /* Hex */
+ {TERM_WHITE, "SCo", "SCold"},
+ {TERM_BLUE, "SEl", "SElec"},
+ {TERM_L_DARK, "SSh", "SShadow"},
+ {TERM_YELLOW, "EMi", "ExMight"},
+ {TERM_RED, "Bu", "BuildUp"},
+ {TERM_L_DARK, "AMl", "AntiMulti"},
+ {TERM_ORANGE, "AT", "AntiTele"},
+ {TERM_RED, "AM", "AntiMagic"},
+ {TERM_SLATE, "Pa", "Patience"},
+ {TERM_SLATE, "Rv", "Revenge"},
+ {TERM_L_DARK, "Rs", "RuneSword"},
+ {TERM_RED, "Vm", "Vampiric"},
+ {TERM_WHITE, "Cu", "Cure"},
+ {TERM_L_DARK, "ET", "EvilTele"},
{0, NULL, NULL}
};
#endif
*/
static void prt_status(void)
{
- u32b bar_flags[2];
+ u32b bar_flags[3];
int wid, hgt, row_statbar, max_col_statbar;
int i, col = 0, num = 0;
int space = 2;
Term_erase(0, row_statbar, max_col_statbar);
- bar_flags[0] = bar_flags[1] = 0L;
+ bar_flags[0] = bar_flags[1] = bar_flags[2] = 0L;
/* Tsuyoshi */
if (p_ptr->tsuyoshi) ADD_FLG(BAR_TSUYOSHI);
if (p_ptr->ult_res) ADD_FLG(BAR_ULTIMATE);
/* tim levitation */
- if (p_ptr->tim_ffall) ADD_FLG(BAR_LEVITATE);
+ if (p_ptr->tim_levitation) ADD_FLG(BAR_LEVITATE);
if (p_ptr->tim_res_nether) ADD_FLG(BAR_RESNETH);
/* An Eye for an Eye */
if (p_ptr->tim_eyeeye) ADD_FLG(BAR_EYEEYE);
+ /* Hex spells */
+ if (p_ptr->realm1 == REALM_HEX)
+ {
+ if (hex_spelling(HEX_BLESS)) ADD_FLG(BAR_BLESSED);
+ if (hex_spelling(HEX_DEMON_AURA)) { ADD_FLG(BAR_SHFIRE); ADD_FLG(BAR_REGENERATION); }
+ if (hex_spelling(HEX_XTRA_MIGHT)) ADD_FLG(BAR_MIGHT);
+ if (hex_spelling(HEX_DETECT_EVIL)) ADD_FLG(BAR_ESP_EVIL);
+ if (hex_spelling(HEX_ICE_ARMOR)) ADD_FLG(BAR_SHCOLD);
+ if (hex_spelling(HEX_RUNESWORD)) ADD_FLG(BAR_RUNESWORD);
+ if (hex_spelling(HEX_BUILDING)) ADD_FLG(BAR_BUILD);
+ if (hex_spelling(HEX_ANTI_TELE)) ADD_FLG(BAR_ANTITELE);
+ if (hex_spelling(HEX_SHOCK_CLOAK)) ADD_FLG(BAR_SHELEC);
+ if (hex_spelling(HEX_SHADOW_CLOAK)) ADD_FLG(BAR_SHSHADOW);
+ if (hex_spelling(HEX_CONFUSION)) ADD_FLG(BAR_ATTKCONF);
+ if (hex_spelling(HEX_EYE_FOR_EYE)) ADD_FLG(BAR_EYEEYE);
+ if (hex_spelling(HEX_ANTI_MULTI)) ADD_FLG(BAR_ANTIMULTI);
+ if (hex_spelling(HEX_VAMP_BLADE)) ADD_FLG(BAR_VAMPILIC);
+ if (hex_spelling(HEX_ANTI_MAGIC)) ADD_FLG(BAR_ANTIMAGIC);
+ if (hex_spelling(HEX_CURE_LIGHT) ||
+ hex_spelling(HEX_CURE_SERIOUS) ||
+ hex_spelling(HEX_CURE_CRITICAL)) ADD_FLG(BAR_CURE);
+
+ if (p_ptr->magic_num2[2])
+ {
+ if (p_ptr->magic_num2[1] == 1) ADD_FLG(BAR_PATIENCE);
+ if (p_ptr->magic_num2[1] == 2) ADD_FLG(BAR_REVENGE);
+ }
+ }
+
/* Calcurate length */
for (i = 0; bar[i].sstr; i++)
{
put_str("HP", ROW_CURHP, COL_CURHP);
/* ¸½ºß¤Î¥Ò¥Ã¥È¥Ý¥¤¥ó¥È */
- sprintf(tmp, "%4ld", p_ptr->chp);
+ sprintf(tmp, "%4ld", (long int)p_ptr->chp);
if (p_ptr->chp >= p_ptr->mhp)
{
put_str( "/", ROW_CURHP, COL_CURHP + 7 );
/* ºÇÂç¥Ò¥Ã¥È¥Ý¥¤¥ó¥È */
- sprintf(tmp, "%4ld", p_ptr->mhp);
+ sprintf(tmp, "%4ld", (long int)p_ptr->mhp);
color = TERM_L_GREEN;
c_put_str(color, tmp, ROW_CURHP, COL_CURHP + 8 );
#endif
/* ¸½ºß¤Î¥Þ¥¸¥Ã¥¯¥Ý¥¤¥ó¥È */
- sprintf(tmp, "%4ld", p_ptr->csp);
+ sprintf(tmp, "%4ld", (long int)p_ptr->csp);
if (p_ptr->csp >= p_ptr->msp)
{
put_str( "/", ROW_CURSP, COL_CURSP + 7 );
/* ºÇÂç¥Þ¥¸¥Ã¥¯¥Ý¥¤¥ó¥È */
- sprintf(tmp, "%4ld", p_ptr->msp);
+ sprintf(tmp, "%4ld", (long int)p_ptr->msp);
color = TERM_L_GREEN;
c_put_str(color, tmp, ROW_CURSP, COL_CURSP + 8);
else (void)sprintf(depths, "Lev %d", dun_level);
#endif
- attr = TERM_SLATE;
/* Get color of level based on feeling -JSV- */
- if ((turn - old_turn >= (150 - dun_level) * TURNS_PER_TICK) || cheat_xtra)
+ switch (p_ptr->feeling)
{
- switch (feeling)
- {
- case 1: attr = TERM_L_BLUE; break; /* Special */
- case 2: attr = TERM_VIOLET; break; /* Horrible visions */
- case 3: attr = TERM_RED; break; /* Very dangerous */
- case 4: attr = TERM_L_RED; break; /* Very bad feeling */
- case 5: attr = TERM_ORANGE; break; /* Bad feeling */
- case 6: attr = TERM_YELLOW; break; /* Nervous */
- case 7: attr = TERM_L_UMBER; break; /* Luck is turning */
- case 8: attr = TERM_L_WHITE; break; /* Don't like */
- case 9: attr = TERM_WHITE; break; /* Reasonably safe */
- case 10: attr = TERM_WHITE; break; /* Boring place */
- }
+ case 0: attr = TERM_SLATE; break; /* Unknown */
+ case 1: attr = TERM_L_BLUE; break; /* Special */
+ case 2: attr = TERM_VIOLET; break; /* Horrible visions */
+ case 3: attr = TERM_RED; break; /* Very dangerous */
+ case 4: attr = TERM_L_RED; break; /* Very bad feeling */
+ case 5: attr = TERM_ORANGE; break; /* Bad feeling */
+ case 6: attr = TERM_YELLOW; break; /* Nervous */
+ case 7: attr = TERM_L_UMBER; break; /* Luck is turning */
+ case 8: attr = TERM_L_WHITE; break; /* Don't like */
+ case 9: attr = TERM_WHITE; break; /* Reasonably safe */
+ case 10: attr = TERM_WHITE; break; /* Boring place */
}
}
#endif
break;
}
+ case ACTION_SPELL:
+ {
+#ifdef JP
+ strcpy(text, "±Ó¾§");
+#else
+ strcpy(text, "Spel");
+#endif
+ break;
+ }
default:
{
strcpy(text, " ");
row_speed = hgt + ROW_SPEED;
/* Hack -- Visually "undo" the Search Mode Slowdown */
- if (p_ptr->action == ACTION_SEARCH) i += 10;
+ if (p_ptr->action == ACTION_SEARCH && !p_ptr->lightspeed) i += 10;
/* Fast */
if (i > 110)
{
if (p_ptr->riding)
{
- if (m_list[p_ptr->riding].fast && !m_list[p_ptr->riding].slow) attr = TERM_L_BLUE;
- else if (m_list[p_ptr->riding].slow && !m_list[p_ptr->riding].fast) attr = TERM_VIOLET;
+ monster_type *m_ptr = &m_list[p_ptr->riding];
+ if (MON_FAST(m_ptr) && !MON_SLOW(m_ptr)) attr = TERM_L_BLUE;
+ else if (MON_SLOW(m_ptr) && !MON_FAST(m_ptr)) attr = TERM_VIOLET;
else attr = TERM_GREEN;
}
else if ((is_fast && !p_ptr->slow) || p_ptr->lightspeed) attr = TERM_YELLOW;
{
if (p_ptr->riding)
{
- if (m_list[p_ptr->riding].fast && !m_list[p_ptr->riding].slow) attr = TERM_L_BLUE;
- else if (m_list[p_ptr->riding].slow && !m_list[p_ptr->riding].fast) attr = TERM_VIOLET;
+ monster_type *m_ptr = &m_list[p_ptr->riding];
+ if (MON_FAST(m_ptr) && !MON_SLOW(m_ptr)) attr = TERM_L_BLUE;
+ else if (MON_SLOW(m_ptr) && !MON_FAST(m_ptr)) attr = TERM_VIOLET;
else attr = TERM_RED;
}
else if (is_fast && !p_ptr->slow) attr = TERM_YELLOW;
}
-static void prt_mane(void)
+static void prt_imitation(void)
{
int wid, hgt, row_study, col_study;
#ifdef JP
c_put_str(attr, "¤Þ¤Í", row_study, col_study);
#else
- c_put_str(attr, "Mane", row_study, col_study);
+ c_put_str(attr, "Imit", row_study, col_study);
#endif
}
else
byte attr = TERM_RED;
/* Invulnerable */
- if (m_ptr->invulner) attr = TERM_WHITE;
+ if (MON_INVULNER(m_ptr)) attr = TERM_WHITE;
/* Asleep */
- else if (m_ptr->csleep) attr = TERM_BLUE;
+ else if (MON_CSLEEP(m_ptr)) attr = TERM_BLUE;
/* Afraid */
- else if (m_ptr->monfear) attr = TERM_VIOLET;
+ else if (MON_MONFEAR(m_ptr)) attr = TERM_VIOLET;
/* Healthy */
else if (pct >= 100) attr = TERM_L_GREEN;
/* Study spells */
prt_study();
- prt_mane();
+ prt_imitation();
prt_status();
}
}
+/*
+ * Print monster info in line
+ * nnn X LV name
+ * nnn : number or unique(U) or wanted unique(W)
+ * X : symbol of monster
+ * LV : monster lv if known
+ * name: name of monster
+ */
+static void print_monster_line(int x, int y, monster_type* m_ptr, int n_same){
+ char buf[256];
+ int i;
+ int r_idx = m_ptr->ap_r_idx;
+ monster_race* r_ptr = &r_info[r_idx];
+
+ Term_gotoxy(x, y);
+ if(!r_ptr)return;
+ //Number of 'U'nique
+ if(r_ptr->flags1&RF1_UNIQUE){//unique
+ bool is_kubi = FALSE;
+ for(i=0;i<MAX_KUBI;i++){
+ if(kubi_r_idx[i] == r_idx){
+ is_kubi = TRUE;
+ break;
+ }
+ }
+ Term_addstr(-1, TERM_WHITE, is_kubi?" W":" U");
+ }else{
+ sprintf(buf, "%3d", n_same);
+ Term_addstr(-1, TERM_WHITE, buf);
+ }
+ //symbol
+ Term_addstr(-1, TERM_WHITE, " ");
+ //Term_add_bigch(r_ptr->d_attr, r_ptr->d_char);
+ //Term_addstr(-1, TERM_WHITE, "/");
+ Term_add_bigch(r_ptr->x_attr, r_ptr->x_char);
+ //LV
+ if (r_ptr->r_tkills && !(m_ptr->mflag2 & MFLAG2_KAGE)){
+ sprintf(buf, " %2d", r_ptr->level);
+ }else{
+ strcpy(buf, " ??");
+ }
+ Term_addstr(-1, TERM_WHITE, buf);
+ //name
+ sprintf(buf, " %s ", r_name+r_ptr->name);
+ Term_addstr(-1, TERM_WHITE, buf);
+
+ //Term_addstr(-1, TERM_WHITE, look_mon_desc(m_ptr, 0));
+}
+
+ /*
+ max_lines : ºÇÂ粿¹ÔÉÁ²è¤¹¤ë¤«¡¥
+*/
+void print_monster_list(int x, int y, int max_lines){
+ int line = y;
+ monster_type* last_mons = NULL;
+ monster_type* m_ptr = NULL;
+ int n_same = 0;
+ int i;
+
+ for(i=0;i<temp_n;i++){
+ cave_type* c_ptr = &cave[temp_y[i]][temp_x[i]];
+ if(!c_ptr->m_idx || !m_list[c_ptr->m_idx].ml)continue;//no mons or cannot look
+ m_ptr = &m_list[c_ptr->m_idx];
+ if(is_pet(m_ptr))continue;//pet
+ if(!m_ptr->r_idx)continue;//dead?
+ {
+ int r_idx = m_ptr->ap_r_idx;
+ monster_race* r_ptr = &r_info[r_idx];
+ cptr name = (r_name + r_ptr->name);
+ cptr ename = (r_name + r_ptr->name);
+ /*
+ //¥ß¥ß¥Ã¥¯Îà¤ä¡Ö¤½¤ì¡×Åù¤Ï¡¢°ìÍ÷¤Ë½Ð¤Æ¤Ï¤¤¤±¤Ê¤¤
+ if(r_ptr->flags1&RF1_CHAR_CLEAR)continue;
+ if((r_ptr->flags1&RF1_NEVER_MOVE)&&(r_ptr->flags2&RF2_CHAR_MULTI))continue;
+ //¡Ø¥Ì¥ë¡Ù¤Ï¡¢°ìÍ÷¤Ë½Ð¤Æ¤Ï¤¤¤±¤Ê¤¤
+ if((strcmp(name, "À¸¤±¤ëµõ̵¡Ø¥Ì¥ë¡Ù")==0)||
+ (strcmp(ename, "Null the Living Void")==0))continue;
+ //"¶â̵¹¤¤Î»ØÎØ"¤Ï¡¢°ìÍ÷¤Ë½Ð¤Æ¤Ï¤¤¤±¤Ê¤¤
+ if((strcmp(name, "¶â̵¹¤¤Î»ØÎØ")==0)||
+ (strcmp(ename, "Plain Gold Ring")==0))continue;
+ */
+ }
+
+ //¥½¡¼¥ÈºÑ¤ß¤Ê¤Î¤ÇƱ¤¸¥â¥ó¥¹¥¿¡¼¤ÏϢ³¤¹¤ë¡¥¤³¤ì¤òÍøÍѤ·¤ÆƱ¤¸¥â¥ó¥¹¥¿¡¼¤ò¥«¥¦¥ó¥È¡¤¤Þ¤È¤á¤Æɽ¼¨¤¹¤ë¡¥
+ if(!last_mons){//ÀèƬ¥â¥ó¥¹¥¿¡¼
+ last_mons = m_ptr;
+ n_same = 1;
+ continue;
+ }
+ //same race?
+ if(last_mons->ap_r_idx == m_ptr->ap_r_idx){
+ n_same++;
+ continue;//ɽ¼¨½èÍý¤ò¼¡¤Ë²ó¤¹
+ }
+ //print last mons info
+ print_monster_line(x, line++, last_mons, n_same);
+ n_same = 1;
+ last_mons = m_ptr;
+ if(line-y-1==max_lines){//»Ä¤ê1¹Ô
+ break;
+ }
+ }
+ if(line-y-1==max_lines && i!=temp_n){
+ Term_gotoxy(x, line);
+ Term_addstr(-1, TERM_WHITE, "-- and more --");
+ }else{
+ if(last_mons)print_monster_line(x, line++, last_mons, n_same);
+ }
+}
+/*
+ * Hack -- display monster list in sub-windows
+ */
+static void fix_monster_list(void)
+{
+ int j;
+ int w, h;
+
+ /* Scan windows */
+ for (j = 0; j < 8; j++)
+ {
+ term *old = Term;
+
+ /* No window */
+ if (!angband_term[j]) continue;
+
+ /* No relevant flags */
+ if (!(window_flag[j] & (PW_MONSTER_LIST))) continue;
+
+ /* Activate */
+ Term_activate(angband_term[j]);
+ Term_get_size(&w, &h);
+
+ Term_clear();
+
+ target_set_prepare_look();//¥â¥ó¥¹¥¿¡¼°ìÍ÷¤òÀ¸À®¡¤¥½¡¼¥È
+ print_monster_list(0, 0, h);
+
+ /* Fresh */
+ Term_fresh();
+
+ /* Restore */
+ Term_activate(old);
+ }
+}
+
+
+
/*
* Hack -- display equipment in sub-windows
{
int i, j, k, levels;
int num_allowed;
- int num_boukyaku = 0;
+ int num_boukyaku = 0;
- magic_type *s_ptr;
+ const magic_type *s_ptr;
int which;
int bonus = 0;
/* Message */
#ifdef JP
msg_format("%s¤Î%s¤ò˺¤ì¤Æ¤·¤Þ¤Ã¤¿¡£",
- spell_names[technic2magic(which)-1][j%32], p );
+ do_spell(which, j%32, SPELL_NAME), p );
#else
msg_format("You have forgotten the %s of %s.", p,
- spell_names[technic2magic(which)-1][j%32]);
+ do_spell(which, j%32, SPELL_NAME));
#endif
/* Message */
#ifdef JP
msg_format("%s¤Î%s¤ò˺¤ì¤Æ¤·¤Þ¤Ã¤¿¡£",
- spell_names[technic2magic(which)-1][j%32], p );
+ do_spell(which, j%32, SPELL_NAME), p );
#else
msg_format("You have forgotten the %s of %s.", p,
- spell_names[technic2magic(which)-1][j%32]);
+ do_spell(which, j%32, SPELL_NAME));
#endif
/* Message */
#ifdef JP
msg_format("%s¤Î%s¤ò»×¤¤½Ð¤·¤¿¡£",
- spell_names[technic2magic(which)-1][j%32], p );
+ do_spell(which, j%32, SPELL_NAME), p );
#else
msg_format("You have remembered the %s of %s.",
- p, spell_names[technic2magic(which)-1][j%32]);
+ p, do_spell(which, j%32, SPELL_NAME));
#endif
/* Count it */
k++;
}
- if (k>32) k = 32;
+ if (k > 32) k = 32;
if ((p_ptr->new_spells > k) && ((mp_ptr->spell_book == TV_LIFE_BOOK) || (mp_ptr->spell_book == TV_HISSATSU_BOOK))) p_ptr->new_spells = k;
}
/* Normal gloves hurt mage-type spells */
if (o_ptr->k_idx &&
!(have_flag(flgs, TR_FREE_ACT)) &&
- !(have_flag(flgs, TR_MAGIC_MASTERY)) &&
+ !(have_flag(flgs, TR_DEC_MANA)) &&
+ !(have_flag(flgs, TR_EASY_SPELL)) &&
+ !((have_flag(flgs, TR_MAGIC_MASTERY)) && (o_ptr->pval > 0)) &&
!((have_flag(flgs, TR_DEX)) && (o_ptr->pval > 0)))
{
/* Encumbered */
if (p_ptr->shero && (p_ptr->pclass != CLASS_BERSERKER)) mhp += 30;
if (p_ptr->tsuyoshi) mhp += 50;
+ /* Factor in the hex spell settings */
+ if (hex_spelling(HEX_XTRA_MIGHT)) mhp += 15;
+ if (hex_spelling(HEX_BUILDING)) mhp += 60;
+
/* New maximum hitpoints */
if (p_ptr->mhp != mhp)
{
}
/* Artifact Lites provide permanent, bright, lite */
- else if (artifact_p(o_ptr))
+ else if (object_is_fixed_artifact(o_ptr))
{
p_ptr->cur_lite += 3;
}
/* Notice changes in the "lite radius" */
if (p_ptr->old_lite != p_ptr->cur_lite)
{
- /* Update the lite */
+ /* Update stuff */
/* Hack -- PU_MON_LITE for monsters' darkness */
- p_ptr->update |= (PU_LITE | PU_MON_LITE);
-
- /* Update the monsters */
- p_ptr->update |= (PU_MONSTERS);
+ p_ptr->update |= (PU_LITE | PU_MON_LITE | PU_MONSTERS);
/* Remember the old lite */
p_ptr->old_lite = p_ptr->cur_lite;
/*
* Computes current weight limit.
*/
-static int weight_limit(void)
+u32b weight_limit(void)
{
- int i;
+ u32b i;
/* Weight limit based only on strength */
- i = adj_str_wgt[p_ptr->stat_ind[A_STR]] * 100;
- if (p_ptr->pclass == CLASS_BERSERKER) i = i*3/2;
+ i = (u32b)adj_str_wgt[p_ptr->stat_ind[A_STR]] * 50; /* Constant was 100 */
+ if (p_ptr->pclass == CLASS_BERSERKER) i = i * 3 / 2;
/* Return the result */
- return (i);
+ return i;
}
bool buki_motteruka(int i)
{
- return ((inventory[i].k_idx && inventory[i].tval >= TV_DIGGING && inventory[i].tval <= TV_SWORD) ? TRUE : FALSE);
+ return ((inventory[i].k_idx && object_is_melee_weapon(&inventory[i])) ? TRUE : FALSE);
}
{
int i, j, hold, neutral[2];
int new_speed;
+ int default_hand = 0;
+ int empty_hands_status = empty_hands(TRUE);
int extra_blows[2];
int extra_shots;
object_type *o_ptr;
#endif
bool have_sw = FALSE, have_kabe = FALSE;
bool easy_2weapon = FALSE;
- bool riding_ffall = FALSE;
+ bool riding_levitation = FALSE;
s16b this_o_idx, next_o_idx = 0;
- player_race *tmp_rp_ptr;
+ const player_race *tmp_rp_ptr;
/* Save the old vision stuff */
bool old_telepathy = p_ptr->telepathy;
p_ptr->slow_digest = FALSE;
p_ptr->regenerate = FALSE;
p_ptr->can_swim = FALSE;
- p_ptr->ffall = FALSE;
+ p_ptr->levitation = FALSE;
p_ptr->hold_life = FALSE;
p_ptr->telepathy = FALSE;
p_ptr->esp_animal = FALSE;
/* Base skill -- digging */
p_ptr->skill_dig = 0;
- if (buki_motteruka(INVEN_RARM) && (empty_hands(FALSE) & EMPTY_HAND_LARM) && ((inventory[INVEN_RARM].weight > 99) || (inventory[INVEN_RARM].tval == TV_POLEARM)) && (!p_ptr->riding || (p_ptr->pet_extra_flags & PF_RYOUTE))) p_ptr->ryoute = TRUE;
- if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_BERSERKER)) && (empty_hands(TRUE) == (EMPTY_HAND_RARM | EMPTY_HAND_LARM)) && (!p_ptr->riding || (p_ptr->pet_extra_flags & PF_RYOUTE))) p_ptr->ryoute = TRUE;
- if (buki_motteruka(INVEN_RARM) || !buki_motteruka(INVEN_LARM)) p_ptr->migite = TRUE;
- if (buki_motteruka(INVEN_LARM)) p_ptr->hidarite = TRUE;
+ if (buki_motteruka(INVEN_RARM)) p_ptr->migite = TRUE;
+ if (buki_motteruka(INVEN_LARM))
+ {
+ p_ptr->hidarite = TRUE;
+ if (!p_ptr->migite) default_hand = 1;
+ }
+
+ if (CAN_TWO_HANDS_WIELDING())
+ {
+ if (p_ptr->migite && (empty_hands(FALSE) == EMPTY_HAND_LARM) &&
+ object_allow_two_hands_wielding(&inventory[INVEN_RARM]))
+ {
+ p_ptr->ryoute = TRUE;
+ }
+ else if (p_ptr->hidarite && (empty_hands(FALSE) == EMPTY_HAND_RARM) &&
+ object_allow_two_hands_wielding(&inventory[INVEN_LARM]))
+ {
+ p_ptr->ryoute = TRUE;
+ }
+ else
+ {
+ switch (p_ptr->pclass)
+ {
+ case CLASS_MONK:
+ case CLASS_FORCETRAINER:
+ case CLASS_BERSERKER:
+ if (empty_hands(FALSE) == (EMPTY_HAND_RARM | EMPTY_HAND_LARM))
+ {
+ p_ptr->migite = TRUE;
+ p_ptr->ryoute = TRUE;
+ }
+ break;
+ }
+ }
+ }
+
+ if (!p_ptr->migite && !p_ptr->hidarite)
+ {
+ if (empty_hands_status & EMPTY_HAND_RARM) p_ptr->migite = TRUE;
+ else if (empty_hands_status == EMPTY_HAND_LARM)
+ {
+ p_ptr->hidarite = TRUE;
+ default_hand = 1;
+ }
+ }
if (p_ptr->special_defense & KAMAE_MASK)
{
- if (!(empty_hands(TRUE) & EMPTY_HAND_RARM))
+ if (!(empty_hands_status & EMPTY_HAND_RARM))
{
set_action(ACTION_NONE);
}
new_speed -= (p_ptr->lev) / 10;
p_ptr->skill_stl -= (p_ptr->lev)/10;
}
- else if (!inventory[INVEN_LARM].tval || p_ptr->hidarite)
+ else if ((!inventory[INVEN_RARM].k_idx || p_ptr->migite) &&
+ (!inventory[INVEN_LARM].k_idx || p_ptr->hidarite))
{
new_speed += 3;
if (!(prace_is_(RACE_KLACKON) ||
if (p_ptr->lev > 24)
p_ptr->free_act = TRUE;
}
- if (!inventory[INVEN_LARM].tval || p_ptr->hidarite)
+ if ((!inventory[INVEN_RARM].k_idx || p_ptr->migite) &&
+ (!inventory[INVEN_LARM].k_idx || p_ptr->hidarite))
{
p_ptr->to_a += p_ptr->lev/2+5;
p_ptr->dis_to_a += p_ptr->lev/2+5;
p_ptr->sh_fire = TRUE;
p_ptr->see_inv = TRUE;
p_ptr->telepathy = TRUE;
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
p_ptr->kill_wall = TRUE;
new_speed += 5;
p_ptr->to_a += 20;
if (p_ptr->lev > 19) p_ptr->see_inv = TRUE;
break;
case RACE_DRACONIAN:
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
if (p_ptr->lev > 4) p_ptr->resist_fire = TRUE;
if (p_ptr->lev > 9) p_ptr->resist_cold = TRUE;
if (p_ptr->lev > 14) p_ptr->resist_acid = TRUE;
if (p_ptr->pclass != CLASS_NINJA) p_ptr->lite = TRUE;
break;
case RACE_SPECTRE:
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
p_ptr->free_act = TRUE;
p_ptr->resist_neth = TRUE;
p_ptr->hold_life = TRUE;
if (p_ptr->lev > 34) p_ptr->telepathy = TRUE;
break;
case RACE_SPRITE:
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
p_ptr->resist_lite = TRUE;
/* Sprites become faster */
if (p_ptr->lev > 45) p_ptr->stat_add[A_CON]++;
break;
case RACE_ANGEL:
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
p_ptr->see_inv = TRUE;
p_ptr->align += 200;
break;
p_ptr->sustain_con = TRUE;
break;
case RACE_S_FAIRY:
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
break;
- case RACE_KUTA:
+ case RACE_KUTAR:
p_ptr->resist_conf = TRUE;
break;
case RACE_ANDROID:
p_ptr->free_act = TRUE;
p_ptr->slow_digest = TRUE;
p_ptr->regenerate = TRUE;
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
p_ptr->hold_life = TRUE;
p_ptr->telepathy = TRUE;
p_ptr->lite = TRUE;
if (p_ptr->muta3 & MUT3_WINGS)
{
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
}
if (p_ptr->muta3 & MUT3_FEARLESS)
if (have_flag(flgs, TR_AGGRAVATE)) p_ptr->cursed |= TRC_AGGRAVATE;
if (have_flag(flgs, TR_DRAIN_EXP)) p_ptr->cursed |= TRC_DRAIN_EXP;
if (have_flag(flgs, TR_TY_CURSE)) p_ptr->cursed |= TRC_TY_CURSE;
+ if (have_flag(flgs, TR_ADD_L_CURSE)) p_ptr->cursed |= TRC_ADD_L_CURSE;
+ if (have_flag(flgs, TR_ADD_H_CURSE)) p_ptr->cursed |= TRC_ADD_H_CURSE;
if (have_flag(flgs, TR_DEC_MANA)) p_ptr->dec_mana = TRUE;
if (have_flag(flgs, TR_BLESSED)) p_ptr->bless_blade = TRUE;
if (have_flag(flgs, TR_XTRA_MIGHT)) p_ptr->xtra_might = TRUE;
if (have_flag(flgs, TR_ESP_UNIQUE)) p_ptr->esp_unique = TRUE;
if (have_flag(flgs, TR_SEE_INVIS)) p_ptr->see_inv = TRUE;
- if (have_flag(flgs, TR_FEATHER)) p_ptr->ffall = TRUE;
+ if (have_flag(flgs, TR_LEVITATION)) p_ptr->levitation = TRUE;
if (have_flag(flgs, TR_FREE_ACT)) p_ptr->free_act = TRUE;
if (have_flag(flgs, TR_HOLD_LIFE)) p_ptr->hold_life = TRUE;
if (have_flag(flgs, TR_WARNING)){
if (have_flag(flgs, TR_TELEPORT))
{
- if (cursed_p(o_ptr)) p_ptr->cursed |= TRC_TELEPORT;
+ if (object_is_cursed(o_ptr)) p_ptr->cursed |= TRC_TELEPORT;
else
{
cptr insc = quark_str(o_ptr->inscription);
p_ptr->to_a += o_ptr->to_a;
/* Apply the mental bonuses to armor class, if known */
- if (object_known_p(o_ptr)) p_ptr->dis_to_a += o_ptr->to_a;
+ if (object_is_known(o_ptr)) p_ptr->dis_to_a += o_ptr->to_a;
if (o_ptr->curse_flags & TRC_LOW_MELEE)
{
p_ptr->to_d_m += bonus_to_d;
/* Apply the mental bonuses tp hit/damage, if known */
- if (object_known_p(o_ptr)) p_ptr->dis_to_h_b += bonus_to_h;
+ if (object_is_known(o_ptr)) p_ptr->dis_to_h_b += bonus_to_h;
/* To Melee */
if ((i == INVEN_LEFT || i == INVEN_RIGHT) && !p_ptr->ryoute)
p_ptr->to_d[i-INVEN_RIGHT] += bonus_to_d;
/* Apply the mental bonuses tp hit/damage, if known */
- if (object_known_p(o_ptr))
+ if (object_is_known(o_ptr))
{
p_ptr->dis_to_h[i-INVEN_RIGHT] += bonus_to_h;
p_ptr->dis_to_d[i-INVEN_RIGHT] += bonus_to_d;
p_ptr->to_d[1] += (bonus_to_d > 0) ? bonus_to_d/2 : bonus_to_d;
/* Apply the mental bonuses tp hit/damage, if known */
- if (object_known_p(o_ptr))
+ if (object_is_known(o_ptr))
{
p_ptr->dis_to_h[0] += (bonus_to_h > 0) ? (bonus_to_h+1)/2 : bonus_to_h;
p_ptr->dis_to_h[1] += (bonus_to_h > 0) ? bonus_to_h/2 : bonus_to_h;
else
{
/* Apply the bonuses to hit/damage */
- p_ptr->to_h[0] += bonus_to_h;
- p_ptr->to_d[0] += bonus_to_d;
+ p_ptr->to_h[default_hand] += bonus_to_h;
+ p_ptr->to_d[default_hand] += bonus_to_d;
/* Apply the mental bonuses to hit/damage, if known */
- if (object_known_p(o_ptr))
+ if (object_is_known(o_ptr))
{
- p_ptr->dis_to_h[0] += bonus_to_h;
- p_ptr->dis_to_d[0] += bonus_to_d;
+ p_ptr->dis_to_h[default_hand] += bonus_to_h;
+ p_ptr->dis_to_d[default_hand] += bonus_to_d;
}
}
}
p_ptr->dis_to_a += 10 + (p_ptr->lev * 2 / 5);
}
+ /* Hex bonuses */
+ if (p_ptr->realm1 == REALM_HEX)
+ {
+ if (hex_spelling_any()) p_ptr->skill_stl -= (1 + p_ptr->magic_num2[0]);
+ if (hex_spelling(HEX_DETECT_EVIL)) p_ptr->esp_evil = TRUE;
+ if (hex_spelling(HEX_XTRA_MIGHT)) p_ptr->stat_add[A_STR] += 4;
+ if (hex_spelling(HEX_BUILDING))
+ {
+ p_ptr->stat_add[A_STR] += 4;
+ p_ptr->stat_add[A_DEX] += 4;
+ p_ptr->stat_add[A_CON] += 4;
+ }
+ if (hex_spelling(HEX_DEMON_AURA))
+ {
+ p_ptr->sh_fire = TRUE;
+ p_ptr->regenerate = TRUE;
+ }
+ if (hex_spelling(HEX_ICE_ARMOR))
+ {
+ p_ptr->sh_cold = TRUE;
+ p_ptr->to_a += 30;
+ p_ptr->dis_to_a += 30;
+ }
+ if (hex_spelling(HEX_SHOCK_CLOAK))
+ {
+ p_ptr->sh_elec = TRUE;
+ new_speed += 3;
+ }
+ for (i = INVEN_RARM; i <= INVEN_FEET; i++)
+ {
+ int ac = 0;
+ o_ptr = &inventory[i];
+ if (!o_ptr->k_idx) continue;
+ if (!object_is_armour(o_ptr)) continue;
+ if (!object_is_cursed(o_ptr)) continue;
+ ac += 5;
+ if (o_ptr->curse_flags & TRC_HEAVY_CURSE) ac += 7;
+ if (o_ptr->curse_flags & TRC_PERMA_CURSE) ac += 13;
+ p_ptr->to_a += ac;
+ p_ptr->dis_to_a += ac;
+ }
+ }
+
/* Calculate stats */
for (i = 0; i < 6; i++)
{
p_ptr->resist_conf = TRUE;
p_ptr->reflect = TRUE;
p_ptr->free_act = TRUE;
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
}
/* Temporary "Hero" */
}
/* Temporary levitation */
- if (p_ptr->tim_ffall)
+ if (p_ptr->tim_levitation)
{
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
}
/* Temporary reflection */
if (p_ptr->special_defense & KAMAE_SUZAKU) new_speed += 10;
- if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+ if ((p_ptr->migite && (empty_hands_status & EMPTY_HAND_RARM)) ||
+ (p_ptr->hidarite && (empty_hands_status & EMPTY_HAND_LARM)))
{
- p_ptr->to_h[0] += (p_ptr->skill_exp[GINOU_SUDE] - WEAPON_EXP_BEGINNER) / 200;
- p_ptr->dis_to_h[0] += (p_ptr->skill_exp[GINOU_SUDE] - WEAPON_EXP_BEGINNER) / 200;
+ p_ptr->to_h[default_hand] += (p_ptr->skill_exp[GINOU_SUDE] - WEAPON_EXP_BEGINNER) / 200;
+ p_ptr->dis_to_h[default_hand] += (p_ptr->skill_exp[GINOU_SUDE] - WEAPON_EXP_BEGINNER) / 200;
}
if (buki_motteruka(INVEN_RARM) && buki_motteruka(INVEN_LARM))
/* Extract the current weight (in tenth pounds) */
j = p_ptr->total_weight;
- /* Extract the "weight limit" (in tenth pounds) */
- i = weight_limit();
-
- if (p_ptr->riding)
+ if (!p_ptr->riding)
+ {
+ /* Extract the "weight limit" (in tenth pounds) */
+ i = (int)weight_limit();
+ }
+ else
{
monster_type *riding_m_ptr = &m_list[p_ptr->riding];
monster_race *riding_r_ptr = &r_info[riding_m_ptr->r_idx];
new_speed = speed;
}
new_speed += (p_ptr->skill_exp[GINOU_RIDING] + p_ptr->lev *160L)/3200;
- if (riding_m_ptr->fast) new_speed += 10;
- if (riding_m_ptr->slow) new_speed -= 10;
- riding_ffall = (riding_r_ptr->flags7 & RF7_CAN_FLY) ? TRUE : FALSE;
+ if (MON_FAST(riding_m_ptr)) new_speed += 10;
+ if (MON_SLOW(riding_m_ptr)) new_speed -= 10;
+ riding_levitation = (riding_r_ptr->flags7 & RF7_CAN_FLY) ? TRUE : FALSE;
if (riding_r_ptr->flags7 & (RF7_CAN_SWIM | RF7_AQUATIC)) p_ptr->can_swim = TRUE;
if (!(riding_r_ptr->flags2 & RF2_PASS_WALL)) p_ptr->pass_wall = FALSE;
if (p_ptr->skill_exp[GINOU_RIDING] < RIDING_EXP_SKILLED) j += (p_ptr->wt * 3 * (RIDING_EXP_SKILLED - p_ptr->skill_exp[GINOU_RIDING])) / RIDING_EXP_SKILLED;
- i = 3000 + riding_r_ptr->level * 50;
+ /* Extract the "weight limit" */
+ i = 1500 + riding_r_ptr->level * 25;
}
/* XXX XXX XXX Apply "encumbrance" from weight */
- if (j > i/2) new_speed -= ((j - (i/2)) / (i / 10));
+ if (j > i) new_speed -= ((j - i) / (i / 5));
/* Searching slows the player down */
if (p_ptr->action == ACTION_SEARCH) new_speed -= 10;
{
p_ptr->num_fire += (p_ptr->lev * 4);
}
+
+ /* Snipers love Cross bows */
+ if ((p_ptr->pclass == CLASS_SNIPER) &&
+ (p_ptr->tval_ammo == TV_BOLT))
+ {
+ p_ptr->to_h_b += (10 + (p_ptr->lev / 5));
+ p_ptr->dis_to_h_b += (10 + (p_ptr->lev / 5));
+ }
}
}
case CLASS_BLUE_MAGE:
num = 3; wgt = 100; mul = 2; break;
- /* Priest, Mindcrafter */
+ /* Priest, Mindcrafter, Magic-Eater */
case CLASS_PRIEST:
case CLASS_MAGIC_EATER:
case CLASS_MINDCRAFTER:
case CLASS_SAMURAI:
num = 5; wgt = 70; mul = 4; break;
- /* Kaji */
+ /* Weaponsmith */
case CLASS_SMITH:
num = 5; wgt = 150; mul = 5; break;
case CLASS_BEASTMASTER:
num = 5; wgt = 70; mul = 3; break;
+ /* Cavalry */
case CLASS_CAVALRY:
if ((p_ptr->riding) && (have_flag(flgs, TR_RIDING))) {num = 5; wgt = 70; mul = 4;}
else {num = 5; wgt = 100; mul = 3;}
case CLASS_SORCERER:
num = 1; wgt = 1; mul = 1; break;
- /* Archer, Magic eater */
+ /* Archer, Bard */
case CLASS_ARCHER:
case CLASS_BARD:
num = 4; wgt = 70; mul = 2; break;
case CLASS_FORCETRAINER:
num = 4; wgt = 60; mul = 2; break;
- /* Mirror Master */
+ /* Mirror Master, Sniper */
case CLASS_MIRROR_MASTER:
+ case CLASS_SNIPER:
num = 3; wgt = 100; mul = 3; break;
/* Ninja */
num = 4; wgt = 20; mul = 1; break;
}
+ /* Hex - extra mights gives +1 bonus to max blows */
+ if (hex_spelling(HEX_XTRA_MIGHT) || hex_spelling(HEX_BUILDING)) { num++; wgt /= 2; mul += 2; }
+
/* Enforce a minimum "weight" (tenth pounds) */
div = ((o_ptr->weight < wgt) ? wgt : o_ptr->weight);
p_ptr->to_d[i] += p_ptr->lev/6;
p_ptr->dis_to_h[i] += p_ptr->lev/5;
p_ptr->dis_to_d[i] += p_ptr->lev/6;
- if (!p_ptr->hidarite || p_ptr->ryoute)
+ if (((i == 0) && !p_ptr->hidarite) || p_ptr->ryoute)
{
p_ptr->to_h[i] += p_ptr->lev/5;
p_ptr->to_d[i] += p_ptr->lev/6;
p_ptr->dis_to_d[i] -= 10;
}
}
+ /* Hex bonuses */
+ if (p_ptr->realm1 == REALM_HEX)
+ {
+ if (object_is_cursed(o_ptr))
+ {
+ if (o_ptr->curse_flags & (TRC_CURSED)) { p_ptr->to_h[i] += 5; p_ptr->dis_to_h[i] += 5; }
+ if (o_ptr->curse_flags & (TRC_HEAVY_CURSE)) { p_ptr->to_h[i] += 7; p_ptr->dis_to_h[i] += 7; }
+ if (o_ptr->curse_flags & (TRC_PERMA_CURSE)) { p_ptr->to_h[i] += 13; p_ptr->dis_to_h[i] += 13; }
+ if (o_ptr->curse_flags & (TRC_TY_CURSE)) { p_ptr->to_h[i] += 5; p_ptr->dis_to_h[i] += 5; }
+ if (hex_spelling(HEX_RUNESWORD))
+ {
+ if (o_ptr->curse_flags & (TRC_CURSED)) { p_ptr->to_d[i] += 5; p_ptr->dis_to_d[i] += 5; }
+ if (o_ptr->curse_flags & (TRC_HEAVY_CURSE)) { p_ptr->to_d[i] += 7; p_ptr->dis_to_d[i] += 7; }
+ if (o_ptr->curse_flags & (TRC_PERMA_CURSE)) { p_ptr->to_d[i] += 13; p_ptr->dis_to_d[i] += 13; }
+ }
+ }
+ }
if (p_ptr->riding)
{
if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
int penalty = 0;
p_ptr->riding_ryoute = FALSE;
+
if (p_ptr->ryoute || (empty_hands(FALSE) == EMPTY_HAND_NONE)) p_ptr->riding_ryoute = TRUE;
+ else if (p_ptr->pet_extra_flags & PF_RYOUTE)
+ {
+ switch (p_ptr->pclass)
+ {
+ case CLASS_MONK:
+ case CLASS_FORCETRAINER:
+ case CLASS_BERSERKER:
+ if ((empty_hands(FALSE) != EMPTY_HAND_NONE) && !buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+ p_ptr->riding_ryoute = TRUE;
+ break;
+ }
+ }
if ((p_ptr->pclass == CLASS_BEASTMASTER) || (p_ptr->pclass == CLASS_CAVALRY))
{
}
/* Different calculation for monks with empty hands */
- if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_BERSERKER)) && (empty_hands(TRUE) & EMPTY_HAND_RARM))
+ if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_BERSERKER)) &&
+ (empty_hands_status & EMPTY_HAND_RARM) && !p_ptr->hidarite)
{
int blow_base = p_ptr->lev + adj_dex_blow[p_ptr->stat_ind[A_DEX]];
p_ptr->num_blow[0] = 0;
p_ptr->sh_fire = TRUE;
p_ptr->sh_elec = TRUE;
p_ptr->sh_cold = TRUE;
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
}
else if (p_ptr->special_defense & KAMAE_GENBU)
{
p_ptr->dis_to_h[0] -= (p_ptr->lev / 3);
p_ptr->dis_to_d[0] -= (p_ptr->lev / 6);
p_ptr->num_blow[0] /= 2;
- p_ptr->ffall = TRUE;
+ p_ptr->levitation = TRUE;
}
p_ptr->num_blow[0] += 1+extra_blows[0];
}
- if (p_ptr->riding) p_ptr->ffall = riding_ffall;
+ if (p_ptr->riding) p_ptr->levitation = riding_levitation;
monk_armour_aux = FALSE;
bonus_to_d = ((int)(adj_str_td[p_ptr->stat_ind[A_STR]]) - 128)/2;
bonus_to_h = ((int)(adj_str_th[p_ptr->stat_ind[A_STR]]) - 128) + ((int)(adj_dex_th[p_ptr->stat_ind[A_DEX]]) - 128);
- p_ptr->to_h[0] += MAX(bonus_to_h,1);
- p_ptr->dis_to_h[0] += MAX(bonus_to_h,1);
- p_ptr->to_d[0] += MAX(bonus_to_d,1);
- p_ptr->dis_to_d[0] += MAX(bonus_to_d,1);
+ p_ptr->to_h[default_hand] += MAX(bonus_to_h,1);
+ p_ptr->dis_to_h[default_hand] += MAX(bonus_to_h,1);
+ p_ptr->to_d[default_hand] += MAX(bonus_to_d,1);
+ p_ptr->dis_to_d[default_hand] += MAX(bonus_to_d,1);
}
- if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_BERSERKER)) && (empty_hands(TRUE) == (EMPTY_HAND_RARM | EMPTY_HAND_LARM))) p_ptr->ryoute = FALSE;
+ if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_BERSERKER)) && (empty_hands(FALSE) == (EMPTY_HAND_RARM | EMPTY_HAND_LARM))) p_ptr->ryoute = FALSE;
/* Affect Skill -- stealth (bonus one) */
p_ptr->skill_stl += 1;
if (p_ptr->riding_ryoute)
{
#ifdef JP
- msg_print("ξ¼ê¤¬¤Õ¤µ¤¬¤Ã¤Æ¤¤¤ÆÇϤòÁà¤ì¤Ê¤¤¡£");
+ msg_format("%sÇϤòÁà¤ì¤Ê¤¤¡£", (empty_hands(FALSE) == EMPTY_HAND_NONE) ? "ξ¼ê¤¬¤Õ¤µ¤¬¤Ã¤Æ¤¤¤Æ" : "");
#else
msg_print("You are using both hand for fighting, and you can't control a riding pet.");
#endif
else
{
#ifdef JP
- msg_print("¼ê¤¬¶õ¤¤¤ÆÇϤòÁà¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
+ msg_format("%sÇϤòÁà¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£", (empty_hands(FALSE) == EMPTY_HAND_NONE) ? "¼ê¤¬¶õ¤¤¤Æ" : "");
#else
msg_print("You began to control riding pet with one hand.");
#endif
if ((inventory[i].tval == TV_TRUMP_BOOK) && (inventory[i].sval == 1)) have_dd_t = TRUE;
#endif
if ((inventory[i].tval == TV_NATURE_BOOK) && (inventory[i].sval == 2)) have_sw = TRUE;
- if ((inventory[i].tval == TV_ENCHANT_BOOK) && (inventory[i].sval == 2)) have_kabe = TRUE;
+ if ((inventory[i].tval == TV_CRAFT_BOOK) && (inventory[i].sval == 2)) have_kabe = TRUE;
}
for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
{
if ((o_ptr->tval == TV_TRUMP_BOOK) && (o_ptr->sval == 1)) have_dd_t = TRUE;
#endif
if ((o_ptr->tval == TV_NATURE_BOOK) && (o_ptr->sval == 2)) have_sw = TRUE;
- if ((o_ptr->tval == TV_ENCHANT_BOOK) && (o_ptr->sval == 2)) have_kabe = TRUE;
+ if ((o_ptr->tval == TV_CRAFT_BOOK) && (o_ptr->sval == 2)) have_kabe = TRUE;
}
if (p_ptr->pass_wall && !p_ptr->kill_wall) p_ptr->no_flowed = TRUE;
#if 0
if (have_dd_s && ((p_ptr->realm1 == REALM_SORCERY) || (p_ptr->realm2 == REALM_SORCERY) || (p_ptr->pclass == CLASS_SORCERER)))
{
- magic_type *s_ptr = &mp_ptr->info[REALM_SORCERY-1][SPELL_DD_S];
+ const magic_type *s_ptr = &mp_ptr->info[REALM_SORCERY-1][SPELL_DD_S];
if (p_ptr->lev >= s_ptr->slevel) p_ptr->no_flowed = TRUE;
}
if (have_dd_t && ((p_ptr->realm1 == REALM_TRUMP) || (p_ptr->realm2 == REALM_TRUMP) || (p_ptr->pclass == CLASS_SORCERER) || (p_ptr->pclass == CLASS_RED_MAGE)))
{
- magic_type *s_ptr = &mp_ptr->info[REALM_TRUMP-1][SPELL_DD_T];
+ const magic_type *s_ptr = &mp_ptr->info[REALM_TRUMP-1][SPELL_DD_T];
if (p_ptr->lev >= s_ptr->slevel) p_ptr->no_flowed = TRUE;
}
#endif
if (have_sw && ((p_ptr->realm1 == REALM_NATURE) || (p_ptr->realm2 == REALM_NATURE) || (p_ptr->pclass == CLASS_SORCERER)))
{
- magic_type *s_ptr = &mp_ptr->info[REALM_NATURE-1][SPELL_SW];
+ const magic_type *s_ptr = &mp_ptr->info[REALM_NATURE-1][SPELL_SW];
if (p_ptr->lev >= s_ptr->slevel) p_ptr->no_flowed = TRUE;
}
- if (have_kabe && ((p_ptr->realm1 == REALM_ENCHANT) || (p_ptr->realm2 == REALM_ENCHANT) || (p_ptr->pclass == CLASS_SORCERER)))
+ if (have_kabe && ((p_ptr->realm1 == REALM_CRAFT) || (p_ptr->realm2 == REALM_CRAFT) || (p_ptr->pclass == CLASS_SORCERER)))
{
- magic_type *s_ptr = &mp_ptr->info[REALM_ENCHANT-1][SPELL_KABE];
+ const magic_type *s_ptr = &mp_ptr->info[REALM_CRAFT-1][SPELL_KABE];
if (p_ptr->lev >= s_ptr->slevel) p_ptr->no_flowed = TRUE;
}
}
p_ptr->redraw &= ~(PR_EXTRA);
p_ptr->redraw &= ~(PR_CUT | PR_STUN);
p_ptr->redraw &= ~(PR_HUNGER);
- p_ptr->redraw &= ~(PR_STATE | PR_SPEED | PR_STUDY | PR_MANE | PR_STATUS);
+ p_ptr->redraw &= ~(PR_STATE | PR_SPEED | PR_STUDY | PR_IMITATION | PR_STATUS);
prt_frame_extra();
}
if (p_ptr->pclass == CLASS_IMITATOR)
{
- if (p_ptr->redraw & (PR_MANE))
+ if (p_ptr->redraw & (PR_IMITATION))
{
- p_ptr->redraw &= ~(PR_MANE);
- prt_mane();
+ p_ptr->redraw &= ~(PR_IMITATION);
+ prt_imitation();
}
}
else if (p_ptr->redraw & (PR_STUDY))
p_ptr->window &= ~(PW_PLAYER);
fix_player();
}
-
+
+ /* Display monster list */
+ if (p_ptr->window & (PW_MONSTER_LIST))
+ {
+ p_ptr->window &= ~(PW_MONSTER_LIST);
+ fix_monster_list();
+ }
+
/* Display overhead view */
if (p_ptr->window & (PW_MESSAGE))
{
}
-s16b empty_hands(bool is_monk)
+s16b empty_hands(bool riding_control)
{
s16b status = EMPTY_HAND_NONE;
- if (is_monk && (p_ptr->pclass != CLASS_MONK) && (p_ptr->pclass != CLASS_FORCETRAINER) && (p_ptr->pclass != CLASS_BERSERKER)) return EMPTY_HAND_NONE;
- if (!(inventory[INVEN_RARM].k_idx)) status |= EMPTY_HAND_RARM;
- if (!(inventory[INVEN_LARM].k_idx)) status |= EMPTY_HAND_LARM;
+ if (!inventory[INVEN_RARM].k_idx) status |= EMPTY_HAND_RARM;
+ if (!inventory[INVEN_LARM].k_idx) status |= EMPTY_HAND_LARM;
+
+ if (riding_control && (status != EMPTY_HAND_NONE) && p_ptr->riding && !(p_ptr->pet_extra_flags & PF_RYOUTE))
+ {
+ if (status & EMPTY_HAND_LARM) status &= ~(EMPTY_HAND_LARM);
+ else if (status & EMPTY_HAND_RARM) status &= ~(EMPTY_HAND_RARM);
+ }
+
return status;
}