}
}
+ /* 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;
}
#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 */
/* 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;
}
{
/* Message */
#ifdef JP
-msg_print("²¿¤«¤¬¤Ä¤Ã¤«¤¨¤Æ¥É¥¢¤¬³«¤«¤Ê¤¤¡£");
+ msg_print("¥É¥¢¤Ë²¿¤«¤¬¤Ä¤Ã¤«¤¨¤Æ³«¤«¤Ê¤¯¤Ê¤Ã¤¿¡£");
#else
msg_print("The door seems stuck.");
#endif
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;
}
#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);
#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;
}
#ifdef JP
note_kill = "À¸¤Ê֤ä¿¡£";
#else
- note_kill = "rivived.";
+ note_kill = " revived.";
#endif
}
else if (!note_kill)
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;
#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 */
{
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
/* 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);
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 ((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
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)
if (seen && is_original_ap(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
}
#ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+ note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
#else
note = "is unaffected!";
#endif
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.";
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)
if (seen && is_original_ap(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
}
#ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+ note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
#else
note = "is unaffected!";
#endif
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.";
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)
/* Attempt a saving throw */
if (randint0(100 + caster_lev) < (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 curse horribly.", m_name);
#endif
if (r_ptr->flagsr & RFR_RES_ALL)
/* Attempt a saving throw */
if (randint0(100 + caster_lev) < (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))
{
-
#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) < (r_ptr->level + 35)) && ((who <= 0) || (m_list[who].r_idx != MON_KENSHIROU)))
{
-
#ifdef JP
-note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
+ note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
#else
note = "is unaffected!";
#endif
{
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);
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
/* 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)
{
/* 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;
/* 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);
/* 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 */
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
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
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.");
#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);
}
}
- 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);
/* 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;
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)
{
}
/* 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))
}
}
+ 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);
}
/* 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