OSDN Git Service

[Refactor] #37353 projection.c/h を geometry.c/h に統合。
[hengband/hengband.git] / src / realm-daemon.c
index bc2c1c2..44c1ffe 100644 (file)
@@ -2,6 +2,7 @@
 #include "angband.h"
 #include "cmd-spell.h"
 #include "spells-summon.h"
+#include "spells-status.h"
 
 /*!
 * @brief 悪魔領域魔法の各処理を行う
 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
 */
-cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_daemon_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 ");
 
        DIRECTION dir;
        PLAYER_LEVEL plev = p_ptr->lev;
@@ -27,8 +27,8 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("弱い魔法の矢を放つ。", "Fires a weak bolt of magic.");
 
                {
-                       int dice = 3 + (plev - 1) / 5;
-                       int sides = 4;
+                       DICE_NUMBER dice = 3 + (plev - 1) / 5;
+                       DICE_SID sides = 4;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -114,8 +114,8 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
 
                {
-                       int dice = 6 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_NUMBER dice = 6 + (plev - 5) / 4;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -135,7 +135,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               if (!summon_specific(-1, p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_MANES, (PM_ALLOW_GROUP | PM_FORCE_PET)))
+                               if (!summon_specific(-1, p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_MANES, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0'))
                                {
                                        msg_print(_("古代の死霊は現れなかった。", "No Manes arrive."));
                                }
@@ -149,8 +149,8 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Fires a ball of evil power. Hurts good monsters greatly.");
 
                {
-                       int dice = 3;
-                       int sides = 6;
+                       DICE_NUMBER dice = 3;
+                       DICE_SID sides = 6;
                        POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
@@ -226,8 +226,8 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("プラズマのボルトもしくはビームを放つ。", "Fires a bolt or beam of plasma.");
 
                {
-                       int dice = 11 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_NUMBER dice = 11 + (plev - 5) / 4;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -308,7 +308,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 30;
-                       int sides = 25;
+                       DICE_SID sides = 25;
 
                        if (info) return info_duration(base, sides);
 
@@ -406,7 +406,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        int sides1 = plev * 2;
                        int sides2 = plev * 2;
 
-                       if (info) return format("%sd%d+d%d", s_dam, sides1, sides2);
+                       if (info) return format("%sd%d+d%d", KWD_DAM, sides1, sides2);
 
                        if (cast)
                        {
@@ -488,7 +488,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        int power = 20 + plev;
                        POSITION rad = 3 + plev / 20;
 
-                       if (info) return format("%s%d+%d", s_dam, dam / 2, dam / 2);
+                       if (info) return format("%s%d+%d", KWD_DAM, dam / 2, dam / 2);
 
                        if (cast)
                        {