OSDN Git Service

Replaced "spelling" with "spell casting" in English name for high mage innate ability.
[hengbandforosx/hengbandosx.git] / src / realm-arcane.c
index 55a18a5..74b0b74 100644 (file)
@@ -1,5 +1,12 @@
 #include "angband.h"
 #include "cmd-spell.h"
+#include "projection.h"
+#include "avatar.h"
+
+#include "spells-floor.h"
+#include "spells-object.h"
+#include "spells-summon.h"
+#include "spells-status.h"
 
 /*!
 * @brief 秘術領域魔法の各処理を行う
@@ -7,7 +14,7 @@
 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
 */
-cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
        bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
@@ -24,8 +31,8 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("電撃のボルトもしくはビームを放つ。", "Fires a bolt or beam of lightning.");
 
                {
-                       int dice = 3 + (plev - 1) / 5;
-                       int sides = 3;
+                       DICE_NUMBER dice = 3 + (plev - 1) / 5;
+                       DICE_SID sides = 3;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -86,7 +93,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 4:
                if (name) return _("ショート・テレポート", "Blink");
-               if (desc) return _("近距離のテレポートをする。", "Teleport short distance.");
+               if (desc) return _("近距離のテレポートをする。", "Teleports you a short distance.");
 
                {
                        POSITION range = 10;
@@ -105,8 +112,8 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
 
                {
-                       int dice = 2;
-                       int sides = plev / 2;
+                       DICE_NUMBER dice = 2;
+                       DICE_SID sides = plev / 2;
                        POSITION rad = plev / 10 + 1;
 
                        if (info) return info_damage(dice, sides, 0);
@@ -134,11 +141,11 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 7:
                if (name) return _("軽傷の治癒", "Cure Light Wounds");
-               if (desc) return _("怪我と体力を少し回復させる。", "Heals cut and HP a little.");
+               if (desc) return _("怪我と体力を少し回復させる。", "Heals cuts and HP a little.");
 
                {
-                       int dice = 2;
-                       int sides = 8;
+                       DICE_NUMBER dice = 2;
+                       DICE_SID sides = 8;
 
                        if (info) return info_heal(dice, sides, 0);
                        if (cast) (void)cure_light_wounds(dice, sides);
@@ -238,7 +245,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 14:
                if (name) return _("耐冷", "Resist Cold");
-               if (desc) return _("一定時間、冷気への耐性を得る。装備による耐性に累積する。", "Gives resistance to cold. This resistance can be added to which from equipment for more powerful resistance.");
+               if (desc) return _("一定時間、冷気への耐性を得る。装備による耐性に累積する。", "Gives resistance to cold. This resistance can be added to that from equipment for more powerful resistance.");
 
                {
                        int base = 20;
@@ -255,7 +262,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 15:
                if (name) return _("耐火", "Resist Fire");
                if (desc) return _("一定時間、炎への耐性を得る。装備による耐性に累積する。",
-                       "Gives resistance to fire. This resistance can be added to which from equipment for more powerful resistance.");
+                       "Gives resistance to fire. This resistance can be added to that from equipment for more powerful resistance.");
 
                {
                        int base = 20;
@@ -272,7 +279,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 16:
                if (name) return _("耐電", "Resist Lightning");
                if (desc) return _("一定時間、電撃への耐性を得る。装備による耐性に累積する。",
-                       "Gives resistance to electricity. This resistance can be added to which from equipment for more powerful resistance.");
+                       "Gives resistance to electricity. This resistance can be added to that from equipment for more powerful resistance.");
 
                {
                        int base = 20;
@@ -289,7 +296,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 17:
                if (name) return _("耐酸", "Resist Acid");
                if (desc) return _("一定時間、酸への耐性を得る。装備による耐性に累積する。",
-                       "Gives resistance to acid. This resistance can be added to which from equipment for more powerful resistance.");
+                       "Gives resistance to acid. This resistance can be added to that from equipment for more powerful resistance.");
 
                {
                        int base = 20;
@@ -305,11 +312,11 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 18:
                if (name) return _("重傷の治癒", "Cure Medium Wounds");
-               if (desc) return _("怪我と体力を中程度回復させる。", "Heals cut and HP more.");
+               if (desc) return _("怪我と体力を中程度回復させる。", "Heals cuts and HP.");
 
                {
-                       int dice = 4;
-                       int sides = 8;
+                       DICE_NUMBER dice = 4;
+                       DICE_SID sides = 8;
 
                        if (info) return info_heal(dice, sides, 0);
                        if (cast) (void)cure_serious_wounds(4, 8);
@@ -318,7 +325,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 19:
                if (name) return _("テレポート", "Teleport");
-               if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
+               if (desc) return _("遠距離のテレポートをする。", "Teleports you a long distance.");
 
                {
                        POSITION range = plev * 5;
@@ -349,8 +356,8 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("壁を溶かして床にする。", "Turns one rock square to mud.");
 
                {
-                       int dice = 1;
-                       int sides = 30;
+                       DICE_NUMBER dice = 1;
+                       DICE_SID sides = 30;
                        int base = 20;
 
                        if (info) return info_damage(dice, sides, base);
@@ -369,8 +376,8 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("光線を放つ。光りを嫌うモンスターに効果がある。", "Fires a beam of light which damages to light-sensitive monsters.");
 
                {
-                       int dice = 6;
-                       int sides = 8;
+                       DICE_NUMBER dice = 6;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -415,11 +422,10 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 25:
                if (name) return _("エレメンタル召喚", "Conjure Elemental");
                if (desc) return _("1体のエレメンタルを召喚する。", "Summons an elemental.");
-
                {
                        if (cast)
                        {
-                               if (!summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_FORCE_PET)))
+                               if (!summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0'))
                                {
                                        msg_print(_("エレメンタルは現れなかった。", "No Elementals arrive."));
                                }
@@ -429,7 +435,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 26:
                if (name) return _("テレポート・レベル", "Teleport Level");
-               if (desc) return _("瞬時に上か下の階にテレポートする。", "Teleport to up or down stairs in a moment.");
+               if (desc) return _("瞬時に上か下の階にテレポートする。", "Instantly teleports you up or down a level.");
 
                {
                        if (cast)
@@ -507,17 +513,17 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 30:
                if (name) return _("帰還の呪文", "Word of Recall");
                if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。",
-                       "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
+                       "Recalls player from dungeon to town or from town to the deepest level of dungeon.");
 
                {
                        int base = 15;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_delay(base, sides);
 
                        if (cast)
                        {
-                               if (!word_of_recall()) return NULL;
+                               if (!recall_player(p_ptr, randint0(21) + 15)) return NULL;
                        }
                }
                break;
@@ -525,11 +531,11 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 31:
                if (name) return _("千里眼", "Clairvoyance");
                if (desc) return _("その階全体を永久に照らし、ダンジョン内すべてのアイテムを感知する。さらに、一定時間テレパシー能力を得る。",
-                       "Maps and lights whole dungeon level. Knows all objects location. And gives telepathy for a while.");
+                       "Maps and lights whole dungeon level. Reveals locations of all objects. Gives telepathy for a while.");
 
                {
                        int base = 25;
-                       int sides = 30;
+                       DICE_SID sides = 30;
 
                        if (info) return info_duration(base, sides);