}
}
+ /* 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;
}
/* 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;
}
case GF_IDENTIFY:
{
identify_item(o_ptr);
+
+ /* Auto-inscription */
+ auto_inscribe_item(-this_o_idx, is_autopick(o_ptr));
break;
}
monster_race *r_ptr = &r_info[m_ptr->r_idx];
- char killer [80];
+ char killer[80];
/* Is the monster "seen"? */
bool seen = m_ptr->ml;
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;
- int caster_lev = (who > 0) ? (r_info[m_list[who].r_idx].level / 2) : p_ptr->lev;
+ int caster_lev = (who > 0) ? r_info[m_list[who].r_idx].level : p_ptr->lev * 2;
/* Nobody here */
if (!c_ptr->m_idx) return (FALSE);
#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 */
}
/* 2. stun */
- do_stun = damroll((caster_lev / 10) + 3 , (dam)) + 1;
+ do_stun = damroll((caster_lev / 20) + 3 , (dam)) + 1;
/* Attempt a saving throw */
if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
}
/* 1. stun */
- do_stun = damroll((caster_lev / 10) + 3 , dam) + 1;
+ do_stun = damroll((caster_lev / 20) + 3 , dam) + 1;
/* Attempt a saving throw */
if ((r_ptr->flags1 & RF1_UNIQUE) ||
}
else if (((r_ptr->flags1 & RF1_UNIQUE) &&
(randint1(888) != 666)) ||
- (((r_ptr->level + randint1(20)) > randint1(caster_lev + randint1(10))) &&
+ (((r_ptr->level + randint1(20)) > randint1((caster_lev / 2) + randint1(10))) &&
randint1(100) != 66))
{
#ifdef JP
{
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 = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
/* 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
/* 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
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 */
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 */
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 */
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 */
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 */
if (seen && is_original_ap(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
break;
}
- do_stun = damroll((caster_lev / 10) + 3 , (dam)) + 1;
+ do_stun = damroll((caster_lev / 20) + 3 , (dam)) + 1;
/* Attempt a saving throw */
if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
if ((r_ptr->flags4 & ~(RF4_NOMAGIC_MASK)) || (r_ptr->flags5 & ~(RF5_NOMAGIC_MASK)) || (r_ptr->flags6 & ~(RF6_NOMAGIC_MASK)))
{
- /* Message */
+ if (who > 0)
+ {
+ monster_type *caster_ptr = &m_list[who];
+
+ /* Heal the monster */
+ if (caster_ptr->hp < caster_ptr->maxhp)
+ {
+ /* Heal */
+ caster_ptr->hp += 6 * dam;
+ if (caster_ptr->hp > caster_ptr->maxhp) caster_ptr->hp = caster_ptr->maxhp;
+
+ /* Redraw (later) if needed */
+ if (p_ptr->health_who == who) p_ptr->redraw |= (PR_HEALTH);
+ if (p_ptr->riding == who) p_ptr->redraw |= (PR_UHEALTH);
+
+ /* Special message */
+ if (caster_ptr->ml)
+ {
+ /* Get the monster name */
+ monster_desc(killer, caster_ptr, 0);
+#ifdef JP
+ msg_format("%^s¤Ïµ¤Ê¬¤¬Îɤµ¤½¤¦¤À¡£", killer);
+#else
+ msg_format("%^s appears healthier.", killer);
+#endif
+ }
+ }
+ }
+ else
+ {
+ /* 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
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)
/* Attempt a saving throw */
if ((r_ptr->flags1 & RF1_UNIQUE) ||
(r_ptr->flags3 & RF3_NO_CONF) ||
- (r_ptr->level > randint1((caster_lev*2 - 10) < 1 ? 1 : (caster_lev*2 - 10)) + 10))
+ (r_ptr->level > randint1((caster_lev - 10) < 1 ? 1 : (caster_lev - 10)) + 10))
{
/* Memorize a flag */
if (r_ptr->flags3 & (RF3_NO_CONF))
if (seen && is_original_ap(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
}
#ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+ note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
#else
note = "is unaffected!";
#endif
dam = 0;
}
+ else if (r_ptr->flags2 & RF2_EMPTY_MIND)
+ {
+ if (seen && is_original_ap(m_ptr)) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
+#ifdef JP
+ note = "¤Ë¤Ï´°Á´¤ÊÂÑÀ¤¬¤¢¤ë¡ª";
+#else
+ note = " is immune!";
+#endif
+ dam = 0;
+ }
+ else if (r_ptr->flags2 & RF2_WEIRD_MIND)
+ {
+ if (seen && is_original_ap(m_ptr)) r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
+#ifdef JP
+ note = "¤Ë¤ÏÂÑÀ¤¬¤¢¤ë¡£";
+#else
+ note = " resists.";
+#endif
+ dam /= 3;
+ }
else
{
#ifdef JP
-msg_format("%s¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£",m_name);
-note_dies = "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£";
+ note = "¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£";
+ note_dies = "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£";
#else
- msg_format("%^s is blasted by psionic energy.", m_name);
+ note = " is blasted by psionic energy.";
note_dies = " collapses, a mindless husk.";
#endif
- do_conf = randint0(8) + 8;
+ if (who > 0) do_conf = randint0(4) + 4;
+ else do_conf = randint0(8) + 8;
}
break;
}
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)
/* Attempt a saving throw */
if ((r_ptr->flags1 & RF1_UNIQUE) ||
(r_ptr->flags3 & RF3_NO_CONF) ||
- (r_ptr->level > randint1((caster_lev*2 - 10) < 1 ? 1 : (caster_lev*2 - 10)) + 10))
+ (r_ptr->level > randint1((caster_lev - 10) < 1 ? 1 : (caster_lev - 10)) + 10))
{
/* Memorize a flag */
if (r_ptr->flags3 & (RF3_NO_CONF))
if (seen && is_original_ap(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
}
#ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+ note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
#else
note = "is unaffected!";
#endif
dam = 0;
}
+ else if (r_ptr->flags2 & RF2_EMPTY_MIND)
+ {
+ if (seen && is_original_ap(m_ptr)) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
+#ifdef JP
+ note = "¤Ë¤Ï´°Á´¤ÊÂÑÀ¤¬¤¢¤ë¡ª";
+#else
+ note = " is immune!";
+#endif
+ dam = 0;
+ }
+ else if (r_ptr->flags2 & RF2_WEIRD_MIND)
+ {
+ if (seen && is_original_ap(m_ptr)) r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
+#ifdef JP
+ note = "¤Ë¤ÏÂÑÀ¤¬¤¢¤ë¡£";
+#else
+ note = " resists.";
+#endif
+ dam /= 3;
+ }
else
{
#ifdef JP
-msg_format("%s¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£",m_name);
-note_dies = "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£";
+ note = "¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£";
+ note_dies = "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£";
#else
- msg_format("%^s is blasted by psionic energy.", m_name);
+ note = " is blasted by psionic energy.";
note_dies = " collapses, a mindless husk.";
#endif
- do_conf = randint0(8) + 8;
- do_stun = randint0(8) + 8;
+ if (who > 0)
+ {
+ do_conf = randint0(4) + 4;
+ do_stun = randint0(4) + 4;
+ }
+ else
+ {
+ do_conf = randint0(8) + 8;
+ do_stun = randint0(8) + 8;
+ }
m_ptr->slow = MIN(200, m_ptr->slow + 10);
if (c_ptr->m_idx == p_ptr->riding)
p_ptr->update |= (PU_BONUS);
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 curses.", m_name);
#endif
if (r_ptr->flagsr & RFR_RES_ALL)
}
/* Attempt a saving throw */
- if (randint0(100 + caster_lev) < (r_ptr->level + 35))
+ if (randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35))
{
-
#ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+ note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
#else
note = "is unaffected!";
#endif
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 curses horribly.", m_name);
#endif
if (r_ptr->flagsr & RFR_RES_ALL)
}
/* Attempt a saving throw */
- if (randint0(100 + caster_lev) < (r_ptr->level + 35))
+ if (randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35))
{
-
#ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+ note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
#else
note = "is unaffected!";
#endif
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)
}
/* Attempt a saving throw */
- if (randint0(100 + caster_lev) < (r_ptr->level + 35))
+ if (randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35))
{
-
#ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+ note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
#else
note = "is unaffected!";
#endif
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)
}
/* Attempt a saving throw */
- if (randint0(100 + caster_lev) < (r_ptr->level + 35))
+ if ((randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35)) && ((who <= 0) || (m_list[who].r_idx != MON_KENSHIROU)))
{
-
#ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+ note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
#else
note = "is unaffected!";
#endif
if (r_ptr->flags1 & RF1_UNIQUE)
{
#ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª";
+ note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª";
#else
note = "is unaffected!";
#endif
}
else
{
- if ((caster_lev + randint1(dam)) >
- (r_ptr->level + randint1(200)))
- {
- dam = ((40 + randint1(20)) * m_ptr->hp) / 100;
+ if ((who > 0) ? ((caster_lev + randint1(dam)) > (r_ptr->level + 10 + randint1(20))) :
+ (((caster_lev / 2) + randint1(dam)) > (r_ptr->level + randint1(200))))
+ {
+ dam = ((40 + randint1(20)) * m_ptr->hp) / 100;
- if (m_ptr->hp < dam) dam = m_ptr->hp - 1;
- }
- else
- {
+ if (m_ptr->hp < dam) dam = m_ptr->hp - 1;
+ }
+ else
+ {
#ifdef JP
-note = "¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª";
+ note = "¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª";
#else
- note = "resists!";
+ note = "resists!";
#endif
- dam = 0;
- }
+ dam = 0;
}
+ }
break;
}
{
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) || m_ptr->parent_m_idx)
{
#ifdef JP
msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£",m_name);
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))
/* Special effect */
#ifdef JP
-note = "¤Ï¸÷¤Ë¿È¤ò¤¹¤¯¤á¤¿¡ª";
-note_dies = "¤Ï¸÷¤ò¼õ¤±¤Æ¤·¤Ü¤ó¤Ç¤·¤Þ¤Ã¤¿¡ª";
+ note = "¤Ï¸÷¤Ë¿È¤ò¤¹¤¯¤á¤¿¡ª";
+ note_dies = "¤Ï¸÷¤ò¼õ¤±¤Æ¤·¤Ü¤ó¤Ç¤·¤Þ¤Ã¤¿¡ª";
#else
note = " cringes from the light!";
note_dies = " shrivels away in the light!";
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;
}
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
}
+ if (typ == GF_DRAIN_MANA)
+ {
+ /* Drain mana does nothing */
+ }
+
/* If another monster did the damage, hurt the monster by hand */
- if (who)
+ else if (who)
{
/* Redraw (later) if needed */
if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
/* 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;
delete_monster_idx(c_ptr->m_idx);
}
+
/* If the player did it, give him experience, check fear */
- else if (typ != GF_DRAIN_MANA)
+ else
{
bool fear = FALSE;
break;
}
+ /* Drain mana */
+ case GF_DRAIN_MANA:
+ {
+ if (p_ptr->csp)
+ {
+ /* Basic message */
+#ifdef JP
+ if (who > 0) msg_format("%^s¤ËÀº¿À¥¨¥Í¥ë¥®¡¼¤òµÛ¤¤¼è¤é¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª", m_name);
+ else msg_print("Àº¿À¥¨¥Í¥ë¥®¡¼¤òµÛ¤¤¼è¤é¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
+#else
+ if (who > 0) msg_format("%^s draws psychic energy from you!", m_name);
+ else msg_print("Your psychic energy is drawn!");
+#endif
+
+ /* Full drain */
+ if (dam >= p_ptr->csp)
+ {
+ dam = p_ptr->csp;
+ p_ptr->csp = 0;
+ p_ptr->csp_frac = 0;
+ }
+
+ /* Partial drain */
+ else
+ {
+ p_ptr->csp -= dam;
+ }
+
+ learn_spell(monspell);
+
+ /* Redraw mana */
+ p_ptr->redraw |= (PR_MANA);
+
+ /* Window stuff */
+ p_ptr->window |= (PW_PLAYER);
+ p_ptr->window |= (PW_SPELL);
+
+ if (who > 0)
+ {
+ /* Heal the monster */
+ if (m_ptr->hp < m_ptr->maxhp)
+ {
+ /* Heal */
+ m_ptr->hp += (6 * dam);
+ if (m_ptr->hp > m_ptr->maxhp) m_ptr->hp = m_ptr->maxhp;
+
+ /* Redraw (later) if needed */
+ if (p_ptr->health_who == who) p_ptr->redraw |= (PR_HEALTH);
+ if (p_ptr->riding == who) p_ptr->redraw |= (PR_UHEALTH);
+
+ /* Special message */
+ if (m_ptr->ml)
+ {
+#ifdef JP
+ msg_format("%^s¤Ïµ¤Ê¬¤¬Îɤµ¤½¤¦¤À¡£", m_name);
+#else
+ msg_format("%^s appears healthier.", m_name);
+#endif
+ }
+ }
+ }
+ }
+
+ dam = 0;
+ break;
+ }
+
/* Mind blast */
case GF_MIND_BLAST:
{
if (randint0(100 + rlev/2) < (MAX(5, p_ptr->skill_sav)))
{
#ifdef JP
-msg_print("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
+ msg_print("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
#else
msg_print("You resist the effects!");
#endif
- learn_spell(MS_MIND_BLAST);
+ learn_spell(monspell);
}
else
{
#ifdef JP
-msg_print("ÎîŪ¥¨¥Í¥ë¥®¡¼¤ÇÀº¿À¤¬¹¶·â¤µ¤ì¤¿¡£");
+ msg_print("ÎîŪ¥¨¥Í¥ë¥®¡¼¤ÇÀº¿À¤¬¹¶·â¤µ¤ì¤¿¡£");
#else
msg_print("Your mind is blasted by psyonic energy.");
#endif
}
p_ptr->redraw |= PR_MANA;
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, MS_MIND_BLAST);
+ get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
+
/* Brain smash */
case GF_BRAIN_SMASH:
{
if (randint0(100 + rlev/2) < (MAX(5, p_ptr->skill_sav)))
{
#ifdef JP
-msg_print("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
+ msg_print("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
#else
msg_print("You resist the effects!");
#endif
- learn_spell(MS_BRAIN_SMASH);
+ learn_spell(monspell);
}
else
{
#ifdef JP
-msg_print("ÎîŪ¥¨¥Í¥ë¥®¡¼¤ÇÀº¿À¤¬¹¶·â¤µ¤ì¤¿¡£");
+ msg_print("ÎîŪ¥¨¥Í¥ë¥®¡¼¤ÇÀº¿À¤¬¹¶·â¤µ¤ì¤¿¡£");
#else
msg_print("Your mind is blasted by psionic energy.");
#endif
}
p_ptr->redraw |= PR_MANA;
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, MS_BRAIN_SMASH);
+ get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
if (!p_ptr->resist_blind)
{
(void)set_blind(p_ptr->blind + 8 + randint0(8));
}
break;
}
+
/* cause 1 */
case GF_CAUSE_1:
{
if (randint0(100 + rlev/2) < p_ptr->skill_sav)
{
#ifdef JP
-msg_print("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
+ msg_print("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
#else
msg_print("You resist the effects!");
#endif
- learn_spell(MS_CAUSE_1);
+ learn_spell(monspell);
}
else
{
curse_equipment(15, 0);
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, MS_CAUSE_1);
+ get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
+
/* cause 2 */
case GF_CAUSE_2:
{
if (randint0(100 + rlev/2) < p_ptr->skill_sav)
{
#ifdef JP
-msg_print("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
+ msg_print("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
#else
msg_print("You resist the effects!");
#endif
- learn_spell(MS_CAUSE_2);
+ learn_spell(monspell);
}
else
{
curse_equipment(25, MIN(rlev/2-15, 5));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, MS_CAUSE_2);
+ get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
+
/* cause 3 */
case GF_CAUSE_3:
{
if (randint0(100 + rlev/2) < p_ptr->skill_sav)
{
#ifdef JP
-msg_print("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
+ msg_print("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
#else
msg_print("You resist the effects!");
#endif
- learn_spell(MS_CAUSE_3);
+ learn_spell(monspell);
}
else
{
curse_equipment(33, MIN(rlev/2-15, 15));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, MS_CAUSE_3);
+ get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
+
/* cause 4 */
case GF_CAUSE_4:
{
if ((randint0(100 + rlev/2) < p_ptr->skill_sav) && !(m_ptr->r_idx == MON_KENSHIROU))
{
#ifdef JP
-msg_print("¤·¤«¤·È빦¤òÄ·¤ÍÊÖ¤·¤¿¡ª");
+ msg_print("¤·¤«¤·È빦¤òÄ·¤ÍÊÖ¤·¤¿¡ª");
#else
msg_print("You resist the effects!");
#endif
- learn_spell(MS_CAUSE_4);
+ learn_spell(monspell);
}
else
{
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, MS_CAUSE_4);
+ get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
(void)set_cut(p_ptr->cut + damroll(10, 10));
}
break;
}
+
/* Hand of Doom */
case GF_HAND_DOOM:
{
if (randint0(100 + rlev/2) < p_ptr->skill_sav)
{
#ifdef JP
-msg_format("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
+ msg_format("¤·¤«¤·¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª");
#else
msg_format("You resist the effects!");
#endif
- learn_spell(MS_HAND_DOOM);
-
+ learn_spell(monspell);
}
else
{
#ifdef JP
-msg_print("¤¢¤Ê¤¿¤ÏÌ¿¤¬Çö¤Þ¤Ã¤Æ¤¤¤¯¤è¤¦¤Ë´¶¤¸¤¿¡ª");
+ 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);
+ get_damage = take_hit(DAMAGE_ATTACK, dam, m_name, monspell);
curse_equipment(40, 20);
if (p_ptr->chp < 1) p_ptr->chp = 1;
monster_target_y=py;
monster_target_x=px;
- /* Initialize with nul string */
- who_name[0] = '\0';
-
/* Hack -- Jump to target */
if (flg & (PROJECT_JUMP))
{
}
/* 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))
}
/* 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);
/* 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
/*
* 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 */
}
else
{
/* Hit the player later */
- flg &= ~(PROJECT_MONSTER);
flg |= PROJECT_PLAYER;
-
+
/* Don't affect the mount */
continue;
}
*
* 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