OSDN Git Service

Changed to match the For2.2.2-Refactoring-Cocoa2 branch. Put se_maoudamashii_voice_m...
[hengbandforosx/hengbandosx.git] / src / realm-death.c
index 8a6a908..4be9316 100644 (file)
@@ -1,5 +1,9 @@
 #include "angband.h"
 #include "cmd-spell.h"
+#include "projection.h"
+#include "spells-summon.h"
+#include "spells-status.h"
+#include "avatar.h"
 
 
 
 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
 */
-cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
        bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
        bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
        bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
 
-       static const char s_dam[] = _("損傷:", "dam ");
-       static const char s_random[] = _("ランダム", "random");
-
        DIRECTION dir;
-       int plev = p_ptr->lev;
+       PLAYER_LEVEL plev = p_ptr->lev;
 
        switch (spell)
        {
@@ -46,8 +47,8 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Fires a tiny ball of evil power which hurts good monsters greatly.");
 
                {
-                       int dice = 3 + (plev - 1) / 5;
-                       int sides = 4;
+                       DICE_NUMBER dice = 3 + (plev - 1) / 5;
+                       DICE_SID sides = 4;
                        POSITION rad = 0;
 
                        if (info) return info_damage(dice, sides, 0);
@@ -121,7 +122,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 4:
                if (name) return _("黒い眠り", "Black Sleep");
-               if (desc) return _("1体のモンスターを眠らせる。抵抗されると無効。", "Attempts to sleep a monster.");
+               if (desc) return _("1体のモンスターを眠らせる。抵抗されると無効。", "Attempts to put a monster to sleep.");
 
                {
                        int power = plev;
@@ -140,7 +141,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 5:
                if (name) return _("耐毒", "Resist Poison");
                if (desc) return _("一定時間、毒への耐性を得る。装備による耐性に累積する。",
-                       "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");
+                       "Gives resistance to poison. This resistance can be added to that from equipment for more powerful resistance.");
 
                {
                        int base = 20;
@@ -167,8 +168,8 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               fear_monster(dir, power);
-                               stun_monster(dir, power);
+                               fear_monster(dir, plev);
+                               stun_monster(dir, plev);
                        }
                }
                break;
@@ -186,7 +187,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               control_one_undead(dir, power);
+                               control_one_undead(dir, plev);
                        }
                }
                break;
@@ -196,8 +197,8 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("生命のある者のHPと最大HP双方にダメージを与える効果のある球を放つ。", "Fires a ball which damages to both HP and MaxHP of living monsters.");
 
                {
-                       int dice = 3;
-                       int sides = 6;
+                       DICE_NUMBER dice = 3;
+                       DICE_SID sides = 6;
                        POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
@@ -223,8 +224,8 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
 
                {
-                       int dice = 8 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_NUMBER dice = 8 + (plev - 5) / 4;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -239,7 +240,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 10:
                if (name) return _("殺戮雲", "Cloud kill");
-               if (desc) return _("自分を中心とした毒の球を発生させる。", "Generate a ball of poison centered on you.");
+               if (desc) return _("自分を中心とした毒の球を発生させる。", "Generates a ball of poison centered on you.");
 
                {
                        HIT_POINT dam = (30 + plev) * 2;
@@ -256,7 +257,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 11:
                if (name) return _("モンスター消滅", "Genocide One");
-               if (desc) return _("モンスター1体を消し去る。経験値やアイテムは手に入らない。抵抗されると無効。", "Attempts to vanish a monster.");
+               if (desc) return _("モンスター1体を消し去る。経験値やアイテムは手に入らない。抵抗されると無効。", "Attempts to eradicate one monster.");
 
                {
                        int power = plev + 50;
@@ -287,11 +288,11 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 13:
                if (name) return _("吸血の矢", "Vampiric Bolt");
                if (desc) return _("ボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって満腹度が上がる。",
-                       "Absorbs some HP from a monster and gives them to you by bolt. You will also gain nutritional sustenance from this.");
+                       "Fires a bolt which transfers HP from a monster to you. You will also gain nutritional sustenance from this.");
 
                {
-                       int dice = 1;
-                       int sides = plev * 2;
+                       DICE_NUMBER dice = 1;
+                       DICE_SID sides = plev * 2;
                        int base = plev * 2;
 
                        if (info) return info_damage(dice, sides, base);
@@ -345,7 +346,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 15:
                if (name) return _("抹殺", "Genocide");
                if (desc) return _("指定した文字のモンスターを現在の階から消し去る。抵抗されると無効。",
-                       "Eliminates an entire class of monster, exhausting you.  Powerful or unique monsters may resist.");
+                       "Eliminates an entire class of monster, exhausting you. Powerful or unique monsters may resist.");
 
                {
                        int power = plev + 50;
@@ -361,7 +362,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 16:
                if (name) return _("狂戦士化", "Berserk");
-               if (desc) return _("狂戦士化し、恐怖を除去する。", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");
+               if (desc) return _("狂戦士化し、恐怖を除去する。", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");
 
                {
                        int base = 25;
@@ -380,7 +381,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("ランダムで様々な効果が起こる。", "Causes random effects.");
 
                {
-                       if (info) return s_random;
+                       if (info) return KWD_RANDOM;
 
                        if (cast)
                        {
@@ -396,8 +397,8 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("暗黒のボルトもしくはビームを放つ。", "Fires a bolt or beam of darkness.");
 
                {
-                       int dice = 4 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_NUMBER dice = 4 + (plev - 5) / 4;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -449,7 +450,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        HIT_POINT dam = 100;
 
-                       if (info) return format("%s3*%d", s_dam, dam);
+                       if (info) return format("%s3*%d", KWD_DAM, dam);
 
                        if (cast)
                        {
@@ -474,7 +475,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の生命のあるモンスターにダメージを与える。", "Damages all living monsters in sight.");
 
                {
-                       int sides = plev * 3;
+                       DICE_SID sides = plev * 3;
 
                        if (info) return info_damage(1, sides, 0);
 
@@ -521,49 +522,13 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 25:
                if (name) return _("死者召喚", "Raise the Dead");
                if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
-
-               {
-                       if (cast)
-                       {
-                               int type;
-                               bool pet = one_in_(3);
-                               u32b flg = 0L;
-
-                               type = (plev > 47 ? SUMMON_HI_UNDEAD : SUMMON_UNDEAD);
-
-                               if (!pet || (pet && (plev > 24) && one_in_(3)))
-                                       flg |= PM_ALLOW_GROUP;
-
-                               if (pet) flg |= PM_FORCE_PET;
-                               else flg |= (PM_ALLOW_UNIQUE | PM_NO_PET);
-
-                               if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, type, flg))
-                               {
-                                       msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
-                                               "Cold winds begin to blow around you, carrying with them the stench of decay..."));
-
-
-                                       if (pet)
-                                       {
-                                               msg_print(_("古えの死せる者共があなたに仕えるため土から甦った!",
-                                                       "Ancient, long-dead forms arise from the ground to serve you!"));
-                                       }
-                                       else
-                                       {
-                                               msg_print(_("死者が甦った。眠りを妨げるあなたを罰するために!",
-                                                       "'The dead arise... to punish you for disturbing them!'"));
-                                       }
-
-                                       chg_virtue(V_UNLIFE, 1);
-                               }
-                       }
-               }
+               if (cast) cast_summon_undead(p_ptr, (plev * 3) / 2);
                break;
 
        case 26:
-               if (name) return _("死者の秘伝", "Esoteria");
+               if (name) return _("死者の秘伝", "Secrets of the Dead");
                if (desc) return _("アイテムを1つ識別する。レベルが高いとアイテムの能力を完全に知ることができる。",
-                       "Identifies an item. Or *identifies* an item at higher level.");
+                       "Identifies or, at higher levels, *identifies* an item.");
 
                {
                        if (cast)
@@ -583,7 +548,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 27:
                if (name) return _("吸血鬼変化", "Polymorph Vampire");
                if (desc) return _("一定時間、吸血鬼に変化する。変化している間は本来の種族の能力を失い、代わりに吸血鬼としての能力を得る。",
-                       "Mimic a vampire for a while. Loses abilities of original race and gets abilities as a vampire.");
+                       "Causes you to mimic a vampire for a while. You lose the abilities of your original race and get the abilities of a vampire for that time.");
 
                {
                        int base = 10 + plev / 2;
@@ -599,7 +564,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 28:
                if (name) return _("経験値復活", "Restore Life");
-               if (desc) return _("失った経験値を回復する。", "Restore lost experience.");
+               if (desc) return _("失った経験値を回復する。", "Restores lost experience.");
 
                {
                        if (cast)
@@ -612,7 +577,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 29:
                if (name) return _("周辺抹殺", "Mass Genocide");
                if (desc) return _("自分の周囲にいるモンスターを現在の階から消し去る。抵抗されると無効。",
-                       "Eliminates all nearby monsters, exhausting you.  Powerful or unique monsters may be able to resist.");
+                       "Eliminates all nearby monsters, exhausting you. Powerful or unique monsters may be able to resist.");
 
                {
                        int power = plev + 50;
@@ -650,7 +615,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 31:
                if (name) return _("幽体化", "Wraithform");
                if (desc) return _("一定時間、壁を通り抜けることができ受けるダメージが軽減される幽体の状態に変身する。",
-                       "Becomes wraith form which gives ability to pass walls and makes all damages half.");
+                       "Causes you to be ghost-like for a while. That reduces the damage you take and allows you to pass through walls.");
 
                {
                        int base = plev / 2;