OSDN Git Service

Changed Japanese translation for "New" to match what was suggested in hengbandforosx...
[hengbandforosx/hengbandosx.git] / src / realm-song.c
index 3ff0c3f..a572076 100644 (file)
@@ -1,5 +1,8 @@
 #include "angband.h"
 #include "cmd-spell.h"
+#include "spells-status.h"
+#include "projection.h"
+#include "spells-floor.h"
 
 /*!
 * @brief 歌の開始を処理する / Start singing if the player is a Bard
@@ -20,41 +23,6 @@ static void start_singing(SPELL_IDX spell, MAGIC_NUM1 song)
        set_action(ACTION_SING);
 
        p_ptr->update |= (PU_BONUS);
-
-       /* Redraw status bar */
-       p_ptr->redraw |= (PR_STATUS);
-}
-
-/*!
-* @brief 歌の停止を処理する / Stop singing if the player is a Bard
-* @return なし
-*/
-void stop_singing(void)
-{
-       if (p_ptr->pclass != CLASS_BARD) return;
-
-       /* Are there interupted song? */
-       if (INTERUPTING_SONG_EFFECT(p_ptr))
-       {
-               /* Forget interupted song */
-               INTERUPTING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
-               return;
-       }
-
-       /* The player is singing? */
-       if (!SINGING_SONG_EFFECT(p_ptr)) return;
-
-       /* Hack -- if called from set_action(), avoid recursive loop */
-       if (p_ptr->action == ACTION_SING) set_action(ACTION_NONE);
-
-       /* Message text of each song or etc. */
-       do_spell(REALM_MUSIC, SINGING_SONG_ID(p_ptr), SPELL_STOP);
-
-       SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
-       SINGING_SONG_ID(p_ptr) = 0;
-       p_ptr->update |= (PU_BONUS);
-
-       /* Redraw status bar */
        p_ptr->redraw |= (PR_STATUS);
 }
 
@@ -64,7 +32,7 @@ void stop_singing(void)
 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP)
 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。
 */
-cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
        bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
@@ -73,7 +41,6 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
        bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
        bool cont = (mode == SPELL_CONT) ? TRUE : FALSE;
        bool stop = (mode == SPELL_STOP) ? TRUE : FALSE;
-       static const char s_dam[] = _("損傷:", "dam ");
 
        DIRECTION dir;
        PLAYER_LEVEL plev = p_ptr->lev;
@@ -85,7 +52,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのモンスターを減速させる。抵抗されると無効。", "Attempts to slow all monsters in sight.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -107,10 +74,10 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 1:
                if (name) return _("祝福の歌", "Song of Blessing");
-               if (desc) return _("命中率とACのボーナスを得る。", "Gives bonus to hit and AC for a few turns.");
+               if (desc) return _("命中率とACのボーナスを得る。", "Gives bonus to hit and AC for a few turns.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -133,7 +100,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("轟音のボルトを放つ。", "Fires a bolt of sound.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                {
                        DICE_NUMBER dice = 4 + (plev - 1) / 5;
@@ -155,7 +122,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのモンスターを朦朧させる。抵抗されると無効。", "Attempts to stun all monsters in sight.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -182,7 +149,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("体力を少し回復させる。", "Heals HP a little.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -209,7 +176,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                {
                        DICE_NUMBER dice = 2;
@@ -231,7 +198,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのモンスターを恐怖させる。抵抗されると無効。", "Attempts to scare all monsters in sight.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -254,10 +221,10 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 7:
                if (name) return _("戦いの歌", "Heroic Ballad");
-               if (desc) return _("ヒーロー気分になる。", "Removes fear, and gives bonus to hit and 10 more HP for a while.");
+               if (desc) return _("ヒーロー気分になる。", "Removes fear. Gives a bonus to hit for a while. Heals you for 10 HP.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -287,15 +254,15 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 8:
                if (name) return _("霊的知覚", "Clairaudience");
                if (desc) return _("近くの罠/扉/階段を感知する。レベル15で全てのモンスター、20で財宝とアイテムを感知できるようになる。レベル25で周辺の地形を感知し、40でその階全体を永久に照らし、ダンジョン内のすべてのアイテムを感知する。この効果は歌い続けることで順に起こる。",
-                       "Detects traps, doors and stairs in your vicinity. And detects all monsters at level 15, treasures and items at level 20. Maps nearby area at level 25. Lights and know the whole level at level 40. These effects occurs by turns while this song continues.");
+                       "Detects traps, doors and stairs in your vicinity. And detects all monsters at level 15, treasures and items at level 20. Maps nearby area at level 25. Lights and know the whole level at level 40. These effects accumulate as the song continues.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
                        msg_print(_("静かな音楽が感覚を研ぎ澄まさせた...", "Your quiet music sharpens your sense of hearing..."));
-                       /* Hack -- Initialize the turn count */
+                       /* Hack -- Initialize the current_world_ptr->game_turn count */
                        SINGING_COUNT(p_ptr) = 0;
                        start_singing(spell, MUSIC_DETECT);
                }
@@ -350,7 +317,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのモンスターに対して精神攻撃を行う。", "Damages all monsters in sight with PSI damages.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -377,7 +344,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("自分のいるマスと隣りのマスに落ちているアイテムを鑑定する。", "Identifies all items which are in the adjacent squares.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -407,7 +374,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("隠密行動能力を上昇させる。", "Gives improved stealth.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -419,7 +386,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (!p_ptr->tim_stealth)
                        {
-                               msg_print(_("姿がはっきりと見えるようになった。", "You are no longer hided."));
+                               msg_print(_("姿がはっきりと見えるようになった。", "You are no longer hidden."));
                        }
                }
 
@@ -430,7 +397,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのモンスターを混乱させる。抵抗されると無効。", "Attempts to confuse all monsters in sight.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -456,7 +423,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのモンスターに対して轟音攻撃を行う。", "Damages all monsters in sight with booming sound.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -480,11 +447,11 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 14:
                if (name) return _("フィリエルの歌", "Firiel's Song");
-               if (desc) return _("周囲の死体や骨を生き返す。", "Resurrects nearby corpse and skeletons. And makes these your pets.");
+               if (desc) return _("周囲の死体や骨を生き返す。", "Resurrects nearby corpse and skeletons. And makes them your pets.");
 
                {
                        /* Stop singing before start another */
-                       if (cast || fail) stop_singing();
+                       if (cast || fail) stop_singing(p_ptr);
 
                        if (cast)
                        {
@@ -499,7 +466,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのモンスターを魅了する。抵抗されると無効。", "Attempts to charm all monsters in sight.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -526,7 +493,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("壁を掘り進む。自分の足元のアイテムは蒸発する。", "Makes you be able to burrow into walls. Objects under your feet evaporate.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -550,10 +517,10 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 17:
                if (name) return _("元素耐性", "Finrod's Resistance");
                if (desc) return _("酸、電撃、炎、冷気、毒に対する耐性を得る。装備による耐性に累積する。",
-                       "Gives resistance to fire, cold, electricity, acid and poison. These resistances can be added to which from equipment for more powerful resistances.");
+                       "Gives resistance to fire, cold, electricity, acid and poison. These resistances can be added to those from equipment for more powerful resistances.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -596,7 +563,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("加速する。", "Hastes you.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -625,7 +592,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        if (info) return info_radius(rad);
 
                        /* Stop singing before start another */
-                       if (cast || fail) stop_singing();
+                       if (cast || fail) stop_singing(p_ptr);
 
                        if (cast)
                        {
@@ -641,7 +608,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Damages all monsters in sight. Hurts evil monsters greatly.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -653,7 +620,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        DICE_SID m_sides = plev * 3;
                        DICE_SID e_sides = plev * 3;
 
-                       if (info) return format("%s1d%d+1d%d", s_dam, m_sides, e_sides);
+                       if (info) return format("%s1d%d+1d%d", KWD_DAM, m_sides, e_sides);
 
                        if (cont)
                        {
@@ -665,10 +632,10 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 21:
                if (name) return _("サルマンの甘言", "The Voice of Saruman");
-               if (desc) return _("視界内の全てのモンスターを減速させ、眠らせようとする。抵抗されると無効。", "Attempts to slow and sleep all monsters in sight.");
+               if (desc) return _("視界内の全てのモンスターを減速させ、眠らせようとする。抵抗されると無効。", "Attempts to slow and put to sleep all monsters in sight.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -701,7 +668,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        if (info) return info_damage(dice, sides, 0);
 
                        /* Stop singing before start another */
-                       if (cast || fail) stop_singing();
+                       if (cast || fail) stop_singing(p_ptr);
 
                        if (cast)
                        {
@@ -723,7 +690,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        if (info) return info_delay(base, sides);
 
                        /* Stop singing before start another */
-                       if (cast || fail) stop_singing();
+                       if (cast || fail) stop_singing(p_ptr);
 
                        if (cast)
                        {
@@ -739,7 +706,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Shakes dungeon structure, and results in random swapping of floors and walls.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -766,7 +733,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのモンスターを麻痺させようとする。抵抗されると無効。", "Attempts to freeze all monsters in sight.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -790,11 +757,11 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 26:
                if (name) return _("守りの歌", "Endurance");
                if (desc) return _("自分のいる床の上に、モンスターが通り抜けたり召喚されたりすることができなくなるルーンを描く。",
-                       "Sets a glyph on the floor beneath you. Monsters cannot attack you if you are on a glyph, but can try to break glyph.");
+                       "Sets a glyph on the floor beneath you. If you are on a glyph, monsters cannot attack you but can try to break the glyph.");
 
                {
                        /* Stop singing before start another */
-                       if (cast || fail) stop_singing();
+                       if (cast || fail) stop_singing(p_ptr);
 
                        if (cast)
                        {
@@ -810,7 +777,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Hastes you. Gives heroism. Damages all monsters in sight.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -854,10 +821,10 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 28:
                if (name) return _("ヤヴァンナの助け", "Relief of Yavanna");
-               if (desc) return _("強力な回復の歌で、負傷と朦朧状態も全快する。", "Powerful healing song. Also heals cut and stun completely.");
+               if (desc) return _("強力な回復の歌で、負傷と朦朧状態も全快する。", "Powerful healing song. Also completely heals cuts and being stunned.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {
@@ -887,12 +854,12 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        /* Stop singing before start another */
-                       if (cast || fail) stop_singing();
+                       if (cast || fail) stop_singing(p_ptr);
 
                        if (cast)
                        {
                                msg_print(_("暗黒の中に光と美をふりまいた。体が元の活力を取り戻した。",
-                                       "You strewed light and beauty in the dark as you sing. You feel refreshed."));
+                                       "You strew light and beauty in the dark as you sing. You feel refreshed."));
                                (void)restore_all_status();
                                (void)restore_level();
                        }
@@ -911,7 +878,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        if (info) return info_damage(dice, sides, 0);
 
                        /* Stop singing before start another */
-                       if (cast || fail) stop_singing();
+                       if (cast || fail) stop_singing(p_ptr);
 
                        if (cast)
                        {
@@ -925,10 +892,10 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 31:
                if (name) return _("フィンゴルフィンの挑戦", "Fingolfin's Challenge");
                if (desc) return _("ダメージを受けなくなるバリアを張る。",
-                       "Generates barrier which completely protect you from almost all damages. Takes a few your turns when the barrier breaks.");
+                       "Generates a barrier which completely protects you from almost all damage.");
 
                /* Stop singing before start another */
-               if (cast || fail) stop_singing();
+               if (cast || fail) stop_singing(p_ptr);
 
                if (cast)
                {