OSDN Git Service

空腹充足の巻物の記述を削除.
[hengband/hengband.git] / src / mane.c
index 803bbc2..a9c80f6 100644 (file)
@@ -1,21 +1,21 @@
 /* File: mind.c */
 
-/* Purpose: Mane code */
-
 /*
- * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
  *
- * This software may be copied and distributed for educational, research, and
- * not for profit purposes provided that this copyright and statement are
- * included in all such copies.
+ * This software may be copied and distributed for educational, research,
+ * and not for profit purposes provided that this copyright and statement
+ * are included in all such copies.  Other copyrights may also apply.
  */
 
+/* Purpose: Imitation code */
+
 #include "angband.h"
 
 
 static int damage;
 
-void mane_info(char *p, int power, int dam)
+static void mane_info(char *p, int power, int dam)
 {
        int plev = p_ptr->lev;
 #ifdef JP
@@ -111,22 +111,22 @@ cptr            p = "ǽ
        /* No redraw yet */
        redraw = FALSE;
 
-       num = mane_num;
+       num = p_ptr->mane_num;
 
        /* Build a prompt (accept all spells) */
+       (void)strnfmt(out_val, 78, 
 #ifdef JP
-(void) strnfmt(out_val, 78, "(%c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©",
+                     "(%c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©",
 #else
-       (void)strnfmt(out_val, 78, "(%c-%c, *=List, ESC=exit) Use which %s? ",
+                     "(%c-%c, *=List, ESC=exit) Use which %s? ",
 #endif
-
-               I2A(0), I2A(num - 1), p);
+                     I2A(0), I2A(num - 1), p);
 
        /* Get a spell from the user */
 
-        choice= always_show_list ? ESCAPE:1 ;
-        while (!flag)
-        {
+       choice= always_show_list ? ESCAPE:1 ;
+       while (!flag)
+       {
                if(choice==ESCAPE) choice = ' '; 
                else if( !get_com(out_val, &choice, TRUE) )break; 
 
@@ -163,7 +163,7 @@ put_str("
                                for (i = 0; i < num; i++)
                                {
                                        /* Access the spell */
-                                       spell = monster_powers[mane_spell[i]];
+                                       spell = monster_powers[p_ptr->mane_spell[i]];
 
                                        chance = spell.manefail;
 
@@ -173,11 +173,9 @@ put_str("
                                        /* Reduce failure rate by INT/WIS adjustment */
                                        chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[spell.use_stat]] + adj_mag_stat[p_ptr->stat_ind[A_DEX]] - 2) / 2;
 
-                                       if (spell.manedam) chance = chance * mane_dam[i] / spell.manedam;
+                                       if (spell.manedam) chance = chance * p_ptr->mane_dam[i] / spell.manedam;
 
-                                       if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance += 10;
-                                       if (p_ptr->pseikaku == SEIKAKU_KIREMONO) chance -= 3;
-                                       if ((p_ptr->pseikaku == SEIKAKU_GAMAN) || (p_ptr->pseikaku == SEIKAKU_CHIKARA)) chance++;
+                                       chance += p_ptr->to_m_chance;
 
                                        /* Extract the minimum failure rate */
                                        minfail = adj_mag_fail[p_ptr->stat_ind[spell.use_stat]];
@@ -193,12 +191,12 @@ put_str("
                                        if (chance > 95) chance = 95;
 
                                        /* Get info */
-                                       mane_info(comment, mane_spell[i], (baigaesi ? mane_dam[i]*2 : mane_dam[i]));
+                                       mane_info(comment, p_ptr->mane_spell[i], (baigaesi ? p_ptr->mane_dam[i]*2 : p_ptr->mane_dam[i]));
 
                                        /* Dump the spell --(-- */
                                        sprintf(psi_desc, "  %c) %-30s %3d%%%s",
-                                               I2A(i), spell.name,
-                                               chance, comment);
+                                               I2A(i), spell.name,
+                                               chance, comment);
                                        prt(psi_desc, y + i + 1, x);
                                }
 
@@ -237,7 +235,7 @@ put_str("
                }
 
                /* Save the spell index */
-               spell = monster_powers[mane_spell[i]];
+               spell = monster_powers[p_ptr->mane_spell[i]];
 
                /* Verify it */
                if (ask)
@@ -246,9 +244,9 @@ put_str("
 
                        /* Prompt */
 #ifdef JP
-(void) strnfmt(tmp_val, 78, "%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©", monster_powers[mane_spell[i]].name);
+                       (void) strnfmt(tmp_val, 78, "%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©", monster_powers[p_ptr->mane_spell[i]].name);
 #else
-                       (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[mane_spell[i]].name);
+                       (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[p_ptr->mane_spell[i]].name);
 #endif
 
 
@@ -264,14 +262,10 @@ put_str("
        if (redraw) screen_load();
 
        /* Show choices */
-       if (show_choices)
-       {
-               /* Update */
-               p_ptr->window |= (PW_SPELL);
+       p_ptr->window |= (PW_SPELL);
 
-               /* Window stuff */
-               window_stuff();
-       }
+       /* Window stuff */
+       window_stuff();
 
        /* Abort if needed */
        if (!flag) return (FALSE);
@@ -279,7 +273,7 @@ put_str("
        /* Save the choice */
        (*sn) = i;
 
-       damage = (baigaesi ? mane_dam[i]*2 : mane_dam[i]);
+       damage = (baigaesi ? p_ptr->mane_dam[i]*2 : p_ptr->mane_dam[i]);
 
        /* Success */
        return (TRUE);
@@ -294,8 +288,10 @@ static bool use_mane(int spell)
 {
        int             dir;
        int             plev = p_ptr->lev;
-       bool    unique_okay = FALSE;
-       if (randint(50+plev) < plev/10) unique_okay = TRUE;
+       u32b mode = (PM_ALLOW_GROUP | PM_FORCE_PET);
+       u32b u_mode = 0L;
+
+       if (randint1(50+plev) < plev/10) u_mode = PM_ALLOW_UNIQUE;
 
 
        /* spell code */
@@ -305,7 +301,7 @@ static bool use_mane(int spell)
 #ifdef JP
 msg_print("¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£");
 #else
-               msg_print("You makes a high pitched shriek.");
+               msg_print("You make a high pitched shriek.");
 #endif
 
                aggravate_monsters(0);
@@ -314,44 +310,14 @@ msg_print("
                break;
        case MS_DISPEL:
        {
-               monster_type *m_ptr;
-               char m_name[80];
+               int m_idx;
 
                if (!target_set(TARGET_KILL)) return FALSE;
-               if (!cave[target_row][target_col].m_idx) break;
-               if (!los(py, px, target_row, target_col)) break;
-               m_ptr = &m_list[cave[target_row][target_col].m_idx];
-               monster_desc(m_name, m_ptr, 0);
-               if (m_ptr->invulner)
-               {
-                       m_ptr->invulner = 0;
-#ifdef JP
-msg_format("%s¤Ï¤â¤¦ÌµÅ¨¤Ç¤Ï¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s is no longer invulnerable.", m_name);
-#endif
-               }
-               if (m_ptr->fast)
-               {
-                       m_ptr->fast = 0;
-#ifdef JP
-msg_format("%s¤Ï¤â¤¦²Ã®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s is no longer fast.", m_name);
-#endif
-               }
-               if (m_ptr->slow)
-               {
-                       m_ptr->slow = 0;
-#ifdef JP
-msg_format("%s¤Ï¤â¤¦¸ºÂ®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s is no longer slow.", m_name);
-#endif
-               }
-               p_ptr->redraw |= (PR_HEALTH);
-               if (p_ptr->riding == cave[target_row][target_col].m_idx) p_ptr->redraw |= (PR_HEALTH);
-
+               m_idx = cave[target_row][target_col].m_idx;
+               if (!m_idx) break;
+               if (!player_has_los_bold(target_row, target_col)) break;
+               if (!projectable(py, px, target_row, target_col)) break;
+               dispel_monster_status(m_idx);
                break;
        }
        case MS_ROCKET:
@@ -359,39 +325,33 @@ msg_format("%s
 #ifdef JP
 else msg_print("¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£");
 #else
-                       else msg_print("You fires a rocket.");
+                       else msg_print("You fire a rocket.");
 #endif
                
                        fire_rocket(GF_ROCKET, dir, damage, 2);
                break;
-       case MS_ARROW_1:
-       case MS_ARROW_2:
+       case MS_SHOOT:
                if (!get_aim_dir(&dir)) return FALSE;
 #ifdef JP
 else msg_print("Ìð¤òÊü¤Ã¤¿¡£");
 #else
-                       else msg_print("You fires an arrow.");
+                       else msg_print("You fire an arrow.");
 #endif
                
                        fire_bolt(GF_ARROW, dir, damage);
                break;
-       case MS_ARROW_3:
-       case MS_ARROW_4:
-               if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥Ü¥ë¥È¤ò·â¤Ã¤¿¡£");
-#else
-                       else msg_print("You fires a bolt.");
-#endif
-               
-                       fire_bolt(GF_ARROW, dir, damage);
+       case MS_XXX2:
+               break;
+       case MS_XXX3:
+               break;
+       case MS_XXX4:
                break;
        case MS_BR_ACID:
                if (!get_aim_dir(&dir)) return FALSE;
 #ifdef JP
 else msg_print("»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes acid.");
+                       else msg_print("You breathe acid.");
 #endif
                
                        fire_ball(GF_ACID, dir, damage, (plev > 35 ? -3 : -2));
@@ -401,7 +361,7 @@ else msg_print("
 #ifdef JP
 else msg_print("°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes lightning.");
+                       else msg_print("You breathe lightning.");
 #endif
                
                        fire_ball(GF_ELEC, dir, damage, (plev > 35 ? -3 : -2));
@@ -411,7 +371,7 @@ else msg_print("
 #ifdef JP
 else msg_print("²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes fire.");
+                       else msg_print("You breathe fire.");
 #endif
                
                        fire_ball(GF_FIRE, dir, damage, (plev > 35 ? -3 : -2));
@@ -421,7 +381,7 @@ else msg_print("
 #ifdef JP
 else msg_print("Î䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes frost.");
+                       else msg_print("You breathe frost.");
 #endif
                
                        fire_ball(GF_COLD, dir, damage, (plev > 35 ? -3 : -2));
@@ -431,7 +391,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes gas.");
+                       else msg_print("You breathe gas.");
 #endif
                
                        fire_ball(GF_POIS, dir, damage, (plev > 35 ? -3 : -2));
@@ -441,7 +401,7 @@ else msg_print("
 #ifdef JP
 else msg_print("ÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes nether.");
+                       else msg_print("You breathe nether.");
 #endif
                
                        fire_ball(GF_NETHER, dir, damage, (plev > 35 ? -3 : -2));
@@ -451,7 +411,7 @@ else msg_print("
 #ifdef JP
 else msg_print("Á®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes light.");
+                       else msg_print("You breathe light.");
 #endif
                
                        fire_ball(GF_LITE, dir, damage, (plev > 35 ? -3 : -2));
@@ -461,7 +421,7 @@ else msg_print("
 #ifdef JP
 else msg_print("°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes darkness.");
+                       else msg_print("You breathe darkness.");
 #endif
                
                        fire_ball(GF_DARK, dir, damage, (plev > 35 ? -3 : -2));
@@ -471,7 +431,7 @@ else msg_print("
 #ifdef JP
 else msg_print("º®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes confusion.");
+                       else msg_print("You breathe confusion.");
 #endif
                
                        fire_ball(GF_CONFUSION, dir, damage, (plev > 35 ? -3 : -2));
@@ -481,7 +441,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes sound.");
+                       else msg_print("You breathe sound.");
 #endif
                
                        fire_ball(GF_SOUND, dir, damage, (plev > 35 ? -3 : -2));
@@ -491,7 +451,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes chaos.");
+                       else msg_print("You breathe chaos.");
 #endif
                
                        fire_ball(GF_CHAOS, dir, damage, (plev > 35 ? -3 : -2));
@@ -501,7 +461,7 @@ else msg_print("
 #ifdef JP
 else msg_print("Îô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes disenchantment.");
+                       else msg_print("You breathe disenchantment.");
 #endif
                
                        fire_ball(GF_DISENCHANT, dir, damage, (plev > 35 ? -3 : -2));
@@ -511,7 +471,7 @@ else msg_print("
 #ifdef JP
 else msg_print("°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes nexus.");
+                       else msg_print("You breathe nexus.");
 #endif
                
                        fire_ball(GF_NEXUS, dir, damage, (plev > 35 ? -3 : -2));
@@ -521,7 +481,7 @@ else msg_print("
 #ifdef JP
 else msg_print("»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes time.");
+                       else msg_print("You breathe time.");
 #endif
                
                        fire_ball(GF_TIME, dir, damage, (plev > 35 ? -3 : -2));
@@ -531,7 +491,7 @@ else msg_print("
 #ifdef JP
 else msg_print("ÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes inertia.");
+                       else msg_print("You breathe inertia.");
 #endif
                
                        fire_ball(GF_INERTIA, dir, damage, (plev > 35 ? -3 : -2));
@@ -541,7 +501,7 @@ else msg_print("
 #ifdef JP
 else msg_print("½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes gravity.");
+                       else msg_print("You breathe gravity.");
 #endif
                
                        fire_ball(GF_GRAVITY, dir, damage, (plev > 35 ? -3 : -2));
@@ -551,7 +511,7 @@ else msg_print("
 #ifdef JP
 else msg_print("ÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes shards.");
+                       else msg_print("You breathe shards.");
 #endif
                
                        fire_ball(GF_SHARDS, dir, damage, (plev > 35 ? -3 : -2));
@@ -561,7 +521,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes plasma.");
+                       else msg_print("You breathe plasma.");
 #endif
                
                        fire_ball(GF_PLASMA, dir, damage, (plev > 35 ? -3 : -2));
@@ -571,7 +531,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes force.");
+                       else msg_print("You breathe force.");
 #endif
                
                        fire_ball(GF_FORCE, dir, damage, (plev > 35 ? -3 : -2));
@@ -581,7 +541,7 @@ else msg_print("
 #ifdef JP
 else msg_print("ËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes mana.");
+                       else msg_print("You breathe mana.");
 #endif
                
                        fire_ball(GF_MANA, dir, damage, (plev > 35 ? -3 : -2));
@@ -591,7 +551,7 @@ else msg_print("
 #ifdef JP
 else msg_print("Êü¼Íǽµå¤òÊü¤Ã¤¿¡£");
 #else
-                       else msg_print("You casts a ball of radiation.");
+                       else msg_print("You cast a ball of radiation.");
 #endif
                
                        fire_ball(GF_NUKE, dir, damage, 2);
@@ -601,7 +561,7 @@ else msg_print("
 #ifdef JP
 else msg_print("Êü¼ÍÀ­ÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes toxic waste.");
+                       else msg_print("You breathe toxic waste.");
 #endif
                
                        fire_ball(GF_NUKE, dir, damage, (plev > 35 ? -3 : -2));
@@ -611,7 +571,7 @@ else msg_print("
 #ifdef JP
 else msg_print("½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£");
 #else
-                       else msg_print("You invokes a raw Logrus.");
+                       else msg_print("You invoke a raw Logrus.");
 #endif
                
                        fire_ball(GF_CHAOS, dir, damage, 4);
@@ -621,7 +581,7 @@ else msg_print("
 #ifdef JP
 else msg_print("ʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
 #else
-                       else msg_print("You breathes disintegration.");
+                       else msg_print("You breathe disintegration.");
 #endif
                
                        fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 35 ? -3 : -2));
@@ -631,7 +591,7 @@ else msg_print("ʬ
 #ifdef JP
 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts an acid ball.");
+                       else msg_print("You cast an acid ball.");
 #endif
                
                        fire_ball(GF_ACID, dir, damage, 2);
@@ -641,7 +601,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a lightning ball.");
+                       else msg_print("You cast a lightning ball.");
 #endif
                
                        fire_ball(GF_ELEC, dir, damage, 2);
@@ -651,7 +611,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a fire ball.");
+                       else msg_print("You cast a fire ball.");
 #endif
                
                        fire_ball(GF_FIRE, dir, damage, 2);
@@ -661,7 +621,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a frost ball.");
+                       else msg_print("You cast a frost ball.");
 #endif
                
                        fire_ball(GF_COLD, dir, damage, 2);
@@ -671,7 +631,7 @@ else msg_print("
 #ifdef JP
 else msg_print("°­½­±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a stinking cloud.");
+                       else msg_print("You cast a stinking cloud.");
 #endif
                
                        fire_ball(GF_POIS, dir, damage, 2);
@@ -681,7 +641,7 @@ else msg_print("
 #ifdef JP
 else msg_print("ÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a nether ball.");
+                       else msg_print("You cast a nether ball.");
 #endif
                
                        fire_ball(GF_NETHER, dir, damage, 2);
@@ -691,7 +651,7 @@ else msg_print("
 #ifdef JP
 else msg_print("ή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£");
 #else
-                       else msg_print("You gestures fluidly.");
+                       else msg_print("You gesture fluidly.");
 #endif
                
                        fire_ball(GF_WATER, dir, damage, 4);
@@ -701,7 +661,7 @@ else msg_print("ή
 #ifdef JP
 else msg_print("ËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
 #else
-                       else msg_print("You invokes a mana storm.");
+                       else msg_print("You invoke a mana storm.");
 #endif
                
                        fire_ball(GF_MANA, dir, damage, 4);
@@ -711,14 +671,14 @@ else msg_print("
 #ifdef JP
 else msg_print("°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
 #else
-                       else msg_print("You invokes a darkness storm.");
+                       else msg_print("You invoke a darkness storm.");
 #endif
                
                        fire_ball(GF_DARK, dir, damage, 4);
                break;
        case MS_DRAIN_MANA:
                if (!get_aim_dir(&dir)) return FALSE;
-               fire_ball_hide(GF_DRAIN_MANA, dir, randint(plev*3)+plev, 0);
+               fire_ball_hide(GF_DRAIN_MANA, dir, randint1(plev*3)+plev, 0);
                break;
        case MS_MIND_BLAST:
                if (!get_aim_dir(&dir)) return FALSE;
@@ -749,7 +709,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts an acid bolt.");
+                       else msg_print("You cast an acid bolt.");
 #endif
                
                        fire_bolt(GF_ACID, dir, damage);
@@ -759,7 +719,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a lightning bolt.");
+                       else msg_print("You cast a lightning bolt.");
 #endif
                
                        fire_bolt(GF_ELEC, dir, damage);
@@ -769,7 +729,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a fire bolt.");
+                       else msg_print("You cast a fire bolt.");
 #endif
                
                        fire_bolt(GF_FIRE, dir, damage);
@@ -779,7 +739,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a frost bolt.");
+                       else msg_print("You cast a frost bolt.");
 #endif
                
                        fire_bolt(GF_COLD, dir, damage);
@@ -789,7 +749,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
 #else
-                       else msg_print("You invokes a starburst.");
+                       else msg_print("You invoke a starburst.");
 #endif
                
                        fire_ball(GF_LITE, dir, damage, 4);
@@ -799,7 +759,7 @@ else msg_print("
 #ifdef JP
 else msg_print("ÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a nether bolt.");
+                       else msg_print("You cast a nether bolt.");
 #endif
                
                        fire_bolt(GF_NETHER, dir, damage);
@@ -809,7 +769,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a water bolt.");
+                       else msg_print("You cast a water bolt.");
 #endif
                
                        fire_bolt(GF_WATER, dir, damage);
@@ -819,7 +779,7 @@ else msg_print("
 #ifdef JP
 else msg_print("ËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a mana bolt.");
+                       else msg_print("You cast a mana bolt.");
 #endif
                
                        fire_bolt(GF_MANA, dir, damage);
@@ -829,7 +789,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a plasma bolt.");
+                       else msg_print("You cast a plasma bolt.");
 #endif
                
                        fire_bolt(GF_PLASMA, dir, damage);
@@ -839,7 +799,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a ice bolt.");
+                       else msg_print("You cast a ice bolt.");
 #endif
                
                        fire_bolt(GF_ICE, dir, damage);
@@ -849,7 +809,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       else msg_print("You casts a magic missile.");
+                       else msg_print("You cast a magic missile.");
 #endif
                
                        fire_bolt(GF_MISSILE, dir, damage);
@@ -859,7 +819,7 @@ else msg_print("
 #ifdef JP
 else msg_print("¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£");
 #else
-                       else msg_print("You casts a fearful illusion.");
+                       else msg_print("You cast a fearful illusion.");
 #endif
                
                        fear_monster(dir, plev+10);
@@ -873,7 +833,7 @@ else msg_print("
 #ifdef JP
 else msg_print("ͶÏÇŪ¤Ê¸¸³Ð¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£");
 #else
-                       else msg_print("You casts a mesmerizing illusion.");
+                       else msg_print("You cast a mesmerizing illusion.");
 #endif
                
                        confuse_monster(dir, plev * 2);
@@ -887,7 +847,7 @@ else msg_print("Ͷ
                sleep_monster(dir);
                break;
        case MS_SPEED:
-               (void)set_fast(randint(20 + plev) + plev, FALSE);
+               (void)set_fast(randint1(20 + plev) + plev, FALSE);
                break;
        case MS_HAND_DOOM:
        {
@@ -895,7 +855,7 @@ else msg_print("Ͷ
 #ifdef JP
 else msg_print("<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª");
 #else
-               else msg_print("You invokes the Hand of Doom!");
+               else msg_print("You invoke the Hand of Doom!");
 #endif
 
                fire_ball_hide(GF_HAND_DOOM, dir, 200, 0);
@@ -905,7 +865,7 @@ else msg_print("<
 #ifdef JP
 msg_print("¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£");
 #else
-                       msg_print("You concentrates on your wounds!");
+                       msg_print("You concentrate on your wounds!");
 #endif
                (void)hp_player(plev*6);
                (void)set_stun(0);
@@ -915,15 +875,15 @@ msg_print("
 #ifdef JP
 msg_print("̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-                       msg_print("You casts a Globe of Invulnerability.");
+                       msg_print("You cast a Globe of Invulnerability.");
 #endif
-               (void)set_invuln(randint(7) + 7, FALSE);
+               (void)set_invuln(randint1(7) + 7, FALSE);
                break;
        case MS_BLINK:
-               teleport_player(10);
+               teleport_player(10, 0L);
                break;
        case MS_TELEPORT:
-               teleport_player(plev * 5);
+               teleport_player(plev * 5, 0L);
                break;
        case MS_WORLD:
                world_player = TRUE;
@@ -943,7 +903,8 @@ msg_print("̵
                        msg_print("hek!");
                msg_print(NULL);
 
-               p_ptr->energy += (randint(200)+1200);
+               /* Hack */
+               p_ptr->energy_need -= 1000 + (100 + randint1(200)+200)*TURNS_PER_TICK/10;
 
                /* Redraw map */
                p_ptr->redraw |= (PR_MAP);
@@ -961,20 +922,48 @@ msg_print("̵
        case MS_TELE_TO:
        {
                monster_type *m_ptr;
+               monster_race *r_ptr;
                char m_name[80];
 
                if (!target_set(TARGET_KILL)) return FALSE;
                if (!cave[target_row][target_col].m_idx) break;
-               if (!los(py, px, target_row, target_col)) break;
+               if (!player_has_los_bold(target_row, target_col)) break;
+               if (!projectable(py, px, target_row, target_col)) break;
                m_ptr = &m_list[cave[target_row][target_col].m_idx];
+               r_ptr = &r_info[m_ptr->r_idx];
                monster_desc(m_name, m_ptr, 0);
+               if (r_ptr->flagsr & RFR_RES_TELE)
+               {
+                       if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL))
+                       {
+                               if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+#ifdef JP
+                               msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª", m_name);
+#else
+                               msg_format("%s is unaffected!", m_name);
+#endif
+
+                               break;
+                       }
+                       else if (r_ptr->level > randint1(100))
+                       {
+                               if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+#ifdef JP
+                               msg_format("%s¤Ë¤ÏÂÑÀ­¤¬¤¢¤ë¡ª", m_name);
+#else
+                               msg_format("%s resists!", m_name);
+#endif
+
+                               break;
+                       }
+               }
 #ifdef JP
 msg_format("%s¤ò°ú¤­Ìᤷ¤¿¡£", m_name);
 #else
-                       msg_format("You commands %s to return.", m_name);
+               msg_format("You command %s to return.", m_name);
 #endif
 
-               teleport_to_player(cave[target_row][target_col].m_idx, 100);
+               teleport_monster_to(cave[target_row][target_col].m_idx, py, px, 100, TELEPORT_PASSIVE);
                break;
        }
        case MS_TELE_AWAY:
@@ -984,49 +973,35 @@ msg_format("%s
                break;
        case MS_TELE_LEVEL:
        {
+               int target_m_idx;
                monster_type *m_ptr;
                monster_race *r_ptr;
                char m_name[80];
 
                if (!target_set(TARGET_KILL)) return FALSE;
-               if (!cave[target_row][target_col].m_idx) break;
-               if (!los(py, px, target_row, target_col)) break;
-               m_ptr = &m_list[cave[target_row][target_col].m_idx];
+               target_m_idx = cave[target_row][target_col].m_idx;
+               if (!target_m_idx) break;
+               if (!player_has_los_bold(target_row, target_col)) break;
+               if (!projectable(py, px, target_row, target_col)) break;
+               m_ptr = &m_list[target_m_idx];
                r_ptr = &r_info[m_ptr->r_idx];
                monster_desc(m_name, m_ptr, 0);
 #ifdef JP
-msg_format("%s¤Î­¤ò»Ø¤µ¤·¤¿¡£", m_name);
-#else
-                       msg_format("You gestures at %s's feet.", m_name);
-#endif
-
-               if ((r_ptr->flags3 & RF3_RES_TELE) || (r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->level + randint(50) > plev + randint(60)))
-               {
-#ifdef JP
-msg_print("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª");
+               msg_format("%^s¤Î­¤ò»Ø¤µ¤·¤¿¡£", m_name);
 #else
-                       msg_format("%s are unaffected!", m_name);
+               msg_format("You gesture at %^s's feet.", m_name);
 #endif
 
-               }
-               else if (randint(2) == 1)
+               if ((r_ptr->flagsr & (RFR_EFF_RES_NEXU_MASK | RFR_RES_TELE)) ||
+                       (r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->level + randint1(50) > plev + randint1(60)))
                {
 #ifdef JP
-msg_format("%s¤Ï¾²¤òÆͤ­ÇˤäÆÄÀ¤ó¤Ç¤¤¤Ã¤¿¡£", m_name);
+                       msg_print("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª");
 #else
-                       msg_format("%s sink through the floor.", m_name);
+                       msg_format("%^s is unaffected!", m_name);
 #endif
-                       delete_monster_idx(cave[target_row][target_col].m_idx);
-               }
-               else
-               {
-#ifdef JP
-msg_format("%s¤ÏÅ·°æ¤òÆͤ­ÇˤäÆÃè¤ØÉ⤤¤Æ¤¤¤Ã¤¿¡£",m_name);
-#else
-                       msg_format("%s rise up through the ceiling.", m_name);
-#endif
-                       delete_monster_idx(cave[target_row][target_col].m_idx);
                }
+               else teleport_level(target_m_idx);
                break;
        }
        case MS_PSY_SPEAR:
@@ -1035,7 +1010,7 @@ msg_format("%s
 #ifdef JP
 else msg_print("¸÷¤Î·õ¤òÊü¤Ã¤¿¡£");
 #else
-                       else msg_print("You throws a psycho-spear.");
+                       else msg_print("You throw a psycho-spear.");
 #endif
                (void)fire_beam(GF_PSY_SPEAR, dir, damage);
                break;
@@ -1043,7 +1018,7 @@ else msg_print("
 #ifdef JP
 msg_print("°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£");
 #else
-                       msg_print("You gestures in shadow.");
+                       msg_print("You gesture in shadow.");
 #endif
                (void)unlite_area(10, 3);
                break;
@@ -1052,7 +1027,7 @@ msg_print("
 #ifdef JP
 msg_print("¼öʸ¤ò¾§¤¨¤Æ¼Ù°­¤ËÈù¾Ð¤ó¤À¡£");
 #else
-                       msg_print("You casts a spell and cackles evilly.");
+                       msg_print("You cast a spell and cackles evilly.");
 #endif
                trap_creation(target_row, target_col);
                break;
@@ -1067,7 +1042,7 @@ msg_print("
 #ifdef JP
 msg_print("»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
 #else
-               msg_print("You casts a animate dead.");
+               msg_print("You cast a animate dead.");
 #endif
                (void)animate_dead(0, py, px);
                break;
@@ -1079,27 +1054,27 @@ msg_print("
 #ifdef JP
 msg_print("±ç·³¤ò¾¤´­¤·¤¿¡£");
 #else
-                       msg_print("You summons minions.");
+                       msg_print("You summon minions.");
 #endif
                for (k = 0;k < 4; k++)
                {
-                       (void)summon_kin_player(TRUE, plev, target_row, target_col, TRUE);
+                       (void)summon_kin_player(plev, target_row, target_col, (PM_FORCE_PET | PM_ALLOW_GROUP));
                }
                break;
        }
        case MS_S_CYBER:
        {
                int k;
-               int max_cyber = (dun_level / 50) + randint(3);
+               int max_cyber = (dun_level / 50) + randint1(3);
                if (!target_set(TARGET_KILL)) return FALSE;
 #ifdef JP
 msg_print("¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´­¤·¤¿¡ª");
 #else
-                       msg_print("You summons Cyberdemons!");
+                       msg_print("You summon Cyberdemons!");
 #endif
                if (max_cyber > 4) max_cyber = 4;
                for (k = 0;k < max_cyber; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, TRUE, TRUE, TRUE, FALSE, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, mode);
                break;
        }
        case MS_S_MONSTER:
@@ -1109,10 +1084,10 @@ msg_print("
 #ifdef JP
 msg_print("Ãç´Ö¤ò¾¤´­¤·¤¿¡£");
 #else
-                       msg_print("You summons help.");
+                       msg_print("You summon help.");
 #endif
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, 0, TRUE, TRUE, TRUE, unique_okay, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
                break;
        }
        case MS_S_MONSTERS:
@@ -1122,10 +1097,10 @@ msg_print("
 #ifdef JP
 msg_print("¥â¥ó¥¹¥¿¡¼¤ò¾¤´­¤·¤¿¡ª");
 #else
-                       msg_print("You summons monsters!");
+                       msg_print("You summon monsters!");
 #endif
                for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, 0, TRUE, TRUE, TRUE, unique_okay, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
                break;
        }
        case MS_S_ANT:
@@ -1135,10 +1110,10 @@ msg_print("
 #ifdef JP
 msg_print("¥¢¥ê¤ò¾¤´­¤·¤¿¡£");
 #else
-                       msg_print("You summons ants.");
+                       msg_print("You summon ants.");
 #endif
                for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, TRUE, TRUE, TRUE, FALSE, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, mode);
                break;
        }
        case MS_S_SPIDER:
@@ -1148,10 +1123,10 @@ msg_print("
 #ifdef JP
 msg_print("ÃØéá¤ò¾¤´­¤·¤¿¡£");
 #else
-                       msg_print("You summons spiders.");
+                       msg_print("You summon spiders.");
 #endif
                for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, TRUE, TRUE, TRUE, FALSE, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, mode);
                break;
        }
        case MS_S_HOUND:
@@ -1161,10 +1136,10 @@ msg_print("
 #ifdef JP
 msg_print("¥Ï¥¦¥ó¥É¤ò¾¤´­¤·¤¿¡£");
 #else
-                       msg_print("You summons hounds.");
+                       msg_print("You summon hounds.");
 #endif
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, TRUE, TRUE, TRUE, FALSE, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, mode);
                break;
        }
        case MS_S_HYDRA:
@@ -1174,10 +1149,10 @@ msg_print("
 #ifdef JP
 msg_print("¥Ò¥É¥é¤ò¾¤´­¤·¤¿¡£");
 #else
-                       msg_print("You summons hydras.");
+                       msg_print("You summon hydras.");
 #endif
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, TRUE, TRUE, TRUE, FALSE, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, mode);
                break;
        }
        case MS_S_ANGEL:
@@ -1187,10 +1162,10 @@ msg_print("
 #ifdef JP
 msg_print("Å·»È¤ò¾¤´­¤·¤¿¡ª");
 #else
-                       msg_print("You summons angel!");
+                       msg_print("You summon angel!");
 #endif
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, TRUE, TRUE, TRUE, FALSE, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, mode);
                break;
        }
        case MS_S_DEMON:
@@ -1200,10 +1175,10 @@ msg_print("ŷ
 #ifdef JP
 msg_print("º®Æ٤εÜÄ¤é°­Ëâ¤ò¾¤´­¤·¤¿¡ª");
 #else
-                       msg_print("You summons a demon from the Courts of Chaos!");
+                       msg_print("You summon a demon from the Courts of Chaos!");
 #endif
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, TRUE, TRUE, TRUE, unique_okay, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, (mode | u_mode));
                break;
        }
        case MS_S_UNDEAD:
@@ -1213,10 +1188,10 @@ msg_print("
 #ifdef JP
 msg_print("¥¢¥ó¥Ç¥Ã¥É¤Î¶¯Å¨¤ò¾¤´­¤·¤¿¡ª");
 #else
-                       msg_print("You summons an undead adversary!");
+                       msg_print("You summon an undead adversary!");
 #endif
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, (mode | u_mode));
                break;
        }
        case MS_S_DRAGON:
@@ -1226,10 +1201,10 @@ msg_print("
 #ifdef JP
 msg_print("¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª");
 #else
-                       msg_print("You summons dragon!");
+                       msg_print("You summon dragon!");
 #endif
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, TRUE, TRUE, TRUE, unique_okay, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, (mode | u_mode));
                break;
        }
        case MS_S_HI_UNDEAD:
@@ -1239,10 +1214,10 @@ msg_print("
 #ifdef JP
 msg_print("¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´­¤·¤¿¡ª");
 #else
-                       msg_print("You summons greater undead!");
+                       msg_print("You summon greater undead!");
 #endif
                for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
                break;
        }
        case MS_S_HI_DRAGON:
@@ -1252,10 +1227,10 @@ msg_print("
 #ifdef JP
 msg_print("¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª");
 #else
-                       msg_print("You summons ancient dragons!");
+                       msg_print("You summon ancient dragons!");
 #endif
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, TRUE, TRUE, TRUE, unique_okay, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, (mode | u_mode));
                break;
        }
        case MS_S_AMBERITE:
@@ -1263,12 +1238,12 @@ msg_print("
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
 #ifdef JP
-msg_print("¥¢¥ó¥Ð¡¼¤Î²¦¤ò¾¤´­¤·¤¿¡ª");
+msg_print("¥¢¥ó¥Ð¡¼¤Î²¦²¤ò¾¤´­¤·¤¿¡ª");
 #else
-                       msg_print("You summons Lords of Amber!");
+                       msg_print("You summon Lords of Amber!");
 #endif
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, TRUE, TRUE, TRUE, TRUE, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
                break;
        }
        case MS_S_UNIQUE:
@@ -1278,12 +1253,12 @@ msg_print("
 #ifdef JP
 msg_print("ÆÃÊ̤ʶ¯Å¨¤ò¾¤´­¤·¤¿¡ª");
 #else
-                       msg_print("You summons special opponents!");
+                       msg_print("You summon special opponents!");
 #endif
                for (k = 0;k < 4; k++)
-                       if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, TRUE, TRUE, TRUE, TRUE, FALSE)) count++;
+                       if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE))) count++;
                for (k = count;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
                break;
        }
        default:
@@ -1320,7 +1295,7 @@ msg_print("
                return TRUE;
        }
 
-       if (!mane_num)
+       if (!p_ptr->mane_num)
        {
 #ifdef JP
 msg_print("¤Þ¤Í¤é¤ì¤ë¤â¤Î¤¬²¿¤â¤Ê¤¤¡ª");
@@ -1334,7 +1309,7 @@ msg_print("
        /* get power */
        if (!get_mane_power(&n, baigaesi)) return FALSE;
 
-       spell = monster_powers[mane_spell[n]];
+       spell = monster_powers[p_ptr->mane_spell[n]];
 
        /* Spell failure chance */
        chance = spell.manefail;
@@ -1342,14 +1317,13 @@ msg_print("
        /* Reduce failure rate by "effective" level adjustment */
        if (plev > spell.level) chance -= 3 * (plev - spell.level);
 
-       if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance += 10;
-       if (p_ptr->pseikaku == SEIKAKU_KIREMONO) chance -= 3;
-
-       /* Reduce failure rate by INT/WIS adjustment */
-       chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[spell.use_stat]] - 1);
+       /* Reduce failure rate by 1 stat and DEX adjustment */
+       chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[spell.use_stat]] + adj_mag_stat[p_ptr->stat_ind[A_DEX]] - 2) / 2;
 
        if (spell.manedam) chance = chance * damage / spell.manedam;
 
+       chance += p_ptr->to_m_chance;
+
        /* Extract the minimum failure rate */
        minfail = adj_mag_fail[p_ptr->stat_ind[spell.use_stat]];
 
@@ -1364,7 +1338,7 @@ msg_print("
        if (chance > 95) chance = 95;
 
        /* Failed spell */
-       if (rand_int(100) < chance)
+       if (randint0(100) < chance)
        {
                if (flush_failure) flush();
 #ifdef JP
@@ -1380,23 +1354,23 @@ msg_print("
                sound(SOUND_ZAP);
 
                /* Cast the spell */
-               cast = use_mane(mane_spell[n]);
+               cast = use_mane(p_ptr->mane_spell[n]);
 
                if (!cast) return FALSE;
        }
 
-       mane_num--;
-       for (j = n; j < mane_num;j++)
+       p_ptr->mane_num--;
+       for (j = n; j < p_ptr->mane_num;j++)
        {
-               mane_spell[j] = mane_spell[j+1];
-               mane_dam[j] = mane_dam[j+1];
+               p_ptr->mane_spell[j] = p_ptr->mane_spell[j+1];
+               p_ptr->mane_dam[j] = p_ptr->mane_dam[j+1];
        }
 
        /* Take a turn */
        energy_use = 100;
 
        /* Window stuff */
-       p_ptr->redraw |= (PR_MANE);
+       p_ptr->redraw |= (PR_IMITATION);
        p_ptr->window |= (PW_PLAYER);
        p_ptr->window |= (PW_SPELL);