OSDN Git Service

Weaponsmiths can drain lite essence according to lite radius of draining objects
[hengband/hengband.git] / src / spells1.c
index 90b4b1d..c47957b 100644 (file)
@@ -1782,7 +1782,7 @@ static bool project_m(int who, int r, int y, int x, int dam, int typ, int flg, b
 #endif
 
 
-       if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) disturb(1, 0);
+       if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) disturb(1, 1);
 
        /* Analyze the damage type */
        switch (typ)
@@ -2974,10 +2974,12 @@ note_dies = "
                        {
                                int b = damroll(5, dam) / 4;
 #ifdef JP
-                               msg_format("¤¢¤Ê¤¿¤Ï%s¤Î¶ìÄˤòĶǽÎϥѥ¤ËÊÑ´¹¤·¤¿¡ª", m_name);
+                               cptr str = (p_ptr->pclass == CLASS_MINDCRAFTER) ? "ĶǽÎϥѥ" : "ËâÎÏ";
+                               msg_format("¤¢¤Ê¤¿¤Ï%s¤Î¶ìÄˤò%s¤ËÊÑ´¹¤·¤¿¡ª", m_name, str);
 #else
-                               msg_format("You convert %s%s pain into psychic energy!",
-                                   m_name, (seen ? "'s" : "s"));
+                               cptr str = (p_ptr->pclass == CLASS_MINDCRAFTER) ? "psychic energy" : "mana";
+                               msg_format("You convert %s%s pain into %s!",
+                                   m_name, (seen ? "'s" : "s"), str);
 #endif
 
                                b = MIN(p_ptr->msp, p_ptr->csp + b);
@@ -3379,7 +3381,7 @@ note = "
                {
                        if (seen) obvious = TRUE;
 
-                       if (is_pet(m_ptr) || (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)))
+                       if ((p_ptr->inside_arena) || is_pet(m_ptr) || (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)))
                        {
 #ifdef JP
 note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
@@ -6024,7 +6026,7 @@ note = "
                                }
                        }
 
-                       monster_gain_exp(who, m_ptr->r_idx);
+                       if (who > 0) monster_gain_exp(who, m_ptr->r_idx);
 
                        /* Generate treasure, etc */
                        monster_death(c_ptr->m_idx, FALSE);
@@ -6274,7 +6276,7 @@ msg_print("
        {
                if (!who)
                {
-                       if (!projectable(m_ptr->fy, m_ptr->fx, py, px) && !(flg & PROJECT_NO_HANGEKI))
+                       if (!(flg & PROJECT_NO_HANGEKI))
                        {
                                set_target(m_ptr, monster_target_y, monster_target_x);
                        }
@@ -6422,7 +6424,7 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
 
                project(0, 0, t_y, t_x, dam, typ, (PROJECT_STOP|PROJECT_KILL|PROJECT_REFLECTABLE), monspell);
 
-               disturb(1, 0);
+               disturb(1, 1);
                return TRUE;
        }
 
@@ -6496,7 +6498,7 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
                        if (fuzzy) msg_print("You are hit by acid!");
 #endif
                        
-                       get_damage = acid_dam(dam, killer, monspell);
+                       get_damage = acid_dam(dam, killer, monspell, FALSE);
                        break;
                }
 
@@ -6509,7 +6511,7 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
                        if (fuzzy) msg_print("You are hit by fire!");
 #endif
 
-                       get_damage = fire_dam(dam, killer, monspell);
+                       get_damage = fire_dam(dam, killer, monspell, FALSE);
                        break;
                }
 
@@ -6522,7 +6524,7 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
                        if (fuzzy) msg_print("You are hit by cold!");
 #endif
 
-                       get_damage = cold_dam(dam, killer, monspell);
+                       get_damage = cold_dam(dam, killer, monspell, FALSE);
                        break;
                }
 
@@ -6535,7 +6537,7 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
                        if (fuzzy) msg_print("You are hit by lightning!");
 #endif
 
-                       get_damage = elec_dam(dam, killer, monspell);
+                       get_damage = elec_dam(dam, killer, monspell, FALSE);
                        break;
                }
 
@@ -7346,7 +7348,7 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
                        if (fuzzy) msg_print("You are hit by something sharp and cold!");
 #endif
 
-                       cold_dam(dam, killer, monspell);
+                       get_damage = cold_dam(dam, killer, monspell, FALSE);
                        if (!CHECK_MULTISHADOW())
                        {
                                if (!p_ptr->resist_shard)
@@ -7714,7 +7716,11 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
                }
        }
 
-       if (p_ptr->tim_eyeeye && (get_damage > 0) && !p_ptr->is_dead && (who > 0))
+       /* Hex - revenge damage stored */
+       revenge_store(get_damage);
+
+       if ((p_ptr->tim_eyeeye || hex_spelling(HEX_EYE_FOR_EYE))
+               && (get_damage > 0) && !p_ptr->is_dead && (who > 0))
        {
 #ifdef JP
                msg_format("¹¶·â¤¬%s¼«¿È¤ò½ý¤Ä¤±¤¿¡ª", m_name);
@@ -7727,7 +7733,7 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
                msg_format("The attack of %s has wounded %s!", m_name, m_name_self);
 #endif
                project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
-               set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
+               if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
        }
 
        if (p_ptr->riding && dam > 0)
@@ -7737,7 +7743,7 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
 
 
        /* Disturb */
-       disturb(1, 0);
+       disturb(1, 1);
 
 
        if ((p_ptr->special_defense & NINJA_KAWARIMI) && dam && who && (who != p_ptr->riding))