OSDN Git Service

This commit was manufactured by cvs2svn to create tag
[hengband/hengband.git] / src / spells1.c
index 236ffac..b935af7 100644 (file)
@@ -778,6 +778,17 @@ msg_print("
                                }
                        }
 
+                       /* Remove "unsafe" flag if player is not blind */
+                       if (!p_ptr->blind && player_has_los_bold(y, x))
+                       {
+                               c_ptr->info &= ~(CAVE_UNSAFE);
+
+                               /* Redraw */
+                               lite_spot(y, x);
+
+                               obvious = TRUE;
+                       }
+
                        break;
                }
 
@@ -802,14 +813,14 @@ msg_print("
 #endif
 
                                        obvious = TRUE;
+                               }
 
-                                       /* Visibility change */
-                                       if ((c_ptr->feat >= FEAT_DOOR_HEAD) &&
-                                                (c_ptr->feat <= FEAT_DOOR_TAIL))
-                                       {
-                                               /* Update some things */
-                                               p_ptr->update |= (PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
-                                       }
+                               /* Visibility change */
+                               if ((c_ptr->feat >= FEAT_DOOR_HEAD) &&
+                                        (c_ptr->feat <= FEAT_DOOR_TAIL))
+                               {
+                                       /* Update some things */
+                                       p_ptr->update |= (PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
                                }
 
                                /* Forget the door */
@@ -822,6 +833,17 @@ msg_print("
                        /* Notice */
                        note_spot(y, x);
 
+                       /* Remove "unsafe" flag if player is not blind */
+                       if (!p_ptr->blind && player_has_los_bold(y, x))
+                       {
+                               c_ptr->info &= ~(CAVE_UNSAFE);
+
+                               /* Redraw */
+                               lite_spot(y, x);
+
+                               obvious = TRUE;
+                       }
+
                        break;
                }
 
@@ -841,7 +863,7 @@ msg_print("
                                {
                                        /* Message */
 #ifdef JP
-msg_print("²¿¤«¤¬¤Ä¤Ã¤«¤¨¤Æ¥É¥¢¤¬³«¤«¤Ê¤¤¡£");
+                                       msg_print("¥É¥¢¤Ë²¿¤«¤¬¤Ä¤Ã¤«¤¨¤Æ³«¤«¤Ê¤¯¤Ê¤Ã¤¿¡£");
 #else
                                        msg_print("The door seems stuck.");
 #endif
@@ -1156,20 +1178,28 @@ msg_print("
                case GF_LITE:
                {
                        /* Turn on the light */
-                       if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS)) c_ptr->info |= (CAVE_GLOW);
+                       if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
+                       {
+                               c_ptr->info |= (CAVE_GLOW);
 
-                       /* Notice */
-                       note_spot(y, x);
+                               /* Notice */
+                               note_spot(y, x);
 
-                       /* Redraw */
-                       lite_spot(y, x);
+                               /* Redraw */
+                               lite_spot(y, x);
 
-                       /* Observe */
-                       if (player_can_see_bold(y, x)) obvious = TRUE;
+                               /* Observe */
+                               if (player_can_see_bold(y, x)) obvious = TRUE;
 
-                       /* Mega-Hack -- Update the monster in the affected grid */
-                       /* This allows "spear of light" (etc) to work "correctly" */
-                       if (c_ptr->m_idx) update_mon(c_ptr->m_idx, FALSE);
+                               /* Mega-Hack -- Update the monster in the affected grid */
+                               /* This allows "spear of light" (etc) to work "correctly" */
+                               if (c_ptr->m_idx) update_mon(c_ptr->m_idx, FALSE);
+
+                               if (p_ptr->special_defense & NINJA_S_STEALTH)
+                               {
+                                       if (player_bold(y, x)) set_superstealth(FALSE);
+                               }
+                       }
 
                        break;
                }
@@ -1215,7 +1245,7 @@ msg_print("
 #ifdef JP
                                msg_print("¶À¤¬³ä¤ì¤¿¡ª");
 #else
-                               msg_print("The mirror was chashed!");
+                               msg_print("The mirror was crashed!");
 #endif                         
                                remove_mirror(y,x);
                            project(0,2,y,x, p_ptr->lev /2 +5 ,GF_SHARDS,(PROJECT_GRID|PROJECT_ITEM|PROJECT_KILL|PROJECT_JUMP|PROJECT_NO_HANGEKI),-1);
@@ -1229,9 +1259,9 @@ msg_print("
 #ifdef JP
                                msg_print("¶À¤¬³ä¤ì¤¿¡ª");
 #else
-                               msg_print("The mirror was chashed!");
+                               msg_print("The mirror was crashed!");
 #endif                         
-                               cave_set_feat(y,x, FEAT_FLOOR);
+                               remove_mirror(y, x);
                        }
                        break;
                }
@@ -1584,7 +1614,7 @@ note_kill = "
 #ifdef JP
 note_kill = "À¸¤­Ê֤ä¿¡£";
 #else
-                                       note_kill = "rivived.";
+                                       note_kill = " revived.";
 #endif
                                                }
                                                else if (!note_kill)
@@ -1791,11 +1821,7 @@ static bool project_m(int who, int r, int y, int x, int dam, int typ , int flg)
        cptr note = NULL;
 
        /* Assume a default death */
-#ifdef JP
-       cptr note_dies = "¤Ï»à¤ó¤À¡£";
-#else
-       cptr note_dies = " dies.";
-#endif
+       cptr note_dies = extract_note_dies(real_r_ptr(m_ptr));
 
        int ty = m_ptr->fy;
        int tx = m_ptr->fx;
@@ -1827,32 +1853,6 @@ static bool project_m(int who, int r, int y, int x, int dam, int typ , int flg)
 #endif
 
 
-       /* Some monsters get "destroyed" */
-       if (!monster_living(r_ptr))
-       {
-               int i;
-               bool explode = FALSE;
-
-               for (i = 0; i < 4; i++)
-               {
-                       if (r_ptr->blow[i].method == RBM_EXPLODE) explode = TRUE;
-               }
-
-               /* Special note at death */
-               if (explode)
-#ifdef JP
-note_dies = "¤ÏÇúȯ¤·¤ÆÊ´¡¹¤Ë¤Ê¤Ã¤¿¡£";
-#else
-                       note_dies = " explodes into tiny shreds.";
-#endif
-               else
-#ifdef JP
-note_dies = "¤òÅݤ·¤¿¡£";
-#else
-                       note_dies = " is destroyed.";
-#endif
-       }
-
        if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) disturb(1, 0);
 
        /* Analyze the damage type */
@@ -3460,7 +3460,7 @@ note = "
                {
                        if (seen) obvious = TRUE;
 
-                       if (is_pet(m_ptr) || (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & (RF7_UNIQUE_7 | RF7_UNIQUE2)))
+                       if (is_pet(m_ptr) || (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)))
                        {
 #ifdef JP
 note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
@@ -3500,6 +3500,8 @@ note = "
                        /* Wake up */
                        m_ptr->csleep = 0;
 
+                       if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+
                        if (m_ptr->maxhp < m_ptr->max_maxhp)
                        {
 #ifdef JP
@@ -3518,6 +3520,8 @@ msg_format("%^s
                        /* Wake up */
                        m_ptr->csleep = 0;
 
+                       if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+
                        if (m_ptr->stunned)
                        {
 #ifdef JP
@@ -3552,29 +3556,32 @@ msg_format("%^s
                        /* No overflow */
                        if (m_ptr->hp > m_ptr->maxhp) m_ptr->hp = m_ptr->maxhp;
 
-                       chg_virtue(V_VITALITY, 1);
-                       
-                       if (r_ptr->flags1 & RF1_UNIQUE)
-                               chg_virtue(V_INDIVIDUALISM, 1);
-       
-                       if (is_friendly(m_ptr))
-                               chg_virtue(V_HONOUR, 1);
-                       else if (!(r_ptr->flags3 & RF3_EVIL))
+                       if (!who)
                        {
-                               if (r_ptr->flags3 & RF3_GOOD)
-                                       chg_virtue(V_COMPASSION, 2);
-                               else
-                                       chg_virtue(V_COMPASSION, 1);
+                               chg_virtue(V_VITALITY, 1);
+
+                               if (r_ptr->flags1 & RF1_UNIQUE)
+                                       chg_virtue(V_INDIVIDUALISM, 1);
+
+                               if (is_friendly(m_ptr))
+                                       chg_virtue(V_HONOUR, 1);
+                               else if (!(r_ptr->flags3 & RF3_EVIL))
+                               {
+                                       if (r_ptr->flags3 & RF3_GOOD)
+                                               chg_virtue(V_COMPASSION, 2);
+                                       else
+                                               chg_virtue(V_COMPASSION, 1);
+                               }
+
+                               if (r_ptr->flags3 & RF3_ANIMAL)
+                                       chg_virtue(V_NATURE, 1);
                        }
 
                        if (m_ptr->r_idx == MON_LEPER)
                        {
                                heal_leper = TRUE;
-                               chg_virtue(V_COMPASSION, 5);
+                               if (!who) chg_virtue(V_COMPASSION, 5);
                        }
-       
-                       if (r_ptr->flags3 & RF3_ANIMAL)
-                               chg_virtue(V_NATURE, 1);
 
                        /* Redraw (later) if needed */
                        if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
@@ -3852,7 +3859,7 @@ note = "
                                break;
                        }
 
-                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))
+                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))
                                dam = dam * 2 / 3;
 
                        /* Attempt a saving throw */
@@ -3939,7 +3946,7 @@ note = "
                                break;
                        }
 
-                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))
+                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))
                                dam = dam * 2 / 3;
 
                        /* Attempt a saving throw */
@@ -4014,7 +4021,7 @@ note = "
                                break;
                        }
 
-                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))
+                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))
                                dam = dam * 2 / 3;
 
                        /* Attempt a saving throw */
@@ -4090,7 +4097,7 @@ note = "
                                break;
                        }
 
-                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))
+                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))
                                dam = dam * 2 / 3;
 
                        /* Attempt a saving throw */
@@ -4186,7 +4193,7 @@ msg_format("%s
                                break;
                        }
 
-                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))
+                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))
                                dam = dam * 2 / 3;
 
                        /* Attempt a saving throw */
@@ -5053,19 +5060,22 @@ note_dies = "
 
                        if ((r_ptr->flags4 & ~(RF4_NOMAGIC_MASK)) || (r_ptr->flags5 & ~(RF5_NOMAGIC_MASK)) || (r_ptr->flags6 & ~(RF6_NOMAGIC_MASK)))
                        {
-                               /* Message */
+                               if (!who)
+                               {
+                                       /* Message */
 #ifdef JP
-msg_format("%s¤«¤éÀº¿À¥¨¥Í¥ë¥®¡¼¤òµÛ¤¤¤È¤Ã¤¿¡£",m_name);
+                                       msg_format("%s¤«¤éÀº¿À¥¨¥Í¥ë¥®¡¼¤òµÛ¤¤¤È¤Ã¤¿¡£", m_name);
 #else
-                               msg_format("You draw psychic energy from %s.", m_name);
+                                       msg_format("You draw psychic energy from %s.", m_name);
 #endif
 
-                               (void)hp_player(dam);
+                                       (void)hp_player(dam);
+                               }
                        }
                        else
                        {
 #ifdef JP
-msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£",m_name);
+                               msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", m_name);
 #else
                                msg_format("%s is unaffected.", m_name);
 #endif
@@ -5080,9 +5090,9 @@ msg_format("%s
                        if (seen) obvious = TRUE;
                        /* Message */
 #ifdef JP
-msg_format("%s¤ò¤¸¤Ã¤Èâˤó¤À¡£",m_name);
+                       if (!who) msg_format("%s¤ò¤¸¤Ã¤Èâˤó¤À¡£", m_name);
 #else
-                       msg_format("You gaze intently at %s.", m_name);
+                       if (!who) msg_format("You gaze intently at %s.", m_name);
 #endif
 
                        if (r_ptr->flagsr & RFR_RES_ALL)
@@ -5108,7 +5118,7 @@ msg_format("%s
                                        if (seen && is_original_ap(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
                                }
 #ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+                               note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
 #else
                                note = "is unaffected!";
 #endif
@@ -5117,8 +5127,8 @@ note = "
                        else
                        {
 #ifdef JP
-msg_format("%s¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£",m_name);
-note_dies = "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£";
+                               msg_format("%s¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£", m_name);
+                               note_dies = "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£";
 #else
                                msg_format("%^s is blasted by psionic energy.", m_name);
                                note_dies = " collapses, a mindless husk.";
@@ -5135,9 +5145,9 @@ note_dies = "
                        if (seen) obvious = TRUE;
                        /* Message */
 #ifdef JP
-msg_format("%s¤ò¤¸¤Ã¤Èâˤó¤À¡£",m_name);
+                       if (!who) msg_format("%s¤ò¤¸¤Ã¤Èâˤó¤À¡£", m_name);
 #else
-                       msg_format("You gaze intently at %s.", m_name);
+                       if (!who) msg_format("You gaze intently at %s.", m_name);
 #endif
 
                        if (r_ptr->flagsr & RFR_RES_ALL)
@@ -5163,7 +5173,7 @@ msg_format("%s
                                        if (seen && is_original_ap(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
                                }
 #ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+                               note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
 #else
                                note = "is unaffected!";
 #endif
@@ -5172,8 +5182,8 @@ note = "
                        else
                        {
 #ifdef JP
-msg_format("%s¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£",m_name);
-note_dies = "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£";
+                               msg_format("%s¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£", m_name);
+                               note_dies = "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£";
 #else
                                msg_format("%^s is blasted by psionic energy.", m_name);
                                note_dies = " collapses, a mindless husk.";
@@ -5194,9 +5204,9 @@ note_dies = "
                        if (seen) obvious = TRUE;
                        /* Message */
 #ifdef JP
-msg_format("%s¤ò»Øº¹¤·¤Æ¼ö¤¤¤ò¤«¤±¤¿¡£",m_name);
+                       if (!who) msg_format("%s¤ò»Øº¹¤·¤Æ¼ö¤¤¤ò¤«¤±¤¿¡£", m_name);
 #else
-                       msg_format("You point at %s and curses.", m_name);
+                       if (!who) msg_format("You point at %s and curse.", m_name);
 #endif
 
                        if (r_ptr->flagsr & RFR_RES_ALL)
@@ -5214,9 +5224,8 @@ msg_format("%s
                        /* Attempt a saving throw */
                        if (randint0(100 + caster_lev) < (r_ptr->level + 35))
                        {
-
 #ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+                               note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
 #else
                                note = "is unaffected!";
 #endif
@@ -5231,9 +5240,9 @@ note = "
                        if (seen) obvious = TRUE;
                        /* Message */
 #ifdef JP
-msg_format("%s¤ò»Øº¹¤·¤Æ¶²¤í¤·¤²¤Ë¼ö¤¤¤ò¤«¤±¤¿¡£",m_name);
+                       if (!who) msg_format("%s¤ò»Øº¹¤·¤Æ¶²¤í¤·¤²¤Ë¼ö¤¤¤ò¤«¤±¤¿¡£", m_name);
 #else
-                       msg_format("You point at %s and curses horribly.", m_name);
+                       if (!who) msg_format("You point at %s and curse horribly.", m_name);
 #endif
 
                        if (r_ptr->flagsr & RFR_RES_ALL)
@@ -5251,9 +5260,8 @@ msg_format("%s
                        /* Attempt a saving throw */
                        if (randint0(100 + caster_lev) < (r_ptr->level + 35))
                        {
-
 #ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+                               note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
 #else
                                note = "is unaffected!";
 #endif
@@ -5268,9 +5276,9 @@ note = "
                        if (seen) obvious = TRUE;
                        /* Message */
 #ifdef JP
-msg_format("%s¤ò»Øº¹¤·¡¢¶²¤·¤²¤Ë¼öʸ¤ò¾§¤¨¤¿¡ª",m_name);
+                       if (!who) msg_format("%s¤ò»Øº¹¤·¡¢¶²¤í¤·¤²¤Ë¼öʸ¤ò¾§¤¨¤¿¡ª", m_name);
 #else
-                       msg_format("You point at %s, incanting terribly!", m_name);
+                       if (!who) msg_format("You point at %s, incanting terribly!", m_name);
 #endif
 
                        if (r_ptr->flagsr & RFR_RES_ALL)
@@ -5288,9 +5296,8 @@ msg_format("%s
                        /* Attempt a saving throw */
                        if (randint0(100 + caster_lev) < (r_ptr->level + 35))
                        {
-
 #ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+                               note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
 #else
                                note = "is unaffected!";
 #endif
@@ -5305,9 +5312,9 @@ note = "
                        if (seen) obvious = TRUE;
                        /* Message */
 #ifdef JP
-msg_format("%s¤ÎÈ빦¤òÆͤ¤¤Æ¡¢¡Ö¤ªÁ°¤Ï´û¤Ë»à¤ó¤Ç¤¤¤ë¡×¤È¶«¤ó¤À¡£",m_name);
+                       if (!who) msg_format("%s¤ÎÈ빦¤òÆͤ¤¤Æ¡¢¡Ö¤ªÁ°¤Ï´û¤Ë»à¤ó¤Ç¤¤¤ë¡×¤È¶«¤ó¤À¡£", m_name);
 #else
-                       msg_format("You point at %s, screaming th word, 'DIE!'.", m_name);
+                       if (!who) msg_format("You point at %s, screaming the word, 'DIE!'.", m_name);
 #endif
 
                        if (r_ptr->flagsr & RFR_RES_ALL)
@@ -5323,11 +5330,10 @@ msg_format("%s
                        }
 
                        /* Attempt a saving throw */
-                       if (randint0(100 + caster_lev) < (r_ptr->level + 35))
+                       if ((randint0(100 + caster_lev) < (r_ptr->level + 35)) && ((who <= 0) || (m_list[who].r_idx != MON_KENSHIROU)))
                        {
-
 #ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+                               note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
 #else
                                note = "is unaffected!";
 #endif
@@ -5389,7 +5395,7 @@ note = "
                {
                        int nokori_hp;
                        if ((p_ptr->inside_quest && (quest[p_ptr->inside_quest].type == QUEST_TYPE_KILL_ALL) && !is_pet(m_ptr)) ||
-                           (r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flags7 & (RF7_UNIQUE_7)) || (r_ptr->flags7 & (RF7_UNIQUE2)) || (r_ptr->flags1 & RF1_QUESTOR))
+                           (r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flags7 & (RF7_NAZGUL)) || (r_ptr->flags7 & (RF7_UNIQUE2)) || (r_ptr->flags1 & RF1_QUESTOR))
                        {
 #ifdef JP
 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£",m_name);
@@ -5692,9 +5698,9 @@ note = "
                case GF_PHOTO:
                {
 #ifdef JP
-                       msg_format("%s¤ò¼Ì¿¿¤Ë»£¤Ã¤¿¡£",m_name);
+                       if (!who) msg_format("%s¤ò¼Ì¿¿¤Ë»£¤Ã¤¿¡£", m_name);
 #else
-                       msg_format("You take a photograph of %s.",m_name);
+                       if (!who) msg_format("You take a photograph of %s.", m_name);
 #endif
                        /* Hurt by light */
                        if (r_ptr->flags3 & (RF3_HURT_LITE))
@@ -5710,8 +5716,8 @@ note = "
 
                                /* Special effect */
 #ifdef JP
-note = "¤Ï¸÷¤Ë¿È¤ò¤¹¤¯¤á¤¿¡ª";
-note_dies = "¤Ï¸÷¤ò¼õ¤±¤Æ¤·¤Ü¤ó¤Ç¤·¤Þ¤Ã¤¿¡ª";
+                               note = "¤Ï¸÷¤Ë¿È¤ò¤¹¤¯¤á¤¿¡ª";
+                               note_dies = "¤Ï¸÷¤ò¼õ¤±¤Æ¤·¤Ü¤ó¤Ç¤·¤Þ¤Ã¤¿¡ª";
 #else
                                note = " cringes from the light!";
                                note_dies = " shrivels away in the light!";
@@ -5874,7 +5880,7 @@ note = "
        if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) do_poly = FALSE;
 
        /* "Unique" and "quest" monsters can only be "killed" by the player. */
-       if (((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7) || (r_ptr->flags1 & RF1_QUESTOR)) && !p_ptr->inside_battle)
+       if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->inside_battle)
        {
                if (who && (dam > m_ptr->hp)) dam = m_ptr->hp;
        }
@@ -5889,7 +5895,7 @@ note = "
        tmp = dam;
        dam = mon_damage_mod(m_ptr, dam, (bool)(typ == GF_PSY_SPEAR));
 #ifdef JP
-       if ((tmp > 0) && (dam == 0)) note = "¤Ï¥À¥á¡¼¥¸¤ò¼õ¤±¤Æ¤¤¤Ê¤¤";
+       if ((tmp > 0) && (dam == 0)) note = "¤Ï¥À¥á¡¼¥¸¤ò¼õ¤±¤Æ¤¤¤Ê¤¤¡£";
 #else
        if ((tmp > 0) && (dam == 0)) note = " is unharmed.";
 #endif
@@ -5900,181 +5906,179 @@ note = "
                /* Extract method of death */
                note = note_dies;
        }
-
-       /* Mega-Hack -- Handle "polymorph" -- monsters get a saving throw */
-       else if (do_poly && (randint1(90) > r_ptr->level))
+       else
        {
-               if (polymorph_monster(y, x))
+               /* Sound and Impact breathers never stun */
+               if (do_stun &&
+                   !(r_ptr->flagsr & (RFR_RES_SOUN | RFR_RES_WALL)) &&
+                   !(r_ptr->flags3 & RF3_NO_STUN))
                {
                        /* Obvious */
                        if (seen) obvious = TRUE;
 
-                       /* Monster polymorphs */
+                       /* Get confused */
+                       if (m_ptr->stunned)
+                       {
 #ifdef JP
-                       note = "¤¬ÊѿȤ·¤¿¡ª";
+                               note = "¤Ï¤Ò¤É¤¯¤â¤¦¤í¤¦¤È¤·¤¿¡£";
 #else
-                       note = " changes!";
+                               note = " is more dazed.";
 #endif
 
+                               tmp = m_ptr->stunned + (do_stun / 2);
+                       }
+                       else
+                       {
+#ifdef JP
+                               note = "¤Ï¤â¤¦¤í¤¦¤È¤·¤¿¡£";
+#else
+                               note = " is dazed.";
+#endif
 
-                       /* Turn off the damage */
-                       dam = 0;
+                               tmp = do_stun;
+                       }
 
-                       /* Hack -- Get new monster */
-                       m_ptr = &m_list[c_ptr->m_idx];
+                       /* Apply stun */
+                       m_ptr->stunned = (tmp < 200) ? tmp : 200;
 
-                       /* Hack -- Get new race */
-                       r_ptr = &r_info[m_ptr->r_idx];
+                       /* Get angry */
+                       get_angry = TRUE;
                }
-               else
+
+               /* Confusion and Chaos breathers (and sleepers) never confuse */
+               if (do_conf &&
+                        !(r_ptr->flags3 & RF3_NO_CONF) &&
+                        !(r_ptr->flagsr & RFR_EFF_RES_CHAO_MASK))
                {
-                       /* No polymorph */
+                       /* Obvious */
+                       if (seen) obvious = TRUE;
+
+                       /* Already partially confused */
+                       if (m_ptr->confused)
+                       {
 #ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª";
+                               note = "¤Ï¤µ¤é¤Ëº®Í𤷤¿¤è¤¦¤À¡£";
 #else
-                       note = " is unaffected!";
+                               note = " looks more confused.";
 #endif
 
-               }
-       }
-
-       /* Handle "teleport" */
-       else if (do_dist)
-       {
-               /* Obvious */
-               if (seen) obvious = TRUE;
+                               tmp = m_ptr->confused + (do_conf / 2);
+                       }
 
-               /* Message */
+                       /* Was not confused */
+                       else
+                       {
 #ifdef JP
-               note = "¤¬¾Ã¤¨µî¤Ã¤¿¡ª";
+                               note = "¤Ïº®Í𤷤¿¤è¤¦¤À¡£";
 #else
-               note = " disappears!";
+                               note = " looks confused.";
 #endif
 
-               chg_virtue(V_VALOUR, -1);
+                               tmp = do_conf;
+                       }
 
-               /* Teleport */
-               teleport_away(c_ptr->m_idx, do_dist, (bool)(!who));
+                       /* Apply confusion */
+                       m_ptr->confused = (tmp < 200) ? tmp : 200;
 
-               /* Hack -- get new location */
-               y = m_ptr->fy;
-               x = m_ptr->fx;
+                       /* Get angry */
+                       get_angry = TRUE;
+               }
 
-               /* Hack -- get new grid */
-               c_ptr = &cave[y][x];
-       }
+               if (do_time)
+               {
+                       /* Obvious */
+                       if (seen) obvious = TRUE;
 
-       /* Sound and Impact resisters never stun */
-       else if (do_stun &&
-           !(r_ptr->flagsr & (RFR_RES_SOUN | RFR_RES_WALL)) &&
-           !(r_ptr->flags3 & RF3_NO_STUN))
-       {
-               /* Obvious */
-               if (seen) obvious = TRUE;
+                       if (do_time >= m_ptr->maxhp) do_time = m_ptr->maxhp - 1;
 
-               /* Get stunned */
-               if (m_ptr->stunned)
-               {
+                       if (do_time)
+                       {
 #ifdef JP
-                       note = "¤Ï¤Ò¤É¤¯¤â¤¦¤í¤¦¤È¤·¤¿¡£";
+                               note = "¤Ï¼å¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£";
 #else
-                       note = " is more dazed.";
+                               note = " seems weakened.";
 #endif
-
-                       tmp = m_ptr->stunned + (do_stun / 2);
+                               m_ptr->maxhp -= do_time;
+                               if ((m_ptr->hp - dam) > m_ptr->maxhp) dam = m_ptr->hp - m_ptr->maxhp;
+                       }
+                       get_angry = TRUE;
                }
-               else
+
+               /* Mega-Hack -- Handle "polymorph" -- monsters get a saving throw */
+               if (do_poly && (randint1(90) > r_ptr->level))
                {
+                       if (polymorph_monster(y, x))
+                       {
+                               /* Obvious */
+                               if (seen) obvious = TRUE;
+
+                               /* Monster polymorphs */
 #ifdef JP
-                       note = "¤Ï¤â¤¦¤í¤¦¤È¤·¤¿¡£";
+                               note = "¤¬ÊѿȤ·¤¿¡ª";
 #else
-                       note = " is dazed.";
+                               note = " changes!";
 #endif
 
-                       tmp = do_stun;
-               }
-
-               /* Apply stun */
-               m_ptr->stunned = (tmp < 200) ? tmp : 200;
-
-               /* Get angry */
-               get_angry = TRUE;
-       }
-
-       /* Confusion and Chaos resisters (and sleepers) never confuse */
-       else if (do_conf &&
-                !(r_ptr->flags3 & RF3_NO_CONF) &&
-                !(r_ptr->flagsr & RFR_EFF_RES_CHAO_MASK))
-       {
-               /* Obvious */
-               if (seen) obvious = TRUE;
-
-               /* Already partially confused */
-               if (m_ptr->confused)
-               {
+                               /* Turn off the damage */
+                               dam = 0;
+                       }
+                       else
+                       {
+                               /* No polymorph */
 #ifdef JP
-                       note = "¤Ï¤µ¤é¤Ëº®Í𤷤¿¤è¤¦¤À¡£";
+                               note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª";
 #else
-                       note = " looks more confused.";
+                               note = " is unaffected!";
 #endif
+                       }
+
+                       /* Hack -- Get new monster */
+                       m_ptr = &m_list[c_ptr->m_idx];
 
-                       tmp = m_ptr->confused + (do_conf / 2);
+                       /* Hack -- Get new race */
+                       r_ptr = &r_info[m_ptr->r_idx];
                }
 
-               /* Was not confused */
-               else
+               /* Handle "teleport" */
+               if (do_dist)
                {
+                       /* Obvious */
+                       if (seen) obvious = TRUE;
+
+                       /* Message */
 #ifdef JP
-                       note = "¤Ïº®Í𤷤¿¤è¤¦¤À¡£";
+                       note = "¤¬¾Ã¤¨µî¤Ã¤¿¡ª";
 #else
-                       note = " looks confused.";
+                       note = " disappears!";
 #endif
 
-                       tmp = do_conf;
-               }
-
-               /* Apply confusion */
-               m_ptr->confused = (tmp < 200) ? tmp : 200;
-
-               /* Get angry */
-               get_angry = TRUE;
-       }
+                       if (!who) chg_virtue(V_VALOUR, -1);
 
-       else if (do_time)
-       {
-               /* Obvious */
-               if (seen) obvious = TRUE;
+                       /* Teleport */
+                       teleport_away(c_ptr->m_idx, do_dist, (bool)(!who));
 
-               if (do_time >= m_ptr->maxhp) do_time = m_ptr->maxhp - 1;
+                       /* Hack -- get new location */
+                       y = m_ptr->fy;
+                       x = m_ptr->fx;
 
-               if (do_time)
-               {
-#ifdef JP
-                       note = "¤Ï¼å¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£";
-#else
-                       note = " seems weakened.";
-#endif
-                       m_ptr->maxhp -= do_time;
-                       if ((m_ptr->hp - dam) > m_ptr->maxhp) dam = m_ptr->hp - m_ptr->maxhp;
+                       /* Hack -- get new grid */
+                       c_ptr = &cave[y][x];
                }
-               get_angry = TRUE;
-       }
-
 
-       /* Fear */
-       if (do_fear)
-       {
-               /* Increase fear */
-               tmp = m_ptr->monfear + do_fear;
+               /* Fear */
+               if (do_fear)
+               {
+                       /* Increase fear */
+                       tmp = m_ptr->monfear + do_fear;
 
-               /* Set fear */
-               m_ptr->monfear = (tmp < 200) ? tmp : 200;
+                       /* Set fear */
+                       m_ptr->monfear = (tmp < 200) ? tmp : 200;
 
-               /* Get angry */
-               get_angry = TRUE;
+                       /* Get angry */
+                       get_angry = TRUE;
+               }
        }
 
-
        /* If another monster did the damage, hurt the monster by hand */
        if (who)
        {
@@ -6085,6 +6089,8 @@ note = "
                /* Wake the monster up */
                m_ptr->csleep = 0;
 
+               if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+
                /* Hurt the monster */
                m_ptr->hp -= dam;
 
@@ -6478,19 +6484,27 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
 
 
                /* Choose 'new' target */
-               do
+               if (who > 0)
                {
-                       t_y = m_list[who].fy - 1 + randint1(3);
-                       t_x = m_list[who].fx - 1 + randint1(3);
-                       max_attempts--;
-               }
-               while (max_attempts && in_bounds2u(t_y, t_x) &&
-                    !(player_has_los_bold(t_y, t_x)));
+                       do
+                       {
+                               t_y = m_list[who].fy - 1 + randint1(3);
+                               t_x = m_list[who].fx - 1 + randint1(3);
+                               max_attempts--;
+                       }
+                       while (max_attempts && in_bounds2u(t_y, t_x) &&
+                            !(player_has_los_bold(t_y, t_x)));
 
-               if (max_attempts < 1)
+                       if (max_attempts < 1)
+                       {
+                               t_y = m_list[who].fy;
+                               t_x = m_list[who].fx;
+                       }
+               }
+               else
                {
-                       t_y = m_list[who].fy;
-                       t_x = m_list[who].fx;
+                       t_y = py - 1 + randint1(3);
+                       t_x = px - 1 + randint1(3);
                }
 
                project(0, 0, t_y, t_x, dam, typ, (PROJECT_STOP|PROJECT_KILL|PROJECT_REFLECTABLE), monspell);
@@ -6524,13 +6538,29 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
                /* Get the monster's real name (gotten before polymorph!) */
                strcpy(killer, who_name);
        }
-       else if (who < 0)
+       else
        {
+               switch (who)
+               {
+               case PROJECT_WHO_UNCTRL_POWER:
+#ifdef JP
+                       strcpy(killer, "À©¸æ¤Ç¤­¤Ê¤¤ÎϤÎÈÅή");
+#else
+                       strcpy(killer, "uncontrollable power storm");
+#endif
+                       break;
+
+               default:
 #ifdef JP
-               strcpy(killer, "æ«");
+                       strcpy(killer, "æ«");
 #else
-               strcpy(killer, "a trap");
+                       strcpy(killer, "a trap");
 #endif
+                       break;
+               }
+
+               /* Paranoia */
+               strcpy(m_name, killer);
        }
 
        /* Analyze the damage */
@@ -6725,7 +6755,7 @@ if (fuzzy) msg_print("
                case GF_PLASMA:
                {
 #ifdef JP
-if (fuzzy) msg_print("²¿¤«¤È¤Æ¤âÇ®¤¤¤â¤Î¤Ç¤Ç¹¶·â¤µ¤ì¤¿¡ª");
+                       if (fuzzy) msg_print("²¿¤«¤È¤Æ¤âÇ®¤¤¤â¤Î¤Ç¹¶·â¤µ¤ì¤¿¡ª");
 #else
                        if (fuzzy) msg_print("You are hit by something *HOT*!");
 #endif
@@ -6935,7 +6965,7 @@ if (fuzzy) msg_print("
                case GF_DISENCHANT:
                {
 #ifdef JP
-if (fuzzy) msg_print("²¿¤«¤µ¤¨¤Ê¤¤¤â¤Î¤Ç¤Ç¹¶·â¤µ¤ì¤¿¡ª");
+                       if (fuzzy) msg_print("²¿¤«¤µ¤¨¤Ê¤¤¤â¤Î¤Ç¹¶·â¤µ¤ì¤¿¡ª");
 #else
                        if (fuzzy) msg_print("You are hit by something static!");
 #endif
@@ -7216,8 +7246,8 @@ msg_print("
                case GF_GRAVITY:
                {
 #ifdef JP
-if (fuzzy) msg_print("²¿¤«½Å¤¤¤â¤Î¤Ç¤Ç¹¶·â¤µ¤ì¤¿¡ª");
-msg_print("¼þÊդνÅÎϤ¬¤æ¤¬¤ó¤À¡£");
+                       if (fuzzy) msg_print("²¿¤«½Å¤¤¤â¤Î¤Ç¹¶·â¤µ¤ì¤¿¡ª");
+                       msg_print("¼þÊդνÅÎϤ¬¤æ¤¬¤ó¤À¡£");
 #else
                        if (fuzzy) msg_print("You are hit by something heavy!");
                        msg_print("Gravity warps around you.");
@@ -7638,7 +7668,7 @@ msg_format("
 #ifdef JP
 msg_print("¤¢¤Ê¤¿¤ÏÌ¿¤¬Çö¤Þ¤Ã¤Æ¤¤¤¯¤è¤¦¤Ë´¶¤¸¤¿¡ª");
 #else
-                               msg_print("Your feel your life fade away!");
+                               msg_print("You feel your life fade away!");
 #endif
 
                                get_damage = take_hit(DAMAGE_ATTACK, dam, m_name, MS_HAND_DOOM);
@@ -7659,7 +7689,7 @@ msg_print("
                }
        }
 
-       if (p_ptr->tim_eyeeye && get_damage > 0 && !p_ptr->is_dead)
+       if (p_ptr->tim_eyeeye && get_damage > 0 && !p_ptr->is_dead && (who > 0))
        {
 #ifdef JP
                msg_format("¹¶·â¤¬%s¼«¿È¤ò½ý¤Ä¤±¤¿¡ª", m_name);
@@ -7962,13 +7992,13 @@ static bool do_disintegration(int by, int bx, int y, int x)
 
        /* Disintegration balls explosions are stopped by perma-walls */
        if (!in_disintegration_range(by, bx, y, x)) return FALSE;
-                                               
-       /* Permanent walls and artifacts don't get effect */
-       /* But not protect monsters and other objects */
-       if (!cave_valid_bold(y, x)) return TRUE;
 
        /* Destroy mirror/glyph */
-       remove_mirror(y,x);
+       remove_mirror(y, x);
+
+       /* Permanent walls and artifacts don't get effect */
+       /* But not protect monsters and other objects */
+       if (cave_perma_bold(y, x)) return TRUE;
 
        feat = cave[y][x].feat;
 
@@ -8000,8 +8030,7 @@ void breath_shape(u16b *path_g, int dist, int *pgrids, byte *gx, byte *gy, byte
        int bdis = 0;
        int cdis;
        int path_n = 0;
-       int tdis = distance(y1, x1, y2, x2);
-       int mdis = tdis + rad;
+       int mdis = distance(y1, x1, y2, x2) + rad;
 
        while (bdis <= mdis)
        {
@@ -8683,7 +8712,7 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                }
 
                /* Only do visuals if requested */
-               if (!blind && !(flg & (PROJECT_HIDE)) && !(flg & PROJECT_FAST))
+               if (!blind && !(flg & (PROJECT_HIDE | PROJECT_FAST)))
                {
                        /* Only do visuals if the player can "see" the bolt */
                        if (panel_contains(y, x) && player_has_los_bold(y, x))
@@ -8735,14 +8764,16 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                }
        }
 
+       path_n = i;
+
        /* Save the "blast epicenter" */
        by = y;
        bx = x;
 
-       if (breath && (y1 == by) && (x1 == bx))
+       if (breath && !path_n)
        {
                breath = FALSE;
-               gm_rad = 1;
+               gm_rad = rad;
                if (!old_hide)
                {
                        flg &= ~(PROJECT_HIDE);
@@ -9035,9 +9066,8 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                                        }
 
                                        /* Reflected bolts randomly target either one */
-                                       flg &= ~(PROJECT_MONSTER | PROJECT_PLAYER);
-                                       if (one_in_(2)) flg |= PROJECT_MONSTER;
-                                       else flg |= PROJECT_PLAYER;
+                                       if (one_in_(2)) flg |= PROJECT_PLAYER;
+                                       else flg &= ~(PROJECT_PLAYER);
 
                                        /* The bolt is reflected */
                                        project(cave[y][x].m_idx, 0, t_y, t_x, dam, typ, flg, monspell);
@@ -9065,7 +9095,7 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                                /* Aimed on the player */
                                if (flg & PROJECT_PLAYER)
                                {
-                                       if (flg & (PROJECT_BEAM | PROJECT_REFLECTABLE))
+                                       if (flg & (PROJECT_BEAM | PROJECT_REFLECTABLE | PROJECT_AIMED))
                                        {
                                                /*
                                                 * A beam or bolt is well aimed
@@ -9086,8 +9116,9 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
 
                                /*
                                 * This grid is the original target.
+                                * Or aimed on your horse.
                                 */
-                               else if ((y == y2) || (x == x2))
+                               else if (((y == y2) && (x == x2)) || (flg & PROJECT_AIMED))
                                {
                                        /* Hit the mount with full damage */
                                }
@@ -9111,9 +9142,8 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                                        else
                                        {
                                                /* Hit the player later */
-                                               flg &= ~(PROJECT_MONSTER);
                                                flg |= PROJECT_PLAYER;
-                                                       
+
                                                /* Don't affect the mount */
                                                continue;
                                        }
@@ -9205,8 +9235,10 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                                 *
                                 * But already choosen to hit the
                                 * mount at this point.
+                                *
+                                * Or aimed on your horse.
                                 */
-                               else if (flg & (PROJECT_BEAM | PROJECT_REFLECTABLE))
+                               else if (flg & (PROJECT_BEAM | PROJECT_REFLECTABLE | PROJECT_AIMED))
                                {
                                        /*
                                         * A beam or bolt is well aimed