OSDN Git Service

[Refactor] #37353 混乱時のコマンド制限処理を cmd_limit_confused() に統合。 / Integrate command limitat...
[hengband/hengband.git] / src / mane.c
index 40c0143..fbffdd3 100644 (file)
@@ -1,63 +1,61 @@
-/* File: mind.c */
-
-/*
- * 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.  Other copyrights may also apply.
+/*!
+ * @file mane.c
+ * @brief ものまねの処理実装 / Imitation code
+ * @date 2014/01/14
+ * @author
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
+ * This software may be copied and distributed for educational, research,\n
+ * and not for profit purposes provided that this copyright and statement\n
+ * are included in all such copies.  Other copyrights may also apply.\n
+ * 2014 Deskull rearranged comment for Doxygen.\n
  */
 
-/* Purpose: Mane code */
-
 #include "angband.h"
-
+#include "spells-summon.h"
+#include "spells-status.h"
+#include "cmd-spell.h"
 
 static int damage;
 
-static void mane_info(char *p, int power, int dam)
+/*!
+ * @brief 受け取ったパラメータに応じてものまねの効果情報をまとめたフォーマットを返す
+ * @param p 情報を返す文字列参照ポインタ
+ * @param power ものまねの効力の種類
+ * @param dam ものまねの威力
+ * @return なし
+ */
+static void mane_info(char *p, int power, HIT_POINT dam)
 {
-       int plev = p_ptr->lev;
-#ifdef JP
-       cptr s_dam = "»½ý:";
-       cptr s_dur = "´ü´Ö:";
-       cptr s_range = "ÈÏ°Ï:";
-       cptr s_heal = "²óÉü:";
-#else
-       cptr s_dam = "dam ";
-       cptr s_dur = "dur ";
-       cptr s_range = "range ";
-       cptr s_heal = "heal ";
-#endif
+       PLAYER_LEVEL plev = p_ptr->lev;
 
        strcpy(p, "");
 
        if ((power > 2 && power < 41) || (power > 41 && power < 59) || (power == 75))
-               sprintf(p, " %s%d", s_dam, dam);
+               sprintf(p, " %s%d", KWD_DAM, (int)dam);
        else
        {
                switch (power)
                {
                        case 41:
-                               sprintf(p, " %sd%d+%d", s_heal, plev * 3, plev);
+                               sprintf(p, " %sd%d+%d", KWD_HEAL, plev * 3, plev);
                                break;
                        case 64:
-                               sprintf(p, " %sd%d+%d", s_dur, 20+plev, plev);
+                               sprintf(p, " %sd%d+%d", KWD_DURATION, 20+plev, plev);
                                break;
                        case 66:
-                               sprintf(p, " %s%d", s_heal, plev*6);
+                               sprintf(p, " %s%d", KWD_HEAL, plev*6);
                                break;
                        case 67:
-                               sprintf(p, " %sd7+7", s_dur);
+                               sprintf(p, " %sd7+7", KWD_DURATION);
                                break;
                        case 68:
-                               sprintf(p, " %s10", s_range);
+                               sprintf(p, " %s10", KWD_SPHERE);
                                break;
                        case 69:
-                               sprintf(p, " %s%d", s_range, plev * 5);
+                               sprintf(p, " %s%d", KWD_SPHERE, plev * 5);
                                break;
                        case 79:
-                               sprintf(p, " %s5", s_range);
+                               sprintf(p, " %s5", KWD_SPHERE);
                                break;
                        default:
                                break;
@@ -66,9 +64,13 @@ static void mane_info(char *p, int power, int dam)
 }
 
 
-/*
+/*!
+ * @brief どのものまねを発動するか選択する処理 /
  * Allow user to choose a imitation.
- *
+ * @param sn 実行したものまねのIDを返す参照ポインタ(キャンセルなどの場合-1を返す)
+ * @param baigaesi TRUEならば倍返し上の処理として行う
+ * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
+ * @details
  * If a valid spell is chosen, saves it in '*sn' and returns TRUE
  * If the user hits escape, returns FALSE, and set '*sn' to -1
  * If there are no legal choices, returns FALSE, and sets '*sn' to -2
@@ -84,20 +86,16 @@ static int get_mane_power(int *sn, bool baigaesi)
 {
        int             i = 0;
        int             num = 0;
-       int             y = 1;
-       int             x = 18;
+       TERM_LEN y = 1;
+       TERM_LEN x = 18;
        int             minfail = 0;
-       int             plev = p_ptr->lev;
+       PLAYER_LEVEL plev = p_ptr->lev;
        int             chance = 0;
        int             ask;
        char            choice;
        char            out_val[160];
        char            comment[80];
-#ifdef JP
-cptr            p = "ǽÎÏ";
-#else
-       cptr            p = "power";
-#endif
+       concptr p = _("能力", "power");
 
        monster_power   spell;
        bool            flag, redraw;
@@ -115,11 +113,7 @@ cptr            p = "ǽ
 
        /* Build a prompt (accept all spells) */
        (void)strnfmt(out_val, 78, 
-#ifdef JP
-                     "(%c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©",
-#else
-                     "(%c-%c, *=List, ESC=exit) Use which %s? ",
-#endif
+                     _("(%c-%c, '*'で一覧, ESC) どの%sをまねますか?", "(%c-%c, *=List, ESC=exit) Use which %s? "),
                      I2A(0), I2A(num - 1), p);
 
        /* Get a spell from the user */
@@ -140,23 +134,12 @@ cptr            p = "ǽ
 
                                /* Show list */
                                redraw = TRUE;
-
-                               /* Save the screen */
                                screen_save();
 
                                /* Display a list of spells */
                                prt("", y, x);
-#ifdef JP
-put_str("̾Á°", y, x + 5);
-#else
-                               put_str("Name", y, x + 5);
-#endif
-
-#ifdef JP
-put_str("¼ºÎ¨ ¸ú²Ì", y, x + 36);
-#else
-                               put_str("Fail Info", y, x + 35);
-#endif
+                               put_str(_("名前", "Name"), y, x + 5);
+                               put_str(_("失率 効果", "Fail Info"), y, x + 36);
 
 
                                /* Dump the spells */
@@ -173,7 +156,7 @@ 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 * p_ptr->mane_dam[i] / spell.manedam;
+                                       if (spell.manedam) chance = chance * (baigaesi ? p_ptr->mane_dam[i] * 2 : p_ptr->mane_dam[i]) / spell.manedam;
 
                                        chance += p_ptr->to_m_chance;
 
@@ -209,8 +192,6 @@ put_str("
                        {
                                /* Hide list */
                                redraw = FALSE;
-
-                               /* Restore the screen */
                                screen_load();
                        }
 
@@ -222,7 +203,7 @@ put_str("
                ask = isupper(choice);
 
                /* Lowercase */
-               if (ask) choice = tolower(choice);
+               if (ask) choice = (char)tolower(choice);
 
                /* Extract request */
                i = (islower(choice) ? A2I(choice) : -1);
@@ -243,12 +224,7 @@ put_str("
                        char tmp_val[160];
 
                        /* Prompt */
-#ifdef JP
-                       (void) strnfmt(tmp_val, 78, "%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©", monster_powers[p_ptr->mane_spell[i]].name);
-#else
-                       (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[p_ptr->mane_spell[i]].name);
-#endif
-
+                       (void) strnfmt(tmp_val, 78, _("%sをまねますか?", "Use %s? "), monster_powers[p_ptr->mane_spell[i]].name);
 
                        /* Belay that order */
                        if (!get_check(tmp_val)) continue;
@@ -257,15 +233,10 @@ put_str("
                /* Stop the loop */
                flag = TRUE;
        }
-
-       /* Restore the screen */
        if (redraw) screen_load();
 
-       /* Show choices */
        p_ptr->window |= (PW_SPELL);
-
-       /* Window stuff */
-       window_stuff();
+       handle_stuff();
 
        /* Abort if needed */
        if (!flag) return (FALSE);
@@ -280,16 +251,18 @@ put_str("
 }
 
 
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'imitator'.
+/*!
+ * @brief ものまね処理の発動 /
+ * do_cmd_cast calls this function if the player's class is 'imitator'.
+ * @param spell 発動するモンスター攻撃のID
+ * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
  */
 static bool use_mane(int spell)
 {
-       int             dir;
-       int             plev = p_ptr->lev;
-       u32b mode = (PM_ALLOW_GROUP | PM_FORCE_PET);
-       u32b u_mode = 0L;
+       DIRECTION dir;
+       PLAYER_LEVEL plev = p_ptr->lev;
+       BIT_FLAGS mode = (PM_ALLOW_GROUP | PM_FORCE_PET);
+       BIT_FLAGS u_mode = 0L;
 
        if (randint1(50+plev) < plev/10) u_mode = PM_ALLOW_UNIQUE;
 
@@ -297,413 +270,249 @@ static bool use_mane(int spell)
        /* spell code */
        switch (spell)
        {
-       case MS_SHRIEK:
-#ifdef JP
-msg_print("¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£");
-#else
-               msg_print("You make a high pitched shriek.");
-#endif
 
+       case MS_SHRIEK:
+               msg_print(_("かん高い金切り声をあげた。", "You make a high pitched shriek."));
                aggravate_monsters(0);
                break;
+
        case MS_XXX1:
                break;
+
        case MS_DISPEL:
        {
-               monster_type *m_ptr;
-               char m_name[80];
+               MONSTER_IDX 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
-                       m_ptr->energy_need += ENERGY_NEED();
-               }
-               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(p_ptr->y, p_ptr->x, target_row, target_col)) break;
+               dispel_monster_status(m_idx);
                break;
        }
+
        case MS_ROCKET:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£");
-#else
-                       else msg_print("You fire a rocket.");
-#endif
-               
+               else msg_print(_("ロケットを発射した。", "You fire a rocket."));
                        fire_rocket(GF_ROCKET, dir, damage, 2);
                break;
+
        case MS_SHOOT:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("Ìð¤òÊü¤Ã¤¿¡£");
-#else
-                       else msg_print("You fire an arrow.");
-#endif
-               
+               else msg_print(_("矢を放った。", "You fire an arrow."));
                        fire_bolt(GF_ARROW, dir, damage);
                break;
+
        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 breathe acid.");
-#endif
-               
-                       fire_ball(GF_ACID, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("酸のブレスを吐いた。", "You breathe acid."));
+               fire_breath(GF_ACID, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_ELEC:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe lightning.");
-#endif
-               
-                       fire_ball(GF_ELEC, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("稲妻のブレスを吐いた。", "You breathe lightning."));
+               fire_breath(GF_ELEC, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_FIRE:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe fire.");
-#endif
-               
-                       fire_ball(GF_FIRE, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("火炎のブレスを吐いた。", "You breathe fire."));
+               fire_breath(GF_FIRE, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_COLD:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("Î䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe frost.");
-#endif
-               
-                       fire_ball(GF_COLD, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("冷気のブレスを吐いた。", "You breathe frost."));
+               fire_breath(GF_COLD, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_POIS:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe gas.");
-#endif
-               
-                       fire_ball(GF_POIS, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("ガスのブレスを吐いた。", "You breathe gas."));
+               fire_breath(GF_POIS, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_NETHER:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe nether.");
-#endif
-               
-                       fire_ball(GF_NETHER, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("地獄のブレスを吐いた。", "You breathe nether."));
+               fire_breath(GF_NETHER, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_LITE:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("Á®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe light.");
-#endif
-               
-                       fire_ball(GF_LITE, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("閃光のブレスを吐いた。", "You breathe light."));
+               fire_breath(GF_LITE, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_DARK:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe darkness.");
-#endif
-               
-                       fire_ball(GF_DARK, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("暗黒のブレスを吐いた。", "You breathe darkness."));
+               fire_breath(GF_DARK, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_CONF:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("º®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe confusion.");
-#endif
-               
-                       fire_ball(GF_CONFUSION, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("混乱のブレスを吐いた。", "You breathe confusion."));
+               fire_breath(GF_CONFUSION, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_SOUND:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe sound.");
-#endif
-               
-                       fire_ball(GF_SOUND, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("轟音のブレスを吐いた。", "You breathe sound."));
+               fire_breath(GF_SOUND, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_CHAOS:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe chaos.");
-#endif
-               
-                       fire_ball(GF_CHAOS, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("カオスのブレスを吐いた。", "You breathe chaos."));
+               fire_breath(GF_CHAOS, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_DISEN:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("Îô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe disenchantment.");
-#endif
-               
-                       fire_ball(GF_DISENCHANT, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("劣化のブレスを吐いた。", "You breathe disenchantment."));
+               fire_breath(GF_DISENCHANT, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_NEXUS:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe nexus.");
-#endif
-               
-                       fire_ball(GF_NEXUS, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("因果混乱のブレスを吐いた。", "You breathe nexus."));
+                       fire_breath(GF_NEXUS, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_TIME:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe time.");
-#endif
-               
-                       fire_ball(GF_TIME, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("時間逆転のブレスを吐いた。", "You breathe time."));
+               fire_breath(GF_TIME, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_INERTIA:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe inertia.");
-#endif
-               
-                       fire_ball(GF_INERTIA, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("遅鈍のブレスを吐いた。", "You breathe inertia."));
+                       fire_breath(GF_INERTIAL, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_GRAVITY:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe gravity.");
-#endif
-               
-                       fire_ball(GF_GRAVITY, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("重力のブレスを吐いた。", "You breathe gravity."));         
+               fire_breath(GF_GRAVITY, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_SHARDS:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe shards.");
-#endif
-               
-                       fire_ball(GF_SHARDS, dir, damage, (plev > 35 ? -3 : -2));
+               else msg_print(_("破片のブレスを吐いた。", "You breathe shards."));
+               fire_breath(GF_SHARDS, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_PLASMA:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe plasma.");
-#endif
+               else msg_print(_("プラズマのブレスを吐いた。", "You breathe plasma."));
                
-                       fire_ball(GF_PLASMA, dir, damage, (plev > 35 ? -3 : -2));
+               fire_breath(GF_PLASMA, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_FORCE:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe force.");
-#endif
+               else msg_print(_("フォースのブレスを吐いた。", "You breathe force."));
                
-                       fire_ball(GF_FORCE, dir, damage, (plev > 35 ? -3 : -2));
+               fire_breath(GF_FORCE, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BR_MANA:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe mana.");
-#endif
+               else msg_print(_("魔力のブレスを吐いた。", "You breathe mana."));
                
-                       fire_ball(GF_MANA, dir, damage, (plev > 35 ? -3 : -2));
+               fire_breath(GF_MANA, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BALL_NUKE:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("Êü¼Íǽµå¤òÊü¤Ã¤¿¡£");
-#else
-                       else msg_print("You cast a ball of radiation.");
-#endif
+               else msg_print(_("放射能球を放った。", "You cast a ball of radiation."));
                
                        fire_ball(GF_NUKE, dir, damage, 2);
                break;
+
        case MS_BR_NUKE:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("Êü¼ÍÀ­ÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe toxic waste.");
-#endif
+               else msg_print(_("放射性廃棄物のブレスを吐いた。", "You breathe toxic waste."));
                
-                       fire_ball(GF_NUKE, dir, damage, (plev > 35 ? -3 : -2));
+               fire_breath(GF_NUKE, dir, damage, (plev > 35 ? 3 : 2));
                break;
+
        case MS_BALL_CHAOS:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£");
-#else
-                       else msg_print("You invoke a raw Logrus.");
-#endif
+               else msg_print(_("純ログルスを放った。", "You invoke a raw Logrus."));
                
                        fire_ball(GF_CHAOS, dir, damage, 4);
                break;
        case MS_BR_DISI:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
-#else
-                       else msg_print("You breathe disintegration.");
-#endif
+               else msg_print(_("分解のブレスを吐いた。", "You breathe disintegration."));
                
-                       fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 35 ? -3 : -2));
+               fire_breath(GF_DISINTEGRATE, dir, damage, (plev > 35 ? 3 : 2));
                break;
        case MS_BALL_ACID:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast an acid ball.");
-#endif
+               else msg_print(_("アシッド・ボールの呪文を唱えた。", "You cast an acid ball."));
                
                        fire_ball(GF_ACID, dir, damage, 2);
                break;
        case MS_BALL_ELEC:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a lightning ball.");
-#endif
+               else msg_print(_("サンダー・ボールの呪文を唱えた。", "You cast a lightning ball."));
                
                        fire_ball(GF_ELEC, dir, damage, 2);
                break;
        case MS_BALL_FIRE:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a fire ball.");
-#endif
+               else msg_print(_("ファイア・ボールの呪文を唱えた。", "You cast a fire ball."));
                
                        fire_ball(GF_FIRE, dir, damage, 2);
                break;
        case MS_BALL_COLD:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a frost ball.");
-#endif
+               else msg_print(_("アイス・ボールの呪文を唱えた。", "You cast a frost ball."));
                
                        fire_ball(GF_COLD, dir, damage, 2);
                break;
        case MS_BALL_POIS:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("°­½­±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a stinking cloud.");
-#endif
+               else msg_print(_("悪臭雲の呪文を唱えた。", "You cast a stinking cloud."));
                
                        fire_ball(GF_POIS, dir, damage, 2);
                break;
        case MS_BALL_NETHER:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a nether ball.");
-#endif
+               else msg_print(_("地獄球の呪文を唱えた。", "You cast a nether ball."));
                
                        fire_ball(GF_NETHER, dir, damage, 2);
                break;
        case MS_BALL_WATER:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£");
-#else
-                       else msg_print("You gesture fluidly.");
-#endif
+               else msg_print(_("流れるような身振りをした。", "You gesture fluidly."));
                
                        fire_ball(GF_WATER, dir, damage, 4);
                break;
        case MS_BALL_MANA:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
-#else
-                       else msg_print("You invoke a mana storm.");
-#endif
+               else msg_print(_("魔力の嵐の呪文を念じた。", "You invoke a mana storm."));
                
                        fire_ball(GF_MANA, dir, damage, 4);
                break;
        case MS_BALL_DARK:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
-#else
-                       else msg_print("You invoke a darkness storm.");
-#endif
+               else msg_print(_("暗黒の嵐の呪文を念じた。", "You invoke a darkness storm."));
                
                        fire_ball(GF_DARK, dir, damage, 4);
                break;
@@ -737,121 +546,73 @@ else msg_print("
                break;
        case MS_BOLT_ACID:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast an acid bolt.");
-#endif
+               else msg_print(_("アシッド・ボルトの呪文を唱えた。", "You cast an acid bolt."));
                
                        fire_bolt(GF_ACID, dir, damage);
                break;
        case MS_BOLT_ELEC:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a lightning bolt.");
-#endif
+               else msg_print(_("サンダー・ボルトの呪文を唱えた。", "You cast a lightning bolt."));
                
                        fire_bolt(GF_ELEC, dir, damage);
                break;
        case MS_BOLT_FIRE:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a fire bolt.");
-#endif
+               else msg_print(_("ファイア・ボルトの呪文を唱えた。", "You cast a fire bolt."));
                
                        fire_bolt(GF_FIRE, dir, damage);
                break;
        case MS_BOLT_COLD:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a frost bolt.");
-#endif
+               else msg_print(_("アイス・ボルトの呪文を唱えた。", "You cast a frost bolt."));
                
                        fire_bolt(GF_COLD, dir, damage);
                break;
        case MS_STARBURST:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
-#else
-                       else msg_print("You invoke a starburst.");
-#endif
+               else msg_print(_("スターバーストの呪文を念じた。", "You invoke a starburst."));
                
                        fire_ball(GF_LITE, dir, damage, 4);
                break;
        case MS_BOLT_NETHER:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a nether bolt.");
-#endif
+               else msg_print(_("地獄の矢の呪文を唱えた。", "You cast a nether bolt."));
                
                        fire_bolt(GF_NETHER, dir, damage);
                break;
        case MS_BOLT_WATER:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a water bolt.");
-#endif
+               else msg_print(_("ウォーター・ボルトの呪文を唱えた。", "You cast a water bolt."));
                
                        fire_bolt(GF_WATER, dir, damage);
                break;
        case MS_BOLT_MANA:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a mana bolt.");
-#endif
+               else msg_print(_("魔力の矢の呪文を唱えた。", "You cast a mana bolt."));
                
                        fire_bolt(GF_MANA, dir, damage);
                break;
        case MS_BOLT_PLASMA:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a plasma bolt.");
-#endif
+               else msg_print(_("プラズマ・ボルトの呪文を唱えた。", "You cast a plasma bolt."));
                
                        fire_bolt(GF_PLASMA, dir, damage);
                break;
        case MS_BOLT_ICE:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a ice bolt.");
-#endif
+               else msg_print(_("極寒の矢の呪文を唱えた。", "You cast a ice bolt."));
                
                        fire_bolt(GF_ICE, dir, damage);
                break;
        case MS_MAGIC_MISSILE:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       else msg_print("You cast a magic missile.");
-#endif
+               else msg_print(_("マジック・ミサイルの呪文を唱えた。", "You cast a magic missile."));
                
                        fire_bolt(GF_MISSILE, dir, damage);
                break;
        case MS_SCARE:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£");
-#else
-                       else msg_print("You cast a fearful illusion.");
-#endif
+               else msg_print(_("恐ろしげな幻覚を作り出した。", "You cast a fearful illusion."));
                
                        fear_monster(dir, plev+10);
                break;
@@ -861,21 +622,17 @@ else msg_print("
                break;
        case MS_CONF:
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("ͶÏÇŪ¤Ê¸¸³Ð¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£");
-#else
-                       else msg_print("You cast a mesmerizing illusion.");
-#endif
+               else msg_print(_("誘惑的な幻覚をつくり出した。", "You cast a mesmerizing illusion."));
                
                        confuse_monster(dir, plev * 2);
                break;
        case MS_SLOW:
                if (!get_aim_dir(&dir)) return FALSE;
-               slow_monster(dir);
+               slow_monster(dir, plev);
                break;
        case MS_SLEEP:
                if (!get_aim_dir(&dir)) return FALSE;
-               sleep_monster(dir);
+               sleep_monster(dir, plev);
                break;
        case MS_SPEED:
                (void)set_fast(randint1(20 + plev) + plev, FALSE);
@@ -883,67 +640,41 @@ else msg_print("Ͷ
        case MS_HAND_DOOM:
        {
                if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª");
-#else
-               else msg_print("You invoke the Hand of Doom!");
-#endif
+               else msg_print(_("<破滅の手>を放った!", "You invoke the Hand of Doom!"));
 
                fire_ball_hide(GF_HAND_DOOM, dir, 200, 0);
                break;
        }
        case MS_HEAL:
-#ifdef JP
-msg_print("¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£");
-#else
-                       msg_print("You concentrate on your wounds!");
-#endif
+               msg_print(_("自分の傷に念を集中した。", "You concentrate on your wounds!"));
                (void)hp_player(plev*6);
                (void)set_stun(0);
                (void)set_cut(0);
                break;
        case MS_INVULNER:
-#ifdef JP
-msg_print("̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-                       msg_print("You cast a Globe of Invulnerability.");
-#endif
+               msg_print(_("無傷の球の呪文を唱えた。", "You cast a Globe of Invulnerability."));
                (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;
                if (damage == 1 || damage == 2)
-#ifdef JP
-                       msg_print("¡Ö¡Ø¥¶¡¦¥ï¡¼¥ë¥É¡Ù¡ª»þ¤Ï»ß¤Þ¤Ã¤¿¡ª¡×");
-#else
-                       msg_print("You yell 'The World! Time has stopped!'");
-#endif
+                       msg_print(_("「『ザ・ワールド』!時は止まった!」", "You yell 'The World! Time has stopped!'"));
                else if (damage == 3 || damage == 6)
-#ifdef JP
-                       msg_print("¡Ö»þ¤è¡ª¡×");
-#else
-                       msg_print("You yell 'Time!'");
-#endif
+                       msg_print(_("「時よ!」", "You yell 'Time!'"));
                else
                        msg_print("hek!");
                msg_print(NULL);
 
                /* Hack */
-               p_ptr->energy_need -= 1000 + (100 + randint1(200)+200)*TURNS_PER_TICK/10;
-
-               /* Redraw map */
+               p_ptr->energy_need -= 1000 + (100 + randint1(200) + 200) * TURNS_PER_TICK / 10;
                p_ptr->redraw |= (PR_MAP);
-
-               /* Update monsters */
                p_ptr->update |= (PU_MONSTERS);
-
-               /* Window stuff */
                p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 
                handle_stuff();
@@ -954,11 +685,12 @@ msg_print("̵
        {
                monster_type *m_ptr;
                monster_race *r_ptr;
-               char m_name[80];
+               GAME_TEXT m_name[MAX_NLEN];
 
                if (!target_set(TARGET_KILL)) return FALSE;
                if (!cave[target_row][target_col].m_idx) break;
                if (!player_has_los_bold(target_row, target_col)) break;
+               if (!projectable(p_ptr->y, p_ptr->x, 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);
@@ -966,34 +698,22 @@ msg_print("̵
                {
                        if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL))
                        {
-                               if (is_original_ap(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
+                               if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+                               msg_format(_("%sには効果がなかった!", "%s is unaffected!"), m_name);
 
                                break;
                        }
                        else if (r_ptr->level > randint1(100))
                        {
-                               if (is_original_ap(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
-#ifdef JP
-                               msg_format("%s¤Ë¤ÏÂÑÀ­¤¬¤¢¤ë¡ª", m_name);
-#else
-                               msg_format("%s resists!", m_name);
-#endif
+                               if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+                               msg_format(_("%sには耐性がある!", "%s resists!"), m_name);
 
                                break;
                        }
                }
-#ifdef JP
-msg_format("%s¤ò°ú¤­Ìᤷ¤¿¡£", m_name);
-#else
-               msg_format("You command %s to return.", m_name);
-#endif
+               msg_format(_("%sを引き戻した。", "You command %s to return."), m_name);
 
-               teleport_monster_to(cave[target_row][target_col].m_idx, py, px, 100);
+               teleport_monster_to(cave[target_row][target_col].m_idx, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
                break;
        }
        case MS_TELE_AWAY:
@@ -1001,90 +721,40 @@ msg_format("%s
 
                (void)fire_beam(GF_AWAY_ALL, dir, plev);
                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;
-               target_m_idx = cave[target_row][target_col].m_idx;
-               if (!target_m_idx) break;
-               if (!los(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 gesture at %^s's feet.", m_name);
-#endif
-
-               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_print("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª");
-#else
-                       msg_format("%^s is unaffected!", m_name);
-#endif
-               }
-               else teleport_level(target_m_idx);
+       case MS_TELE_LEVEL:
+               return teleport_level_other(p_ptr);
                break;
-       }
+
        case MS_PSY_SPEAR:
                if (!get_aim_dir(&dir)) return FALSE;
-
-#ifdef JP
-else msg_print("¸÷¤Î·õ¤òÊü¤Ã¤¿¡£");
-#else
-                       else msg_print("You throw a psycho-spear.");
-#endif
+               else msg_print(_("光の剣を放った。", "You throw a psycho-spear."));
                (void)fire_beam(GF_PSY_SPEAR, dir, damage);
                break;
+
        case MS_DARKNESS:
-#ifdef JP
-msg_print("°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£");
-#else
-                       msg_print("You gesture in shadow.");
-#endif
+               msg_print(_("暗闇の中で手を振った。", "You gesture in shadow."));
                (void)unlite_area(10, 3);
                break;
+
        case MS_MAKE_TRAP:
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¼öʸ¤ò¾§¤¨¤Æ¼Ù°­¤ËÈù¾Ð¤ó¤À¡£");
-#else
-                       msg_print("You cast a spell and cackles evilly.");
-#endif
+               msg_print(_("呪文を唱えて邪悪に微笑んだ。", "You cast a spell and cackles evilly."));
                trap_creation(target_row, target_col);
                break;
        case MS_FORGET:
-#ifdef JP
-msg_print("¤·¤«¤·²¿¤âµ¯¤­¤Ê¤«¤Ã¤¿¡£");
-#else
-                       msg_print("Nothing happen.");
-#endif
+               msg_print(_("しかし何も起きなかった。", "Nothing happen."));
                break;
        case MS_RAISE_DEAD:
-#ifdef JP
-msg_print("»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
-#else
-               msg_print("You cast a animate dead.");
-#endif
-               (void)animate_dead(0, py, px);
+               msg_print(_("死者復活の呪文を唱えた。", "You cast a animate dead."));
+               (void)animate_dead(0, p_ptr->y, p_ptr->x);
                break;
        case MS_S_KIN:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
 
-#ifdef JP
-msg_print("±ç·³¤ò¾¤´­¤·¤¿¡£");
-#else
-                       msg_print("You summon minions.");
-#endif
+               msg_print(_("援軍を召喚した。", "You summon minions."));
                for (k = 0;k < 4; k++)
                {
                        (void)summon_kin_player(plev, target_row, target_col, (PM_FORCE_PET | PM_ALLOW_GROUP));
@@ -1096,198 +766,138 @@ msg_print("
                int k;
                int max_cyber = (dun_level / 50) + randint1(3);
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´­¤·¤¿¡ª");
-#else
-                       msg_print("You summon Cyberdemons!");
-#endif
+               msg_print(_("サイバーデーモンを召喚した!", "You summon Cyberdemons!"));
                if (max_cyber > 4) max_cyber = 4;
                for (k = 0;k < max_cyber; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, mode);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, mode, '\0');
                break;
        }
        case MS_S_MONSTER:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("Ãç´Ö¤ò¾¤´­¤·¤¿¡£");
-#else
-                       msg_print("You summon help.");
-#endif
+               msg_print(_("仲間を召喚した。", "You summon help."));
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode), '\0');
                break;
        }
        case MS_S_MONSTERS:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¥â¥ó¥¹¥¿¡¼¤ò¾¤´­¤·¤¿¡ª");
-#else
-                       msg_print("You summon monsters!");
-#endif
-               for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
+               msg_print(_("モンスターを召喚した!", "You summon monsters!"));
+               for (k = 0;k < A_MAX; k++)
+                       summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode), '\0');
                break;
        }
        case MS_S_ANT:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¥¢¥ê¤ò¾¤´­¤·¤¿¡£");
-#else
-                       msg_print("You summon ants.");
-#endif
-               for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, mode);
+               msg_print(_("アリを召喚した。", "You summon ants."));
+               for (k = 0;k < A_MAX; k++)
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, mode, '\0');
                break;
        }
        case MS_S_SPIDER:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("ÃØéá¤ò¾¤´­¤·¤¿¡£");
-#else
-                       msg_print("You summon spiders.");
-#endif
-               for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, mode);
+               msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
+               for (k = 0;k < A_MAX; k++)
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, mode, '\0');
                break;
        }
        case MS_S_HOUND:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¥Ï¥¦¥ó¥É¤ò¾¤´­¤·¤¿¡£");
-#else
-                       msg_print("You summon hounds.");
-#endif
+               msg_print(_("ハウンドを召喚した。", "You summon hounds."));
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, mode);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, mode, '\0');
                break;
        }
        case MS_S_HYDRA:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¥Ò¥É¥é¤ò¾¤´­¤·¤¿¡£");
-#else
-                       msg_print("You summon hydras.");
-#endif
+               msg_print(_("ヒドラを召喚した。", "You summon hydras."));
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, mode);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, mode, '\0');
                break;
        }
        case MS_S_ANGEL:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("Å·»È¤ò¾¤´­¤·¤¿¡ª");
-#else
-                       msg_print("You summon angel!");
-#endif
+               msg_print(_("天使を召喚した!", "You summon angel!"));
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, mode);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, mode, '\0');
                break;
        }
        case MS_S_DEMON:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("º®Æ٤εÜÄ¤é°­Ëâ¤ò¾¤´­¤·¤¿¡ª");
-#else
-                       msg_print("You summon a demon from the Courts of Chaos!");
-#endif
+               msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, (mode | u_mode), '\0');
                break;
        }
        case MS_S_UNDEAD:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¥¢¥ó¥Ç¥Ã¥É¤Î¶¯Å¨¤ò¾¤´­¤·¤¿¡ª");
-#else
-                       msg_print("You summon an undead adversary!");
-#endif
+               msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, (mode | u_mode), '\0');
                break;
        }
        case MS_S_DRAGON:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª");
-#else
-                       msg_print("You summon dragon!");
-#endif
+               msg_print(_("ドラゴンを召喚した!", "You summon dragon!"));
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, (mode | u_mode), '\0');
                break;
        }
        case MS_S_HI_UNDEAD:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´­¤·¤¿¡ª");
-#else
-                       msg_print("You summon greater undead!");
-#endif
-               for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
+               msg_print(_("強力なアンデッドを召喚した!", "You summon greater undead!"));
+               for (k = 0;k < A_MAX; k++)
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode), '\0');
                break;
        }
        case MS_S_HI_DRAGON:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª");
-#else
-                       msg_print("You summon ancient dragons!");
-#endif
+               msg_print(_("古代ドラゴンを召喚した!", "You summon ancient dragons!"));
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, (mode | u_mode), '\0');
                break;
        }
        case MS_S_AMBERITE:
        {
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´­¤·¤¿¡ª");
-#else
-                       msg_print("You summon Lords of Amber!");
-#endif
+               msg_print(_("アンバーの王族を召喚した!", "You summon Lords of Amber!"));
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE), '\0');
                break;
        }
        case MS_S_UNIQUE:
        {
                int k, count = 0;
                if (!target_set(TARGET_KILL)) return FALSE;
-#ifdef JP
-msg_print("ÆÃÊ̤ʶ¯Å¨¤ò¾¤´­¤·¤¿¡ª");
-#else
-                       msg_print("You summon special opponents!");
-#endif
+               msg_print(_("特別な強敵を召喚した!", "You summon special opponents!"));
                for (k = 0;k < 4; k++)
-                       if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE))) count++;
+                       if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE), '\0')) count++;
                for (k = count;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode), '\0');
                break;
        }
        default:
@@ -1298,40 +908,37 @@ msg_print("
 }
 
 
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'imitator'.
+/*!
+ * @brief ものまねコマンドのメインルーチン /
+ * do_cmd_cast calls this function if the player's class is 'imitator'.
+ * @param baigaesi TRUEならば倍返し上の処理として行う
+ * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
+ * @details
+ * If a valid spell is chosen, saves it in '*sn' and returns TRUE
+ * If the user hits escape, returns FALSE, and set '*sn' to -1
+ * If there are no legal choices, returns FALSE, and sets '*sn' to -2
+ *
+ * The "prompt" should be "cast", "recite", or "study"
+ * The "known" should be TRUE for cast/pray, FALSE for study
+ *
+ * nb: This function has a (trivial) display bug which will be obvious
+ * when you run it. It's probably easy to fix but I haven't tried,
+ * sorry.
  */
 bool do_cmd_mane(bool baigaesi)
 {
        int             n = 0, j;
        int             chance;
        int             minfail = 0;
-       int             plev = p_ptr->lev;
+       PLAYER_LEVEL plev = p_ptr->lev;
        monster_power   spell;
        bool            cast;
 
-
-       /* not if confused */
-       if (p_ptr->confused)
-       {
-#ifdef JP
-msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤­¤Ê¤¤¡ª");
-#else
-               msg_print("You are too confused!");
-#endif
-
-               return TRUE;
-       }
+       if (cmd_limit_confused(p_ptr)) return FALSE;
 
        if (!p_ptr->mane_num)
        {
-#ifdef JP
-msg_print("¤Þ¤Í¤é¤ì¤ë¤â¤Î¤¬²¿¤â¤Ê¤¤¡ª");
-#else
-               msg_print("You don't remember any action!");
-#endif
-
+               msg_print(_("まねられるものが何もない!", "You don't remember any action!"));
                return FALSE;
        }
 
@@ -1370,12 +977,7 @@ msg_print("
        if (randint0(100) < chance)
        {
                if (flush_failure) flush();
-#ifdef JP
-msg_print("¤â¤Î¤Þ¤Í¤Ë¼ºÇÔ¤·¤¿¡ª");
-#else
-               msg_print("You failed to concentrate hard enough!");
-#endif
-
+               msg_print(_("ものまねに失敗した!", "You failed to concentrate hard enough!"));
                sound(SOUND_FAIL);
        }
        else
@@ -1395,11 +997,9 @@ msg_print("
                p_ptr->mane_dam[j] = p_ptr->mane_dam[j+1];
        }
 
-       /* Take a turn */
-       energy_use = 100;
+       p_ptr->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);