OSDN Git Service

ヘルスバー更新に関する修正.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 23 Dec 2003 21:08:16 +0000 (21:08 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 23 Dec 2003 21:08:16 +0000 (21:08 +0000)
* 乗馬を状態異常から立ち直らせる処理で乗馬のヘルスバーを更新する際に,
  通常のヘルスバーの更新の指示は必要ないので削除.
* モンスターが目を覚ました際にヘルスバー更新が足りない部分の修正.
* 忍術 "鎖鎌" 使用後は対象モンスターのHPを追跡するように修正.

なお, 以下の修正を含む.
* 忍術 "鎖鎌" で乗馬を引き戻そうとしても, 引き戻したメッセージが出な
  いように修正.

src/cmd1.c
src/dungeon.c
src/melee2.c
src/mind.c
src/mspells2.c
src/spells1.c
src/spells2.c
src/spells3.c

index 3fdfec3..d90c68a 100644 (file)
@@ -3071,11 +3071,14 @@ bool py_attack(int y, int x, int mode)
        /* Extract monster name (or "it") */
        monster_desc(m_name, m_ptr, 0);
 
-       /* Auto-Recall if possible and visible */
-       if (m_ptr->ml) monster_race_track(m_ptr->ap_r_idx);
+       if (m_ptr->ml)
+       {
+               /* Auto-Recall if possible and visible */
+               monster_race_track(m_ptr->ap_r_idx);
 
-       /* Track a new monster */
-       if (m_ptr->ml) health_track(c_ptr->m_idx);
+               /* Track a new monster */
+               health_track(c_ptr->m_idx);
+       }
 
        if ((r_ptr->flags1 & RF1_FEMALE) &&
            !(p_ptr->stun || p_ptr->confused || p_ptr->image || !m_ptr->ml))
index 6233941..ec5cefd 100644 (file)
@@ -5722,11 +5722,10 @@ msg_print("
                        /* Acquire the monster name */
                        monster_desc(m_name, m_ptr, 0);
 #ifdef JP
-msg_format("%^s¤òµ¯¤³¤·¤¿¡£", m_name);
+                       msg_format("%^s¤òµ¯¤³¤·¤¿¡£", m_name);
 #else
                        msg_format("You have waked %s up.", m_name);
 #endif
-                       if (p_ptr->health_who == p_ptr->riding) p_ptr->redraw |= (PR_HEALTH);
                        p_ptr->redraw |= (PR_UHEALTH);
                }
 
@@ -5761,12 +5760,10 @@ msg_format("%^s
 
                                /* Dump a message */
 #ifdef JP
-msg_format("%^s¤òÛ¯Û°¾õÂÖ¤«¤éΩ¤Áľ¤é¤»¤¿¡£", m_name);
+                               msg_format("%^s¤òÛ¯Û°¾õÂÖ¤«¤éΩ¤Áľ¤é¤»¤¿¡£", m_name);
 #else
                                msg_format("%^s is no longer stunned.", m_name);
 #endif
-                               if (p_ptr->health_who == p_ptr->riding) p_ptr->redraw |= (PR_HEALTH);
-                               p_ptr->redraw |= (PR_UHEALTH);
                        }
                }
 
@@ -5801,12 +5798,10 @@ msg_format("%^s
 
                                /* Dump a message */
 #ifdef JP
-msg_format("%^s¤òº®Íð¾õÂÖ¤«¤éΩ¤Áľ¤é¤»¤¿¡£", m_name);
+                               msg_format("%^s¤òº®Íð¾õÂÖ¤«¤éΩ¤Áľ¤é¤»¤¿¡£", m_name);
 #else
                                msg_format("%^s is no longer confused.", m_name);
 #endif
-                               if (p_ptr->health_who == p_ptr->riding) p_ptr->redraw |= (PR_HEALTH);
-                               p_ptr->redraw |= (PR_UHEALTH);
                        }
                }
 
@@ -5841,11 +5836,10 @@ msg_format("%^s
 
                                /* Dump a message */
 #ifdef JP
-msg_format("%^s¤ò¶²Éݤ«¤éΩ¤Áľ¤é¤»¤¿¡£", m_name);
+                               msg_format("%^s¤ò¶²Éݤ«¤éΩ¤Áľ¤é¤»¤¿¡£", m_name);
 #else
                                msg_format("%^s is no longer fear.", m_name);
 #endif
-                               if (p_ptr->health_who == p_ptr->riding) p_ptr->redraw |= (PR_HEALTH);
                                p_ptr->redraw |= (PR_UHEALTH);
                        }
                }
index e2c7ebb..051f323 100644 (file)
@@ -1525,6 +1525,12 @@ static bool monst_attack_monst(int m_idx, int t_idx)
                        t_ptr->csleep = 0;
 
                        if (tr_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+                       if (t_ptr->ml)
+                       {
+                               /* Redraw the health bar */
+                               if (p_ptr->health_who == t_idx) p_ptr->redraw |= (PR_HEALTH);
+                               if (p_ptr->riding == t_idx) p_ptr->redraw |= (PR_UHEALTH);
+                       }
 
                        /* Describe the attack method */
                        switch (method)
@@ -2136,6 +2142,12 @@ msg_format("%s
                                        t_ptr->csleep = 0;
 
                                        if (tr_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+                                       if (t_ptr->ml)
+                                       {
+                                               /* Redraw the health bar */
+                                               if (p_ptr->health_who == t_idx) p_ptr->redraw |= (PR_HEALTH);
+                                               if (p_ptr->riding == t_idx) p_ptr->redraw |= (PR_UHEALTH);
+                                       }
 
                                        /* Visible monsters */
                                        if (see_m)
@@ -3207,6 +3219,12 @@ msg_format("%^s%s", m_name, monmessage);
                                if (r_info[y_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
                                        p_ptr->update |= (PU_MON_LITE);
 
+                               if (y_ptr->ml)
+                               {
+                                       /* Redraw the health bar */
+                                       if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
+                               }
+
                                /* XXX XXX XXX Message */
                        }
                }
index 49cbc2e..546516d 100644 (file)
@@ -1699,6 +1699,7 @@ msg_print("
                if (!target_set(TARGET_KILL)) return FALSE;
                m_idx = cave[target_row][target_col].m_idx;
                if (!m_idx) break;
+               if (m_idx == p_ptr->riding) break;
                if (!player_has_los_bold(target_row, target_col)) break;
                if (!projectable(py, px, target_row, target_col)) break;
                m_ptr = &m_list[m_idx];
@@ -1750,6 +1751,15 @@ msg_print("
                if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
                        p_ptr->update |= (PU_MON_LITE);
 
+               if (m_ptr->ml)
+               {
+                       /* Auto-Recall if possible and visible */
+                       monster_race_track(m_ptr->ap_r_idx);
+
+                       /* Track a new monster */
+                       health_track(m_idx);
+               }
+
                break;
        }
        case 13:
index d2e2a32..d25e6ba 100644 (file)
@@ -4204,6 +4204,12 @@ bool monst_spell_monst(int m_idx)
        {
                t_ptr->csleep = 0;
                if (tr_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+               if (t_ptr->ml)
+               {
+                       /* Redraw the health bar */
+                       if (p_ptr->health_who == t_idx) p_ptr->redraw |= (PR_HEALTH);
+                       if (p_ptr->riding == t_idx) p_ptr->redraw |= (PR_UHEALTH);
+               }
        }
 
        if (fear && see_t)
index 9486dfa..2ce8db4 100644 (file)
@@ -3390,7 +3390,16 @@ note = "
 #endif
                                m_ptr->maxhp = m_ptr->max_maxhp;
                        }
-                       if (!dam) break;
+
+                       if (!dam)
+                       {
+                               /* Redraw (later) if needed */
+                               if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
+                               if (p_ptr->riding == c_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
+                               break;
+                       }
+
+                       /* Fall through */
                }
                case GF_OLD_HEAL:
                {
@@ -3468,12 +3477,11 @@ note = "
 
                        /* Message */
 #ifdef JP
-note = "¤ÏÂÎÎϤò²óÉü¤·¤¿¤è¤¦¤À¡£";
+                       note = "¤ÏÂÎÎϤò²óÉü¤·¤¿¤è¤¦¤À¡£";
 #else
                        note = " looks healthier.";
 #endif
 
-
                        /* No "real" damage */
                        dam = 0;
                        break;
index cd7da5a..1c794f3 100644 (file)
@@ -4610,6 +4610,12 @@ void aggravate_monsters(int who)
                                /* Wake up */
                                m_ptr->csleep = 0;
                                if (r_info[m_ptr->r_idx].flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+                               if (m_ptr->ml)
+                               {
+                                       /* Redraw (later) if needed */
+                                       if (p_ptr->health_who == i) p_ptr->redraw |= (PR_HEALTH);
+                                       if (p_ptr->riding == i) p_ptr->redraw |= (PR_UHEALTH);
+                               }
                                sleep = TRUE;
                        }
                        if (!is_pet(m_ptr)) m_ptr->mflag2 |= MFLAG2_NOPET;
@@ -4628,8 +4634,8 @@ void aggravate_monsters(int who)
 
        /* Messages */
 #ifdef JP
-if (speed) msg_print("ÉÕ¶á¤Ç²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤Ê´¶¤¸¤ò¼õ¤±¤¿¡ª");
-else if (sleep) msg_print("²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤ÊÁû¡¹¤·¤¤²»¤¬±ó¤¯¤Ëʹ¤³¤¨¤¿¡ª");
+       if (speed) msg_print("ÉÕ¶á¤Ç²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤Ê´¶¤¸¤ò¼õ¤±¤¿¡ª");
+       else if (sleep) msg_print("²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤ÊÁû¡¹¤·¤¤²»¤¬±ó¤¯¤Ëʹ¤³¤¨¤¿¡ª");
 #else
        if (speed) msg_print("You feel a sudden stirring nearby!");
        else if (sleep) msg_print("You hear a sudden stirring in the distance!");
@@ -4713,6 +4719,12 @@ msg_format("%^s
                        {
                                m_ptr->csleep = 0;
                                if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+                               if (m_ptr->ml)
+                               {
+                                       /* Redraw (later) if needed */
+                                       if (p_ptr->health_who == i) p_ptr->redraw |= (PR_HEALTH);
+                                       if (p_ptr->riding == i) p_ptr->redraw |= (PR_UHEALTH);
+                               }
                                if (see_m && !p_ptr->blind)
                                {
 #ifdef JP
@@ -4845,6 +4857,12 @@ msg_format("%^s
                        {
                                m_ptr->csleep = 0;
                                if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+                               if (m_ptr->ml)
+                               {
+                                       /* Redraw (later) if needed */
+                                       if (p_ptr->health_who == i) p_ptr->redraw |= (PR_HEALTH);
+                                       if (p_ptr->riding == i) p_ptr->redraw |= (PR_UHEALTH);
+                               }
                                if (see_m && !p_ptr->blind)
                                {
 #ifdef JP
@@ -4980,6 +4998,12 @@ msg_format("%^s
                        {
                                m_ptr->csleep = 0;
                                if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+                               if (m_ptr->ml)
+                               {
+                                       /* Redraw (later) if needed */
+                                       if (p_ptr->health_who == i) p_ptr->redraw |= (PR_HEALTH);
+                                       if (p_ptr->riding == i) p_ptr->redraw |= (PR_UHEALTH);
+                               }
                                if (see_m && !p_ptr->blind)
                                {
 #ifdef JP
@@ -6134,9 +6158,12 @@ msg_format("%^s
 #endif
                                }
 
-                               /* Redraw the health bar */
-                               if (m_ptr->ml && (p_ptr->health_who == c_ptr->m_idx))
-                                       p_ptr->redraw |= (PR_HEALTH);
+                               if (m_ptr->ml)
+                               {
+                                       /* Redraw the health bar */
+                                       if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
+                                       if (p_ptr->riding == c_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
+                               }
                        }
                }
 
index 59aeda8..50eff62 100644 (file)
@@ -1502,7 +1502,10 @@ static bool vanish_dungeon(void)
 #else
                                        msg_format("%^s wakes up.", m_name);
 #endif
+                               }
 
+                               if (m_ptr->ml)
+                               {
                                        /* Redraw the health bar */
                                        if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
                                        if (p_ptr->riding == c_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);