OSDN Git Service

・ヨ・悅シ・ノ。ヲ・ケ・ヤ・「。リ・愠ョ・フ・ケ。ル、ホLITE・ユ・鬣ー、ホスナハ」、、タオ.
[hengband/hengband.git] / src / mutation.c
index 60c64d8..06c3ec6 100644 (file)
@@ -3309,6 +3309,7 @@ bool mutation_power_aux(u32b power)
        {
                case MUT1_SPIT_ACID:
                        if (!get_aim_dir(&dir)) return FALSE;
+                       if (music_singing_any()) stop_singing();
 #ifdef JP
                        msg_print("»À¤òÅǤ­¤«¤±¤¿...");
 #else
@@ -3320,6 +3321,7 @@ bool mutation_power_aux(u32b power)
 
                case MUT1_BR_FIRE:
                        if (!get_aim_dir(&dir)) return FALSE;
+                       if (music_singing_any()) stop_singing();
 #ifdef JP
                        msg_print("¤¢¤Ê¤¿¤Ï²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿...");
 #else
@@ -3358,7 +3360,7 @@ bool mutation_power_aux(u32b power)
                        msg_print("You concentrate...");
 #endif
 
-                       teleport_player(10 + 4 * lvl, FALSE);
+                       teleport_player(10 + 4 * lvl, 0L);
                        break;
 
                case MUT1_MIND_BLST:
@@ -3393,6 +3395,8 @@ bool mutation_power_aux(u32b power)
                                x = px + ddx[dir];
                                c_ptr = &cave[y][x];
 
+                               if (music_singing_any()) stop_singing();
+
                                if (!(c_ptr->m_idx))
                                {
 #ifdef JP
@@ -3444,30 +3448,35 @@ bool mutation_power_aux(u32b power)
                        break;
 
                case MUT1_SMELL_MET:
+                       if (music_singing_any()) stop_singing();
                        (void)detect_treasure(DETECT_RAD_DEFAULT);
                        break;
 
                case MUT1_SMELL_MON:
+                       if (music_singing_any()) stop_singing();
                        (void)detect_monsters_normal(DETECT_RAD_DEFAULT);
                        break;
 
                case MUT1_BLINK:
-                       teleport_player(10, FALSE);
+                       teleport_player(10, 0L);
                        break;
 
                case MUT1_EAT_ROCK:
                        {
                                int x, y;
                                cave_type *c_ptr;
-                               feature_type *f_ptr;
+                               feature_type *f_ptr, *mimic_f_ptr;
 
                                if (!get_rep_dir2(&dir)) return FALSE;
                                y = py + ddy[dir];
                                x = px + ddx[dir];
                                c_ptr = &cave[y][x];
                                f_ptr = &f_info[c_ptr->feat];
+                               mimic_f_ptr = &f_info[get_feat_mimic(c_ptr)];
+
+                               if (music_singing_any()) stop_singing();
 
-                               if (!have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_HURT_ROCK))
+                               if (!have_flag(mimic_f_ptr->flags, FF_HURT_ROCK))
                                {
 #ifdef JP
                                        msg_print("¤³¤ÎÃÏ·Á¤Ï¿©¤Ù¤é¤ì¤Ê¤¤¡£");
@@ -3479,9 +3488,9 @@ bool mutation_power_aux(u32b power)
                                else if (have_flag(f_ptr->flags, FF_PERMANENT))
                                {
 #ifdef JP
-                                       msg_format("¤¤¤Æ¤Ã¡ª¤³¤Î%s¤Ï¤¢¤Ê¤¿¤Î»õ¤è¤ê¹Å¤¤¡ª", f_name + f_info[get_feat_mimic(c_ptr)].name);
+                                       msg_format("¤¤¤Æ¤Ã¡ª¤³¤Î%s¤Ï¤¢¤Ê¤¿¤Î»õ¤è¤ê¹Å¤¤¡ª", f_name + mimic_f_ptr->name);
 #else
-                                       msg_format("Ouch!  This %s is harder than your teeth!", f_name + f_info[get_feat_mimic(c_ptr)].name);
+                                       msg_format("Ouch!  This %s is harder than your teeth!", f_name + mimic_f_ptr->name);
 #endif
                                        break;
                                }
@@ -3506,6 +3515,15 @@ bool mutation_power_aux(u32b power)
 #endif
                                        break;
                                }
+                               else if (have_flag(f_ptr->flags, FF_GLASS))
+                               {
+#ifdef JP
+                                       msg_print("¥¬¥é¥¹¤ÎÌ£¤Ï¹¥¤­¤¸¤ã¤Ê¤¤¡ª");
+#else
+                                       msg_print("You don't like the glassy taste!");
+#endif
+                                       break;
+                               }
                                else if (have_flag(f_ptr->flags, FF_DOOR) || have_flag(f_ptr->flags, FF_CAN_DIG))
                                {
                                        (void)set_food(p_ptr->food + 3000);
@@ -3517,9 +3535,9 @@ bool mutation_power_aux(u32b power)
                                else
                                {
 #ifdef JP
-                                       msg_format("¤³¤Î%s¤Ï¤È¤Æ¤â¤ª¤¤¤·¤¤¡ª", f_name + f_info[get_feat_mimic(c_ptr)].name);
+                                       msg_format("¤³¤Î%s¤Ï¤È¤Æ¤â¤ª¤¤¤·¤¤¡ª", f_name + mimic_f_ptr->name);
 #else
-                                       msg_format("This %s is very filling!", f_name + f_info[get_feat_mimic(c_ptr)].name);
+                                       msg_format("This %s is very filling!", f_name + mimic_f_ptr->name);
 #endif
                                        (void)set_food(p_ptr->food + 10000);
                                }
@@ -3528,7 +3546,7 @@ bool mutation_power_aux(u32b power)
                                cave_alter_feat(y, x, FF_HURT_ROCK);
 
                                /* Move the player */
-                               (void)move_player_effect(py, px, y, x, MPE_DONT_PICKUP);
+                               (void)move_player_effect(y, x, MPE_DONT_PICKUP);
                        }
                        break;
 
@@ -3544,6 +3562,7 @@ bool mutation_power_aux(u32b power)
                        break;
 
                case MUT1_SHRIEK:
+                       if (music_singing_any()) stop_singing();
                        (void)fire_ball(GF_SOUND, 0, 2 * lvl, 8);
                        (void)aggravate_monsters(0);
                        break;
@@ -3672,7 +3691,7 @@ bool mutation_power_aux(u32b power)
 #else
                                                msg_print("You failed to teleport.");
 #endif
-                                       else teleport_player(30, FALSE);
+                                       else teleport_player(30, 0L);
                                }
                                else
                                {
@@ -3735,6 +3754,14 @@ bool mutation_power_aux(u32b power)
                                        (r_ptr->level < randint1(p_ptr->lev+50)) &&
                                        !(m_ptr->mflag2 & MFLAG2_NOGENO))
                                {
+                                       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 the monster, rather than killing it. */
                                        delete_monster_idx(c_ptr->m_idx);
 #ifdef JP