info[i++] = "";
#ifdef JP
- sprintf(Dummy, "¸½ºß¤Î°À : %s(%ld)", your_alignment(), p_ptr->align);
+ sprintf(Dummy, "¸½ºß¤Î°À : %s(%ld)", your_alignment(), (long int)p_ptr->align);
#else
- sprintf(Dummy, "Your alighnment : %s(%ld)", your_alignment(), p_ptr->align);
+ sprintf(Dummy, "Your alighnment : %s(%ld)", your_alignment(), (long int)p_ptr->align);
#endif
strcpy(buf[1], Dummy);
info[i++] = buf[1];
info[i++] = Dummy;
break;
- case RACE_KUTA:
+ case RACE_KUTAR:
if (plev > 19)
#ifdef JP
info[i++] = "¤¢¤Ê¤¿¤Ï d20+30 ¥¿¡¼¥ó¤Î´Ö²£¤Ë¿¤Ó¤ë¤³¤È¤¬¤Ç¤¤ë¡£(15 MP)";
#endif
}
break;
- case CLASS_MAGE:
case CLASS_HIGH_MAGE:
+ if (p_ptr->realm1 == REALM_HEX) break;
+ case CLASS_MAGE:
case CLASS_SORCERER:
if (plev > 24)
{
break;
case CLASS_BEASTMASTER:
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï1ɤ¤ÎÀ¸Ì¿¤Î¤¢¤ë¥â¥ó¥¹¥¿¡¼¤ò»ÙÇÛ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥ì¥Ù¥ë/4 MP)";
+info[i++] = "¤¢¤Ê¤¿¤Ï1ÂΤÎÀ¸Ì¿¤Î¤¢¤ë¥â¥ó¥¹¥¿¡¼¤ò»ÙÇÛ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥ì¥Ù¥ë/4 MP)";
#else
info[i++] = "You can dominate a monster (cost level/4).";
#endif
if (plev > 47)
{
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï1¥¿¡¼¥ó¤Ë2²óËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£(77 MP)";
+info[i++] = "¤¢¤Ê¤¿¤Ï1¥¿¡¼¥ó¤Ë2²óËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£(20 MP)";
#else
- info[i++] = "You can cast two spells in one time (cost 77).";
+ info[i++] = "You can cast two spells in one time (cost 20).";
#endif
}
break;
if (IS_BLESSED())
{
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸øÀµ¤µ¤ò´¶¤¸¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ï¹â·é¤µ¤ò´¶¤¸¤Æ¤¤¤ë¡£";
#else
info[i++] = "You feel rightous.";
#endif
{
info2[i] = report_magics_aux(p_ptr->blind);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ¬¸«¤¨¤Ê¤¤¡£";
+info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ¬¸«¤¨¤Ê¤¤";
#else
info[i++] = "You cannot see";
#endif
{
info2[i] = report_magics_aux(p_ptr->confused);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïº®Í𤷤Ƥ¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ïº®Í𤷤Ƥ¤¤ë";
#else
info[i++] = "You are confused";
#endif
{
info2[i] = report_magics_aux(p_ptr->afraid);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤ˿¯¤µ¤ì¤Æ¤¤¤ë";
#else
info[i++] = "You are terrified";
#endif
{
info2[i] = report_magics_aux(p_ptr->poisoned);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆǤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤ÏÆǤ˿¯¤µ¤ì¤Æ¤¤¤ë";
#else
info[i++] = "You are poisoned";
#endif
{
info2[i] = report_magics_aux(p_ptr->image);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò¸«¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò¸«¤Æ¤¤¤ë";
#else
info[i++] = "You are hallucinating";
#endif
{
info2[i] = report_magics_aux(p_ptr->blessed);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸øÀµ¤µ¤ò´¶¤¸¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ï¹â·é¤µ¤ò´¶¤¸¤Æ¤¤¤ë";
#else
info[i++] = "You feel rightous";
#endif
{
info2[i] = report_magics_aux(p_ptr->hero);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥Ò¡¼¥í¡¼µ¤Ê¬¤À¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ï¥Ò¡¼¥í¡¼µ¤Ê¬¤À";
#else
info[i++] = "You feel heroic";
#endif
{
info2[i] = report_magics_aux(p_ptr->shero);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀïÆ®¶¸¤À¡£";
+info[i++] = "¤¢¤Ê¤¿¤ÏÀïÆ®¶¸¤À";
#else
info[i++] = "You are in a battle rage";
#endif
{
info2[i] = report_magics_aux(p_ptr->protevil);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë";
#else
info[i++] = "You are protected from evil";
#endif
{
info2[i] = report_magics_aux(p_ptr->shield);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¿ÀÈë¤Î¥·¡¼¥ë¥É¤Ç¼é¤é¤ì¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ï¿ÀÈë¤Î¥·¡¼¥ë¥É¤Ç¼é¤é¤ì¤Æ¤¤¤ë";
#else
info[i++] = "You are protected by a mystic shield";
#endif
{
info2[i] = report_magics_aux(p_ptr->invuln);
#ifdef JP
-info[i++] = "̵Ũ¤Ç¤¤¤é¤ì¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ï̵Ũ¤À";
#else
info[i++] = "You are invulnerable";
#endif
{
info2[i] = report_magics_aux(p_ptr->wraith_form);
#ifdef JP
-info[i++] = "Í©Âβ½¤Ç¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤ÏÍ©Â⽤·¤Æ¤¤¤ë";
#else
info[i++] = "You are incorporeal";
#endif
{
info2[i] = 7;
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë";
#else
info[i++] = "Your hands are glowing dull red.";
#endif
{
info2[i] = report_magics_aux(p_ptr->word_recall);
#ifdef JP
- info[i++] = "¤³¤Î¸åµ¢´Ô¤Î¾Û¤òȯư¤¹¤ë¡£";
+ info[i++] = "¤³¤Î¸åµ¢´Ô¤Î¾Û¤¬È¯Æ°¤¹¤ë";
#else
info[i++] = "You are waiting to be recalled";
#endif
{
info2[i] = report_magics_aux(p_ptr->alter_reality);
#ifdef JP
- info[i++] = "¤³¤Î¸å¸½¼ÂÊÑÍƤ¬È¯Æ°¤¹¤ë¡£";
+ info[i++] = "¤³¤Î¸å¸½¼ÂÊÑÍƤ¬È¯Æ°¤¹¤ë";
#else
info[i++] = "You waiting to be altered";
#endif
{
info2[i] = report_magics_aux(p_ptr->oppose_acid);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë";
#else
info[i++] = "You are resistant to acid";
#endif
{
info2[i] = report_magics_aux(p_ptr->oppose_elec);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë";
#else
info[i++] = "You are resistant to lightning";
#endif
{
info2[i] = report_magics_aux(p_ptr->oppose_fire);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë";
#else
info[i++] = "You are resistant to fire";
#endif
{
info2[i] = report_magics_aux(p_ptr->oppose_cold);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë";
#else
info[i++] = "You are resistant to cold";
#endif
{
info2[i] = report_magics_aux(p_ptr->oppose_pois);
#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
+info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë";
#else
info[i++] = "You are resistant to poison";
#endif
/* Label the information */
#ifdef JP
-prt(" ËâË¡ :", 1, 15);
+prt(" ¸½ºß¤«¤«¤Ã¤Æ¤¤¤ëËâË¡ :", 1, 15);
#else
prt(" Your Current Magic:", 1, 15);
#endif
{
/* Show the info */
#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï%s%s", info[j],
+ sprintf(Dummy, "%-28s : ´ü´Ö - %s ", info[j],
#else
sprintf(Dummy, "%s %s.", info[j],
#endif
(tv == TV_CRUSADE_BOOK) ||
(tv == TV_MUSIC_BOOK) ||
(tv == TV_HISSATSU_BOOK) ||
+ (tv == TV_HEX_BOOK) ||
((o_ptr->to_a > 0) || (o_ptr->to_h + o_ptr->to_d > 0)))
{
/* Memorize the item */
/*
* Slow monsters
*/
-bool slow_monsters(void)
+bool slow_monsters(int power)
{
- return (project_hack(GF_OLD_SLOW, p_ptr->lev));
+ return (project_hack(GF_OLD_SLOW, power));
}
/*
* Sleep monsters
*/
-bool sleep_monsters(void)
+bool sleep_monsters(int power)
{
- return (project_hack(GF_OLD_SLEEP, p_ptr->lev));
+ return (project_hack(GF_OLD_SLEEP, power));
}
if (m_ptr->cdis < MAX_SIGHT * 2)
{
/* Wake up */
- if (m_ptr->csleep)
+ if (MON_CSLEEP(m_ptr))
{
- /* Wake up */
- m_ptr->csleep = 0;
- mproc_remove(i, m_ptr->mproc_idx[MPROC_CSLEEP], MPROC_CSLEEP);
- if (r_info[m_ptr->r_idx].flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
- if (m_ptr->ml)
- {
- /* Redraw (later) if needed */
- if (p_ptr->health_who == i) p_ptr->redraw |= (PR_HEALTH);
- if (p_ptr->riding == i) p_ptr->redraw |= (PR_UHEALTH);
- }
+ (void)set_monster_csleep(i, 0);
sleep = TRUE;
}
if (!is_pet(m_ptr)) m_ptr->mflag2 |= MFLAG2_NOPET;
{
if (!is_pet(m_ptr))
{
- m_ptr->fast = MIN(200, m_ptr->fast + 100);
- if (!m_ptr->mproc_idx[MPROC_FAST]) mproc_add(i, MPROC_FAST);
+ (void)set_monster_fast(i, MON_FAST(m_ptr) + 100);
speed = TRUE;
}
}
else if (m_idx == p_ptr->riding) resist = TRUE;
+ else if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle) resist = TRUE;
+
else if (player_cast && (r_ptr->level > randint0(power))) resist = TRUE;
else if (player_cast && (m_ptr->mflag2 & MFLAG2_NOGENO)) resist = TRUE;
/* Delete the monster */
- else delete_monster_idx(m_idx);
+ else
+ {
+ if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
+ {
+ char m_name[80];
+
+ monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
+ do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_GENOCIDE, m_name);
+ }
+
+ delete_monster_idx(m_idx);
+ }
if (resist && player_cast)
{
msg_format("%^s is unaffected.", m_name);
#endif
}
- if (m_ptr->csleep)
+ if (MON_CSLEEP(m_ptr))
{
- m_ptr->csleep = 0;
- mproc_remove(m_idx, m_ptr->mproc_idx[MPROC_CSLEEP], MPROC_CSLEEP);
- if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+ (void)set_monster_csleep(m_idx, 0);
if (m_ptr->ml)
{
- /* Redraw (later) if needed */
- if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
- if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
- }
- if (see_m)
- {
#ifdef JP
msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
#else
bool result = FALSE;
/* Prevent genocide in quest levels */
- if (p_ptr->inside_quest && !random_quest_number(dun_level))
+ if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
{
return (FALSE);
}
bool result = FALSE;
/* Prevent mass genocide in quest levels */
- if (p_ptr->inside_quest && !random_quest_number(dun_level))
+ if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
{
return (FALSE);
}
bool result = FALSE;
/* Prevent mass genocide in quest levels */
- if (p_ptr->inside_quest && !random_quest_number(dun_level))
+ if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
{
return (FALSE);
}
msg_print(NULL);
- if (m_ptr->ap_r_idx != m_ptr->r_idx)
+ if (!is_original_ap(m_ptr))
{
if (m_ptr->mflag2 & MFLAG2_KAGE)
m_ptr->mflag2 &= ~(MFLAG2_KAGE);
monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_INDEF_HIDDEN);
speed = m_ptr->mspeed - 110;
- if(m_ptr->fast) speed += 10;
- if(m_ptr->slow) speed -= 10;
+ if (MON_FAST(m_ptr)) speed += 10;
+ if (MON_SLOW(m_ptr)) speed -= 10;
/* Get the monster's alignment */
#ifdef JP
}
#ifdef JP
- if (m_ptr->csleep) strcat(buf,"¿ç̲ ");
- if (m_ptr->stunned) strcat(buf,"ۯ۰ ");
- if (m_ptr->monfear) strcat(buf,"¶²ÉÝ ");
- if (m_ptr->confused) strcat(buf,"º®Íð ");
- if (m_ptr->invulner) strcat(buf,"̵Ũ ");
+ if (MON_CSLEEP(m_ptr)) strcat(buf,"¿ç̲ ");
+ if (MON_STUNNED(m_ptr)) strcat(buf,"ۯ۰ ");
+ if (MON_MONFEAR(m_ptr)) strcat(buf,"¶²ÉÝ ");
+ if (MON_CONFUSED(m_ptr)) strcat(buf,"º®Íð ");
+ if (MON_INVULNER(m_ptr)) strcat(buf,"̵Ũ ");
#else
- if (m_ptr->csleep) strcat(buf,"sleeping ");
- if (m_ptr->stunned) strcat(buf,"stunned ");
- if (m_ptr->monfear) strcat(buf,"scared ");
- if (m_ptr->confused) strcat(buf,"confused ");
- if (m_ptr->invulner) strcat(buf,"invulnerable ");
+ if (MON_CSLEEP(m_ptr)) strcat(buf,"sleeping ");
+ if (MON_STUNNED(m_ptr)) strcat(buf,"stunned ");
+ if (MON_MONFEAR(m_ptr)) strcat(buf,"scared ");
+ if (MON_CONFUSED(m_ptr)) strcat(buf,"confused ");
+ if (MON_INVULNER(m_ptr)) strcat(buf,"invulnerable ");
#endif
buf[strlen(buf)-1] = '\0';
prt(buf,0,0);
m_ptr->hp = m_ptr->maxhp;
/* Try to teleport away quest monsters */
- if (!teleport_away(c_ptr->m_idx, (r * 2) + 1, TRUE, FALSE)) continue;
+ if (!teleport_away(c_ptr->m_idx, (r * 2) + 1, TELEPORT_DEC_VALOUR)) continue;
}
else
{
char m_name[80];
monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
- do_cmd_write_nikki(NIKKI_NAMED_PET, 6, m_name);
+ do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_DESTROY, m_name);
}
/* Delete the monster (if any) */
if (t < 20)
{
/* Create granite wall */
- cave_set_feat(y, x, FEAT_WALL);
+ cave_set_feat(y, x, feat_granite);
}
else if (t < 70)
{
/* Create quartz vein */
- cave_set_feat(y, x, FEAT_QUARTZ);
+ cave_set_feat(y, x, feat_quartz_vein);
}
else if (t < 100)
{
/* Create magma vein */
- cave_set_feat(y, x, FEAT_MAGMA);
+ cave_set_feat(y, x, feat_magma_vein);
}
else
{
else if (t < 70)
{
/* Create quartz vein */
- c_ptr->feat = FEAT_QUARTZ;
+ c_ptr->feat = feat_quartz_vein;
}
else if (t < 100)
{
/* Create magma vein */
- c_ptr->feat = FEAT_MAGMA;
+ c_ptr->feat = feat_magma_vein;
}
else
{
* for a single turn, unless that monster can pass_walls or kill_walls.
* This has allowed massive simplification of the "monster" code.
*/
-bool earthquake(int cy, int cx, int r)
+bool earthquake_aux(int cy, int cx, int r, int m_idx)
{
int i, t, y, x, yy, xx, dy, dx;
int damage = 0;
case 1:
{
#ifdef JP
-msg_print("¥À¥ó¥¸¥ç¥ó¤ÎÊɤ¬Êø¤ì¤¿¡ª");
+ msg_print("¥À¥ó¥¸¥ç¥ó¤ÎÊɤ¬Êø¤ì¤¿¡ª");
#else
msg_print("The cave ceiling collapses!");
#endif
-
break;
}
case 2:
{
#ifdef JP
-msg_print("¥À¥ó¥¸¥ç¥ó¤Î¾²¤¬ÉÔ¼«Á³¤Ë¤Í¤¸¶Ê¤¬¤Ã¤¿¡ª");
+ msg_print("¥À¥ó¥¸¥ç¥ó¤Î¾²¤¬ÉÔ¼«Á³¤Ë¤Í¤¸¶Ê¤¬¤Ã¤¿¡ª");
#else
msg_print("The cave floor twists in an unnatural way!");
#endif
-
break;
}
default:
{
#ifdef JP
-msg_print("¥À¥ó¥¸¥ç¥ó¤¬Íɤ줿¡ªÊø¤ì¤¿´ä¤¬Æ¬¤Ë¹ß¤Ã¤Æ¤¤¿¡ª");
+ msg_print("¥À¥ó¥¸¥ç¥ó¤¬Íɤ줿¡ªÊø¤ì¤¿´ä¤¬Æ¬¤Ë¹ß¤Ã¤Æ¤¤¿¡ª");
#else
msg_print("The cave quakes! You are pummeled with debris!");
#endif
-
break;
}
}
{
/* Message and damage */
#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¤Ò¤É¤¤²ø²æ¤òÉé¤Ã¤¿¡ª");
+ msg_print("¤¢¤Ê¤¿¤Ï¤Ò¤É¤¤²ø²æ¤òÉé¤Ã¤¿¡ª");
#else
msg_print("You are severely crushed!");
#endif
-
damage = 200;
}
case 1:
{
#ifdef JP
-msg_print("¹ß¤êÃí¤°´ä¤ò¤¦¤Þ¤¯Èò¤±¤¿¡ª");
+ msg_print("¹ß¤êÃí¤°´ä¤ò¤¦¤Þ¤¯Èò¤±¤¿¡ª");
#else
msg_print("You nimbly dodge the blast!");
#endif
-
damage = 0;
break;
}
case 2:
{
#ifdef JP
-msg_print("´äÀФ¬¤¢¤Ê¤¿¤Ëľ·â¤·¤¿!");
+ msg_print("´äÀФ¬¤¢¤Ê¤¿¤Ëľ·â¤·¤¿!");
#else
msg_print("You are bashed by rubble!");
#endif
-
damage = damroll(10, 4);
(void)set_stun(p_ptr->stun + randint1(50));
break;
case 3:
{
#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¾²¤ÈÊɤȤδ֤˶´¤Þ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
+ msg_print("¤¢¤Ê¤¿¤Ï¾²¤ÈÊɤȤδ֤˶´¤Þ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
#else
msg_print("You are crushed between the floor and ceiling!");
#endif
-
damage = damroll(10, 4);
(void)set_stun(p_ptr->stun + randint1(50));
break;
map[16+py-cy][16+px-cx] = FALSE;
/* Take some damage */
+ if (damage)
+ {
+ char *killer;
+
+ if (m_idx)
+ {
+ char m_name[80];
+ monster_type *m_ptr = &m_list[m_idx];
+
+ /* Get the monster's real name */
+ monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+
+#ifdef JP
+ killer = format("%s¤Îµ¯¤³¤·¤¿ÃÏ¿Ì", m_name);
+#else
+ killer = format("an earthquake caused by %s", m_name);
+#endif
+ }
+ else
+ {
#ifdef JP
-if (damage) take_hit(DAMAGE_ATTACK, damage, "ÃÏ¿Ì", -1);
+ killer = "ÃÏ¿Ì";
#else
- if (damage) take_hit(DAMAGE_ATTACK, damage, "an earthquake", -1);
+ killer = "an earthquake";
#endif
+ }
+ take_hit(DAMAGE_ATTACK, damage, killer, -1);
+ }
}
/* Examine the quaked region */
/* Scream in pain */
#ifdef JP
-msg_format("%^s¤Ï¶ìÄˤǵ㤤ï¤á¤¤¤¿¡ª", m_name);
+ if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s¤Ï¶ìÄˤǵ㤤ï¤á¤¤¤¿¡ª", m_name);
#else
- msg_format("%^s wails out in pain!", m_name);
+ if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s wails out in pain!", m_name);
#endif
-
/* Take damage from the quake */
damage = (sn ? damroll(4, 8) : (m_ptr->hp + 1));
/* Monster is certainly awake */
- if (m_ptr->csleep)
- {
- m_ptr->csleep = 0;
- mproc_remove(c_ptr->m_idx, m_ptr->mproc_idx[MPROC_CSLEEP], MPROC_CSLEEP);
- }
+ (void)set_monster_csleep(c_ptr->m_idx, 0);
/* Apply damage directly */
m_ptr->hp -= damage;
{
/* Message */
#ifdef JP
-msg_format("%^s¤Ï´äÀФËËä¤â¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª", m_name);
+ if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s¤Ï´äÀФËËä¤â¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª", m_name);
#else
- msg_format("%^s is embedded in the rock!", m_name);
+ if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s is embedded in the rock!", m_name);
#endif
if (c_ptr->m_idx)
char m2_name[80];
monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
- do_cmd_write_nikki(NIKKI_NAMED_PET, 7, m2_name);
+ do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_EARTHQUAKE, m2_name);
}
}
if (t < 20)
{
/* Create granite wall */
- cave_set_feat(yy, xx, FEAT_WALL);
+ cave_set_feat(yy, xx, feat_granite);
}
/* Quartz */
else if (t < 70)
{
/* Create quartz vein */
- cave_set_feat(yy, xx, FEAT_QUARTZ);
+ cave_set_feat(yy, xx, feat_quartz_vein);
}
/* Magma */
else if (t < 100)
{
/* Create magma vein */
- cave_set_feat(yy, xx, FEAT_MAGMA);
+ cave_set_feat(yy, xx, feat_magma_vein);
}
/* Floor */
return (TRUE);
}
+bool earthquake(int cy, int cx, int r)
+{
+ return earthquake_aux(cy, cx, r, 0);
+}
+
void discharge_minion(void)
{
project(i, 2+(r_ptr->level/20), m_ptr->fy,
m_ptr->fx, dam, GF_PLASMA,
PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL, -1);
+
+ if (record_named_pet && m_ptr->nickname)
+ {
+ char m_name[80];
+
+ monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
+ do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_BLAST, m_name);
+ }
+
delete_monster_idx(i);
}
}
if (r_ptr->flags2 & (RF2_SMART)) chance = 100;
/* Sometimes monsters wake up */
- if (m_ptr->csleep && (randint0(100) < chance))
+ if (MON_CSLEEP(m_ptr) && (randint0(100) < chance))
{
/* Wake up! */
- m_ptr->csleep = 0;
- mproc_remove(c_ptr->m_idx, m_ptr->mproc_idx[MPROC_CSLEEP], MPROC_CSLEEP);
- if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+ (void)set_monster_csleep(c_ptr->m_idx, 0);
/* Notice the "waking up" */
- if (is_seen(m_ptr))
+ if (m_ptr->ml)
{
char m_name[80];
/* Dump a message */
#ifdef JP
-msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
+ msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
#else
msg_format("%^s wakes up.", m_name);
#endif
}
-
- if (m_ptr->ml)
- {
- /* Redraw the health bar */
- if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
- if (p_ptr->riding == c_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
- }
}
}
m_ptr = &m_list[c_ptr->m_idx];
r_ptr = &r_info[m_ptr->r_idx];
- /* Redraw the health bar */
- if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
+ (void)set_monster_csleep(c_ptr->m_idx, 0);
if (r_ptr->flagsr & RFR_RES_TELE)
{
if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
- if (m_ptr->csleep)
- {
- m_ptr->csleep = 0;
- mproc_remove(c_ptr->m_idx, m_ptr->mproc_idx[MPROC_CSLEEP], MPROC_CSLEEP);
- if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
- }
-
/* Failure */
return FALSE;
}
*/
bool fire_bolt(int typ, int dir, int dam)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
+ int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
+ if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
return (project_hook(typ, dir, dam, flg));
}
/*
* Some of the old functions
*/
-bool lite_line(int dir)
+bool lite_line(int dir, int dam)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
- return (project_hook(GF_LITE_WEAK, dir, damroll(6, 8), flg));
+ return (project_hook(GF_LITE_WEAK, dir, dam, flg));
}
}
-bool wall_to_mud(int dir)
+bool wall_to_mud(int dir, int dam)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
- return (project_hook(GF_KILL_WALL, dir, 20 + randint1(30), flg));
+ return (project_hook(GF_KILL_WALL, dir, dam, flg));
}
}
-bool speed_monster(int dir)
+bool speed_monster(int dir, int power)
{
int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_SPEED, dir, p_ptr->lev, flg));
+ return (project_hook(GF_OLD_SPEED, dir, power, flg));
}
-bool slow_monster(int dir)
+bool slow_monster(int dir, int power)
{
int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_SLOW, dir, p_ptr->lev, flg));
+ return (project_hook(GF_OLD_SLOW, dir, power, flg));
}
-bool sleep_monster(int dir)
+bool sleep_monster(int dir, int power)
{
int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_SLEEP, dir, p_ptr->lev, flg));
+ return (project_hook(GF_OLD_SLEEP, dir, power, flg));
}
}
-bool poly_monster(int dir)
+bool poly_monster(int dir, int power)
{
int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- bool tester = (project_hook(GF_OLD_POLY, dir, p_ptr->lev, flg));
+ bool tester = (project_hook(GF_OLD_POLY, dir, power, flg));
if (tester)
chg_virtue(V_CHANCE, 1);
return(tester);
}
-bool teleport_monster(int dir)
+bool teleport_monster(int dir, int distance)
{
int flg = PROJECT_BEAM | PROJECT_KILL;
- return (project_hook(GF_AWAY_ALL, dir, MAX_SIGHT * 5, flg));
+ return (project_hook(GF_AWAY_ALL, dir, distance, flg));
}
/*
return (project(0, 1, py, px, 0, GF_KILL_DOOR, flg, -1));
}
+bool disarm_traps_touch(void)
+{
+ int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ return (project(0, 1, py, px, 0, GF_KILL_TRAP, flg, -1));
+}
bool sleep_monsters_touch(void)
{
msg_print("Space warps about you!");
#endif
- teleport_player(damroll(10, 10), TRUE);
+ teleport_player(damroll(10, 10), TELEPORT_PASSIVE);
if (randint0(13)) (*count) += activate_hi_summon(py, px, FALSE);
if (!one_in_(6)) break;
}
}
-void kawarimi(bool success)
+bool kawarimi(bool success)
{
object_type forge;
object_type *q_ptr = &forge;
int y, x;
- if (p_ptr->confused || p_ptr->blind || p_ptr->paralyzed || p_ptr->image) return;
- if (randint0(200) < p_ptr->stun) return;
+ if (p_ptr->is_dead) return FALSE;
+ if (p_ptr->confused || p_ptr->blind || p_ptr->paralyzed || p_ptr->image) return FALSE;
+ if (randint0(200) < p_ptr->stun) return FALSE;
if (!success && one_in_(3))
{
#endif
p_ptr->special_defense &= ~(NINJA_KAWARIMI);
p_ptr->redraw |= (PR_STATUS);
- return;
+ return FALSE;
}
y = py;
x = px;
- teleport_player(10 + randint1(90), FALSE);
+ teleport_player(10 + randint1(90), 0L);
object_wipe(q_ptr);
p_ptr->special_defense &= ~(NINJA_KAWARIMI);
p_ptr->redraw |= (PR_STATUS);
+
+ /* Teleported */
+ return TRUE;
}
u16b path_g[32];
int path_n, i;
bool tmp_mdeath = FALSE;
+ bool moved = FALSE;
if (mdeath) *mdeath = FALSE;
}
/* Move player before updating the monster */
- if (!player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE, FALSE);
+ if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
/* Update the monster */
update_mon(cave[ny][nx].m_idx, TRUE);
#endif
}
+ if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
+ moved = TRUE;
tmp_mdeath = py_attack(ny, nx, HISSATSU_NYUSIN);
break;
}
- if (!player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE, FALSE);
+ if (!moved && !player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
if (mdeath) *mdeath = tmp_mdeath;
return TRUE;