OSDN Git Service

Changed Japanese translation for "New" to match what was suggested in hengbandforosx...
[hengbandforosx/hengbandosx.git] / src / mspells3.c
index c31fcc6..069d4b0 100644 (file)
@@ -16,6 +16,8 @@
 #include "avatar.h"
 #include "spells-status.h"
 #include "cmd-spell.h"
+#include "player-status.h"
+#include "monster-spell.h"
 
 #define pseudo_plev() (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130) /*!< モンスター魔法をプレイヤーが使用する場合の換算レベル */
 
@@ -343,8 +345,6 @@ static bool get_learned_power(SPELL_IDX *sn)
 
        if (use_menu) screen_save();
 
-       /* Get a spell from the user */
-
        choice= (always_show_list || use_menu) ? ESCAPE:1 ;
        while (!flag)
        {
@@ -420,8 +420,6 @@ static bool get_learned_power(SPELL_IDX *sn)
                        if (!redraw || use_menu)
                        {
                                char psi_desc[80];
-
-                               /* Show list */
                                redraw = TRUE;
                                if (!use_menu) screen_save();
 
@@ -608,7 +606,7 @@ static bool cast_learned_spell(int spell, bool success)
                MONSTER_IDX m_idx;
 
                if (!target_set(TARGET_KILL)) return FALSE;
-               m_idx = cave[target_row][target_col].m_idx;
+               m_idx = current_floor_ptr->grid_array[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;
@@ -1050,10 +1048,10 @@ static bool cast_learned_spell(int spell, bool success)
                GAME_TEXT m_name[MAX_NLEN];
 
                if (!target_set(TARGET_KILL)) return FALSE;
-               if (!cave[target_row][target_col].m_idx) break;
+               if (!current_floor_ptr->grid_array[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];
+               m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[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)
@@ -1072,7 +1070,7 @@ static bool cast_learned_spell(int spell, bool success)
                        }
                }
         msg_format(_("%sを引き戻した。", "You command %s to return."), m_name);
-               teleport_monster_to(cave[target_row][target_col].m_idx, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
+               teleport_monster_to(current_floor_ptr->grid_array[target_row][target_col].m_idx, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
                break;
        }
        case MS_TELE_AWAY:
@@ -1107,19 +1105,19 @@ static bool cast_learned_spell(int spell, bool success)
         msg_print(_("しかし何も起きなかった。", "Nothing happen."));
                break;
     case MS_RAISE_DEAD:
-        msg_print(_("死者復活の呪文を唱えた。", "You cast a animate dead."));
+        msg_print(_("死者復活の呪文を唱えた。", "You animate the dead."));
                (void)animate_dead(0, p_ptr->y, p_ptr->x);
                break;
        case MS_S_KIN:
        {
                int k;
 
-        msg_print(_("援軍を召喚した。", "You summon minions."));
+        msg_print(_("援軍を召喚した。", "You summon one of your kin."));
                for (k = 0;k < 1; k++)
                {
                        if (summon_kin_player(summon_lev, p_ptr->y, p_ptr->x, (pet ? PM_FORCE_PET : 0L)))
                        {
-                               if (!pet) msg_print(_("召喚された仲間は怒っている!", "Summoned fellows are angry!"));
+                               if (!pet) msg_print(_("召喚された仲間は怒っている!", "The summoned companion is angry!"));
                        }
                        else
                        {
@@ -1249,7 +1247,7 @@ static bool cast_learned_spell(int spell, bool success)
                        if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_ANGEL, (g_mode | p_mode), '\0'))
                        {
                 if (!pet)
-                    msg_print(_("召喚された天使は怒っている!", "Summoned angels are angry!"));
+                    msg_print(_("召喚された天使は怒っている!", "The summoned angel is angry!"));
                        }
                        else
                        {
@@ -1265,7 +1263,7 @@ static bool cast_learned_spell(int spell, bool success)
                        if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_DEMON, (g_mode | p_mode), '\0'))
                        {
                 if (!pet)
-                    msg_print(_("召喚されたデーモンは怒っている!", "Summoned demons are angry!"));
+                    msg_print(_("召喚されたデーモンは怒っている!", "The summoned demon is angry!"));
                        }
                        else
                        {
@@ -1281,7 +1279,7 @@ static bool cast_learned_spell(int spell, bool success)
                        if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_UNDEAD, (g_mode | p_mode), '\0'))
                        {
                 if (!pet)
-                    msg_print(_("召喚されたアンデッドは怒っている!", "Summoned undeads are angry!"));
+                    msg_print(_("召喚されたアンデッドは怒っている!", "The summoned undead is angry!"));
                        }
                        else
                        {
@@ -1297,7 +1295,7 @@ static bool cast_learned_spell(int spell, bool success)
                        if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_DRAGON, (g_mode | p_mode), '\0'))
                        {
                 if (!pet)
-                    msg_print(_("召喚されたドラゴンは怒っている!", "Summoned dragons are angry!"));
+                    msg_print(_("召喚されたドラゴンは怒っている!", "The summoned dragon is angry!"));
                        }
                        else
                        {
@@ -1313,7 +1311,7 @@ static bool cast_learned_spell(int spell, bool success)
                        if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | u_mode), '\0'))
                        {
                 if (!pet)
-                    msg_print(_("召喚された上級アンデッドは怒っている!", "Summoned greater undeads are angry!"));
+                    msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead is angry!"));
                        }
                        else
                        {
@@ -1329,7 +1327,7 @@ static bool cast_learned_spell(int spell, bool success)
                        if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_DRAGON, (g_mode | p_mode | u_mode), '\0'))
                        {
                 if (!pet)
-                    msg_print(_("召喚された古代ドラゴンは怒っている!", "Summoned ancient dragons are angry!"));
+                    msg_print(_("召喚された古代ドラゴンは怒っている!", "The summoned ancient dragon is angry!"));
                        }
                        else
                        {
@@ -1345,7 +1343,7 @@ static bool cast_learned_spell(int spell, bool success)
                        if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_AMBERITES, (g_mode | p_mode | u_mode), '\0'))
                        {
                 if (!pet)
-                    msg_print(_("召喚されたアンバーの王族は怒っている!", "Summoned Lords of Amber are angry!"));
+                    msg_print(_("召喚されたアンバーの王族は怒っている!", "The summoned Lord of Amber is angry!"));
                        }
                        else
                        {
@@ -1362,14 +1360,14 @@ static bool cast_learned_spell(int spell, bool success)
                        {
                                count++;
                                if (!pet)
-                                       msg_print(_("召喚されたユニーク・モンスターは怒っている!", "Summoned special opponents are angry!"));
+                                       msg_print(_("召喚されたユニーク・モンスターは怒っている!", "The summoned special opponent is angry!"));
                        }
                for (k = count;k < 1; k++)
                        if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | PM_ALLOW_UNIQUE), '\0'))
                        {
                                count++;
                                if (!pet)
-                                       msg_print(_("召喚された上級アンデッドは怒っている!", "Summoned greater undeads are angry!"));
+                                       msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead is angry!"));
                        }
                if (!count)
                {
@@ -1382,7 +1380,7 @@ static bool cast_learned_spell(int spell, bool success)
        }
        if (no_trump)
     {
-        msg_print(_("何も現れなかった。", "No one have appeared."));
+        msg_print(_("何も現れなかった。", "No one appeared."));
        }
 
        return TRUE;
@@ -1405,7 +1403,6 @@ bool do_cmd_cast_learned(void)
 
        if (cmd_limit_confused(p_ptr)) return FALSE;
 
-       /* get power */
        if (!get_learned_power(&n)) return FALSE;
 
        spell = monster_powers[n];
@@ -1466,16 +1463,12 @@ bool do_cmd_cast_learned(void)
                sound(SOUND_FAIL);
 
                if (n >= MS_S_KIN)
-                       /* Cast the spell */
                        cast = cast_learned_spell(n, FALSE);
        }
        else
        {
                sound(SOUND_ZAP);
-
-               /* Cast the spell */
                cast = cast_learned_spell(n, TRUE);
-
                if (!cast) return FALSE;
        }
 
@@ -1512,7 +1505,7 @@ bool do_cmd_cast_learned(void)
                }
        }
 
-       p_ptr->energy_use = 100;
+       take_turn(p_ptr, 100);
 
        p_ptr->redraw |= (PR_MANA);
        p_ptr->window |= (PW_PLAYER | PW_SPELL);
@@ -1528,7 +1521,7 @@ bool do_cmd_cast_learned(void)
 void learn_spell(int monspell)
 {
        if (p_ptr->action != ACTION_LEARN) return;
-       if (monspell < 0) return; /* Paranoia */
+       if (monspell < 0) return;
        if (p_ptr->magic_num2[monspell]) return;
        if (p_ptr->confused || p_ptr->blind || p_ptr->image || p_ptr->stun || p_ptr->paralyzed) return;
        if (randint1(p_ptr->lev + 70) > monster_powers[monspell].level + 40)