OSDN Git Service

For the Styx ogre, replaced "a" with "an" in the English description since it comes...
[hengband/hengband.git] / src / realm-death.c
index 652cb23..78577d9 100644 (file)
@@ -4,6 +4,7 @@
 #include "spells-summon.h"
 #include "spells-status.h"
 #include "spells-object.h"
+#include "spells-diceroll.h"
 #include "avatar.h"
 #include "player-status.h"
 #include "player-effects.h"
@@ -14,6 +15,7 @@
 
 /*!
 * @brief 暗黒領域魔法の各処理を行う
+* @param caster_ptr プレーヤーへの参照ポインタ
 * @param spell 魔法ID
 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
@@ -41,7 +43,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               detect_monsters_nonliving(rad);
+                               detect_monsters_nonliving(caster_ptr, rad);
                        }
                }
                break;
@@ -60,7 +62,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
                                /*
                                * A radius-0 ball may (1) be aimed at
@@ -70,7 +72,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                                * travel to the monster.
                                */
 
-                               fire_ball(GF_HELL_FIRE, dir, damroll(dice, sides), rad);
+                               fire_ball(caster_ptr, GF_HELL_FIRE, dir, damroll(dice, sides), rad);
 
                                if (one_in_(5))
                                {
@@ -78,13 +80,13 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                                        int effect = randint1(1000);
 
                                        if (effect == 666)
-                                               fire_ball_hide(GF_DEATH_RAY, dir, plev * 200, 0);
+                                               fire_ball_hide(caster_ptr, GF_DEATH_RAY, dir, plev * 200, 0);
                                        else if (effect < 500)
-                                               fire_ball_hide(GF_TURN_ALL, dir, plev, 0);
+                                               fire_ball_hide(caster_ptr, GF_TURN_ALL, dir, plev, 0);
                                        else if (effect < 800)
-                                               fire_ball_hide(GF_OLD_CONF, dir, plev, 0);
+                                               fire_ball_hide(caster_ptr, GF_OLD_CONF, dir, plev, 0);
                                        else
-                                               fire_ball_hide(GF_STUN, dir, plev, 0);
+                                               fire_ball_hide(caster_ptr, GF_STUN, dir, plev, 0);
                                }
                        }
                }
@@ -101,7 +103,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               detect_monsters_evil(rad);
+                               detect_monsters_evil(caster_ptr, rad);
                        }
                }
                break;
@@ -118,16 +120,16 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               fire_ball(GF_POIS, dir, dam, rad);
+                               fire_ball(caster_ptr, GF_POIS, dir, dam, rad);
                        }
                }
                break;
 
        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;
@@ -136,9 +138,9 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               sleep_monster(dir, plev);
+                               sleep_monster(caster_ptr, dir, plev);
                        }
                }
                break;
@@ -146,7 +148,7 @@ concptr do_death_spell(player_type *caster_ptr, 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;
@@ -171,10 +173,10 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               fear_monster(dir, plev);
-                               stun_monster(dir, plev);
+                               fear_monster(caster_ptr, dir, plev);
+                               stun_monster(caster_ptr, dir, plev);
                        }
                }
                break;
@@ -190,9 +192,9 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               control_one_undead(dir, plev);
+                               control_one_undead(caster_ptr, dir, plev);
                        }
                }
                break;
@@ -217,9 +219,9 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               fire_ball(GF_HYPODYNAMIA, dir, damroll(dice, sides) + base, rad);
+                               fire_ball(caster_ptr, GF_HYPODYNAMIA, dir, damroll(dice, sides) + base, rad);
                        }
                }
                break;
@@ -236,16 +238,16 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               fire_bolt_or_beam(beam_chance(), GF_NETHER, dir, damroll(dice, sides));
+                               fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_NETHER, dir, damroll(dice, sides));
                        }
                }
                break;
 
        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;
@@ -255,14 +257,14 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               project(0, rad, caster_ptr->y, caster_ptr->x, dam, GF_POIS, PROJECT_KILL | PROJECT_ITEM, -1);
+                               project(caster_ptr, 0, rad, caster_ptr->y, caster_ptr->x, dam, GF_POIS, PROJECT_KILL | PROJECT_ITEM, -1);
                        }
                }
                break;
 
        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;
@@ -271,9 +273,9 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               fire_ball_hide(GF_GENOCIDE, dir, power, 0);
+                               fire_ball_hide(caster_ptr, GF_GENOCIDE, dir, power, 0);
                        }
                }
                break;
@@ -285,7 +287,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               brand_weapon(3);
+                               brand_weapon(caster_ptr, 3);
                        }
                }
                break;
@@ -293,7 +295,7 @@ concptr do_death_spell(player_type *caster_ptr, 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.");
 
                {
                        DICE_NUMBER dice = 1;
@@ -306,9 +308,9 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                HIT_POINT dam = base + damroll(dice, sides);
 
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               if (hypodynamic_bolt(dir, dam))
+                               if (hypodynamic_bolt(caster_ptr, dir, dam))
                                {
                                        chg_virtue(caster_ptr, V_SACRIFICE, -1);
                                        chg_virtue(caster_ptr, V_VITALITY, -1);
@@ -343,7 +345,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               animate_dead(0, caster_ptr->y, caster_ptr->x);
+                               animate_dead(caster_ptr, 0, caster_ptr->y, caster_ptr->x);
                        }
                }
                break;
@@ -351,7 +353,7 @@ concptr do_death_spell(player_type *caster_ptr, 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;
@@ -360,14 +362,14 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               symbol_genocide(power, TRUE);
+                               symbol_genocide(caster_ptr, power, TRUE);
                        }
                }
                break;
 
        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;
@@ -376,7 +378,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               (void)berserk(p_ptr, base + randint1(base));
+                               (void)berserk(caster_ptr, base + randint1(base));
                        }
                }
                break;
@@ -390,9 +392,9 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               cast_invoke_spirits(dir);
+                               cast_invoke_spirits(caster_ptr, dir);
                        }
                }
                break;
@@ -409,9 +411,9 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               fire_bolt_or_beam(beam_chance(), GF_DARK, dir, damroll(dice, sides));
+                               fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_DARK, dir, damroll(dice, sides));
                        }
                }
                break;
@@ -430,7 +432,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               (void)berserk(p_ptr, b_base + randint1(b_base));
+                               (void)berserk(caster_ptr, b_base + randint1(b_base));
                                set_fast(caster_ptr, randint1(sp_sides) + sp_base, FALSE);
                        }
                }
@@ -443,7 +445,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               brand_weapon(4);
+                               brand_weapon(caster_ptr, 4);
                        }
                }
                break;
@@ -461,14 +463,14 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                int i;
 
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
                                chg_virtue(caster_ptr, V_SACRIFICE, -1);
                                chg_virtue(caster_ptr, V_VITALITY, -1);
 
                                for (i = 0; i < 3; i++)
                                {
-                                       if (hypodynamic_bolt(dir, dam))
+                                       if (hypodynamic_bolt(caster_ptr, dir, dam))
                                                hp_player(caster_ptr, dam);
                                }
                        }
@@ -486,7 +488,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               dispel_living(randint1(sides));
+                               dispel_living(caster_ptr, randint1(sides));
                        }
                }
                break;
@@ -503,9 +505,9 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               fire_ball(GF_DARK, dir, dam, rad);
+                               fire_ball(caster_ptr, GF_DARK, dir, dam, rad);
                        }
                }
                break;
@@ -517,9 +519,9 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               death_ray(dir, plev);
+                               death_ray(caster_ptr, dir, plev);
                        }
                }
                break;
@@ -531,20 +533,20 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                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)
                        {
                                if (randint1(50) > plev)
                                {
-                                       if (!ident_spell(FALSE)) return NULL;
+                                       if (!ident_spell(caster_ptr, FALSE)) return NULL;
                                }
                                else
                                {
-                                       if (!identify_fully(FALSE)) return NULL;
+                                       if (!identify_fully(caster_ptr, FALSE)) return NULL;
                                }
                        }
                }
@@ -553,7 +555,7 @@ concptr do_death_spell(player_type *caster_ptr, 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;
@@ -569,7 +571,7 @@ concptr do_death_spell(player_type *caster_ptr, 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)
@@ -582,7 +584,7 @@ concptr do_death_spell(player_type *caster_ptr, 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;
@@ -591,7 +593,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               mass_genocide(power, TRUE);
+                               mass_genocide(caster_ptr, power, TRUE);
                        }
                }
                break;
@@ -609,9 +611,9 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               if (!get_aim_dir(&dir)) return NULL;
+                               if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
-                               fire_ball(GF_HELL_FIRE, dir, dam, rad);
+                               fire_ball(caster_ptr, GF_HELL_FIRE, dir, dam, rad);
                                take_hit(caster_ptr, DAMAGE_USELIFE, 20 + randint1(30), _("地獄の劫火の呪文を唱えた疲労", "the strain of casting Hellfire"), -1);
                        }
                }
@@ -620,7 +622,7 @@ concptr do_death_spell(player_type *caster_ptr, 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;